ying-hui.the@windev.co.uk (47) [Avatar] Offline
#1
Created blank new project as close to root of C:.
It cleared a "path too long message" but I got a new error, about some missing item.

Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'
Jim Bennett (86) [Avatar] Offline
#2
Are you creating the project using the MvvmCross templates?

Have you tried a rebuild? Sometimes the Android resources get in a bit of a mess and a rebuild fixes it. If not can you delete all your bin, obj and packages folders, zip the code up and send it to me to take a look? You can email to jim at jimbobbennett dot io
Jorge Ramirez (8) [Avatar] Offline
#3
First Error
[ 77 KB ]
Second Error
[ 17 KB ]
Hello @Jim

I had the same issue after creating the projects using the MvvmCross templates. I've no previous knowledge of Xamarin (That's why I'm reading the book) but I was able to find a couple things that could be causing the issue.

In my case I'm running Visual Studio 2017 preview (15.3.0 Preview 4.0) on Windows 10, I had no previous installation of Xamarin so I used the VS Installer selecting the proper workload, after that I installed the MvvmCross templates and created a new project.

Once I created the project I tried to build the .droid project and the error appears, my first guessing was to check the nuget packages for each project, so I found some version mismatch:

In .core project all mvvmcross packages target version: 5.0.5
In .ios project all mvvmcross packages target version: 5.0.5
In .droid project all mvvmcross packages target version: 5.0.3

I did not knew if this was the issue so I proceed to match all versions to 5.0.3 so I changed them manually in the .droid project and ran this command in the nuget manager console:

Update-Package -Reinstall -ProjectName HelloCrossPlatformWorld.Droid


The command execution returned an error saying the package "Xamarin.Android.Support.Vector.Drawable" version "25.3.1" can't be installed into a project that targets "MonoAndroid version 6.0", so my next guessing was there was some kind mismatch in the targeting android version, also if you check the packages.config file for .droid project you will see all packages uses targetFramework="monoandroid71"

So I went to the Android SDK Manager and installed the SKD Platform for API level 25, then I went to project properties and changed the application compiler to use the 7.1 and also changed the manifest to target minimum version 6.0 and maximum 7.1.

I ran again the reinstall nuget packages script, after that there was a very weird Visual Studio Warning (warning IDE0006) so to fix that I deleted the hidden .vs folder in the project root folder, also I deleted every bin/object folder (inside every project), after that the .droid project compiles without any errors.

I think all those errors were caused by the way the MvvmCross template is creating the projects (maybe guessing you have installed API level 25, in my case I didn't) so it will need some special attention because newbies like me that bought the book will be unable to run the project by just reading the book. It took me about 5 hours to find the way of running it using Visual Studio Emulator (I was not able to get working the default emulator).

Hope this post help someone facing the same issue
Jim Bennett (86) [Avatar] Offline
#4
Good spot on the MvvmCross versions - I'll get the extension fixed up to use the same version for all platforms. I'm also going to add a note to Chapter 2 advising the reader to install the latest stable Android SDK - this was the cause of the original problem in this thread.

Thanks - valuable feedback from both of you!
ying-hui.the@windev.co.uk (47) [Avatar] Offline
#5
Sorry been dragged away from this for a few week or so.

So what do I have to do to resolve this?
Jim Bennett (86) [Avatar] Offline
#6
I replied to your email - it works for me using the latest Android SDK.

Upgrade your Android SDK to the latest version (from 'Tools->Android->SDK Manager' install the SDK for 7.1 - API 25), clean out your bin and obj folders and it should work.
ying-hui.the@windev.co.uk (47) [Avatar] Offline
#7
Great compiles fine.

now when I select FirstView.axml; it displays a "Show Error " on a Red button, with a red band behind the button.

Then some time later it displays a Android Emulator that does not show an MvvvCross_Application01, one can swipe left and right, but no Mvvm application.
ying-hui.the@windev.co.uk (47) [Avatar] Offline
#8
I also now cant reset any other project as the start up project.
ying-hui.the@windev.co.uk (47) [Avatar] Offline
#9
oh its thinks its STILL building.
ying-hui.the@windev.co.uk (47) [Avatar] Offline
#10
Tried to update Windows10 x86: got error messages... skipping this that etc....

Fetching https://dl.google.com/android/repository/addons_list-2.xml
Fetched Add-ons List successfully
Fetching URL: https://dl.google.com/android/repository/repository-11.xml
Done loading packages.
Fetching https://dl.google.com/android/repository/addons_list-2.xml
Validate XML
Parse XML
Fetched Add-ons List successfully
Fetching URL: https://dl.google.com/android/repository/repository-11.xml
Validate XML: https://dl.google.com/android/repository/repository-11.xml
Parse XML: https://dl.google.com/android/repository/repository-11.xml
Found SDK Platform Android 8.0.0, API 26, revision 1
Found SDK Platform Android 7.1.1, API 25, revision 3
Found SDK Platform Android 7.0, API 24, revision 2
Found SDK Platform Android 6.0, API 23, revision 3
Found SDK Platform Android 5.1.1, API 22, revision 2
Found SDK Platform Android 5.0.1, API 21, revision 2
Found SDK Platform Android 4.4W.2, API 20, revision 2
Found SDK Platform Android 4.4.2, API 19, revision 4
Found SDK Platform Android 4.3.1, API 18, revision 3
Found SDK Platform Android 4.2.2, API 17, revision 3
Found SDK Platform Android 4.1.2, API 16, revision 5
Found SDK Platform Android 4.0.3, API 15, revision 5
Found SDK Platform Android 4.0, API 14, revision 4
Found SDK Platform Android 3.2, API 13, revision 1
Found SDK Platform Android 3.1, API 12, revision 3
Found SDK Platform Android 3.0, API 11, revision 2
Found SDK Platform Android 2.3.3, API 10, revision 2
Found SDK Platform Android 2.3.1, API 9, revision 2
Found SDK Platform Android 2.2, API 8, revision 3
Found SDK Platform Android 2.1, API 7, revision 3
Found SDK Platform Android 2.0.1, API 6, revision 1 (Obsolete)
Found SDK Platform Android 2.0, API 5, revision 1 (Obsolete)
Found SDK Platform Android 1.6, API 4, revision 3 (Obsolete)
Found SDK Platform Android 1.5, API 3, revision 4 (Obsolete)
Found SDK Platform Android 1.1, API 2, revision 1 (Obsolete)
Found Sources for Android SDK, API 25, revision 1
Found Sources for Android SDK, API 24, revision 1
Found Sources for Android SDK, API 23, revision 1
Found Sources for Android SDK, API 22, revision 1
Found Sources for Android SDK, API 21, revision 1
Found Sources for Android SDK, API 20, revision 1
Found Sources for Android SDK, API 19, revision 2
Found Sources for Android SDK, API 18, revision 1
Found Sources for Android SDK, API 17, revision 1
Found Sources for Android SDK, API 16, revision 2
Found Sources for Android SDK, API 15, revision 2
Found Sources for Android SDK, API 14, revision 1 (Obsolete)
Found Android SDK Build-tools, revision 26
Found Android SDK Build-tools, revision 26 rc2
Found Android SDK Build-tools, revision 26 rc1
Found Android SDK Build-tools, revision 25.0.3
Found Android SDK Build-tools, revision 25.0.2
Found Android SDK Build-tools, revision 25.0.1
Found Android SDK Build-tools, revision 25
Found Android SDK Build-tools, revision 24.0.3
Found Android SDK Build-tools, revision 24.0.2
Found Android SDK Build-tools, revision 24.0.1
Found Android SDK Build-tools, revision 24
Found Android SDK Build-tools, revision 23.0.2
Found Android SDK Build-tools, revision 23.0.3
Found Android SDK Build-tools, revision 23.0.1
Found Android SDK Build-tools, revision 23 (Obsolete)
Found Android SDK Build-tools, revision 22.0.1
Found Android SDK Build-tools, revision 22 (Obsolete)
Found Android SDK Build-tools, revision 21.1.2
Found Android SDK Build-tools, revision 21.1.1 (Obsolete)
Found Android SDK Build-tools, revision 21.1 (Obsolete)
Found Android SDK Build-tools, revision 21.0.2 (Obsolete)
Found Android SDK Build-tools, revision 21.0.1 (Obsolete)
Found Android SDK Build-tools, revision 21 (Obsolete)
Found Android SDK Build-tools, revision 20
Found Android SDK Build-tools, revision 19.1
Found Android SDK Build-tools, revision 19.0.3 (Obsolete)
Found Android SDK Build-tools, revision 19.0.2 (Obsolete)
Found Android SDK Build-tools, revision 19.0.1 (Obsolete)
Found Android SDK Build-tools, revision 19 (Obsolete)
Found Android SDK Build-tools, revision 18.1.1 (Obsolete)
Found Android SDK Build-tools, revision 18.1 (Obsolete)
Found Android SDK Build-tools, revision 18.0.1 (Obsolete)
Found Android SDK Build-tools, revision 17 (Obsolete)
Found Android SDK Platform-tools, revision 26
Found Android SDK Tools, revision 25.2.5
Found Documentation for Android SDK, API 24, revision 1
Fetching URL: https://dl.google.com/android/repository/addon.xml
Validate XML: https://dl.google.com/android/repository/addon.xml
Parse XML: https://dl.google.com/android/repository/addon.xml
Found Google APIs, Android API 3, revision 3 (Obsolete)
Found Google APIs, Android API 4, revision 2 (Obsolete)
Found Google APIs, Android API 5, revision 1 (Obsolete)
Found Google APIs, Android API 6, revision 1 (Obsolete)
Found Google APIs, Android API 7, revision 1 (Obsolete)
Found Google APIs, Android API 8, revision 2 (Obsolete)
Found Google APIs, Android API 9, revision 2 (Obsolete)
Found Google APIs, Android API 10, revision 2 (Obsolete)
Found Google APIs, Android API 11, revision 1 (Obsolete)
Found Google APIs, Android API 12, revision 1 (Obsolete)
Found Google APIs, Android API 13, revision 1 (Obsolete)
Found Google APIs, Android API 14, revision 2 (Obsolete)
Found Google APIs, Android API 15, revision 3
Found Google APIs, Android API 16, revision 4
Found Google APIs, Android API 17, revision 4
Found Google APIs, Android API 18, revision 4
Found Google APIs, Android API 19, revision 20
Found Google APIs, Android API 24, revision 1
Found Google APIs, Android API 23, revision 1
Found Google APIs, Android API 21, revision 1
Found Google APIs, Android API 22, revision 1
Found Google APIs, Android API 23, revision 1
Found Google TV Addon, Android API 12, revision 2 (Obsolete)
Found Google TV Addon, Android API 13, revision 1 (Obsolete)
Found Android Support Repository, revision 47
Found Google Repository, revision 55
Found Google Play Licensing Library, revision 1
Found Google Play APK Expansion library, revision 1
Found Google Play services for Froyo, revision 12 (Obsolete)
Found Google Play services, revision 42
Found Google USB Driver, revision 11
Found Google Play Billing Library, revision 5
Found Google AdMob Ads SDK, revision 11 (Obsolete)
Found Google Analytics App Tracking SDK, revision 3 (Obsolete)
Found Google Web Driver, revision 2
Found Google Cloud Messaging for Android Library, revision 3 (Obsolete)
Found Android Auto API Simulators, revision 1
Found Android Auto Desktop Head Unit emulator, revision 1.1
Found Instant Apps Development SDK, revision 1
Fetching URL: https://dl.google.com/android/repository/glass/addon.xml
Validate XML: https://dl.google.com/android/repository/glass/addon.xml
Parse XML: https://dl.google.com/android/repository/glass/addon.xml
Found Glass Development Kit Preview, Android API 19, revision 11
Fetching URL: https://dl.google.com/android/repository/extras/intel/addon.xml
Validate XML: https://dl.google.com/android/repository/extras/intel/addon.xml
Parse XML: https://dl.google.com/android/repository/extras/intel/addon.xml
Found Intel x86 Emulator Accelerator (HAXM installer), revision 6.1.1
Found Intel x86 Emulator Accelerator (HAXM installer), revision 6.0.6
Fetching URL: https://dl.google.com/android/repository/sys-img/android/sys-img.xml
Validate XML: https://dl.google.com/android/repository/sys-img/android/sys-img.xml
Parse XML: https://dl.google.com/android/repository/sys-img/android/sys-img.xml
Found ARM EABI v7a System Image, Android API 10, revision 4
Found ARM EABI v7a System Image, Android API 14, revision 2
Found ARM EABI v7a System Image, Android API 15, revision 4
Found ARM EABI v7a System Image, Android API 16, revision 4
Found ARM EABI v7a System Image, Android API 17, revision 5
Found ARM EABI v7a System Image, Android API 18, revision 4
Found ARM EABI v7a System Image, Android API 19, revision 5
Found ARM EABI v7a System Image, Android API 21, revision 4
Found ARM EABI v7a System Image, Android API 22, revision 2
Found ARM EABI v7a System Image, Android API 23, revision 6
Found ARM EABI v7a System Image, Android API 24, revision 7
Found ARM 64 v8a System Image, Android API 24, revision 7
Found MIPS System Image, Android API 15, revision 1
Found MIPS System Image, Android API 16, revision 1
Found MIPS System Image, Android API 17, revision 1
Found Intel x86 Atom System Image, Android API 10, revision 4
Found Intel x86 Atom System Image, Android API 15, revision 4
Found Intel x86 Atom System Image, Android API 16, revision 5
Found Intel x86 Atom System Image, Android API 17, revision 3
Found Intel x86 Atom System Image, Android API 18, revision 3
Found Intel x86 Atom System Image, Android API 19, revision 5
Found Intel x86 Atom System Image, Android API 21, revision 4
Found Intel x86 Atom System Image, Android API 22, revision 5
Found Intel x86 Atom System Image, Android API 23, revision 9
Found Intel x86 Atom System Image, Android API 24, revision 7
Found Intel x86 Atom_64 System Image, Android API 21, revision 4
Found Intel x86 Atom_64 System Image, Android API 22, revision 5
Found Intel x86 Atom_64 System Image, Android API 23, revision 9
Found Intel x86 Atom_64 System Image, Android API 24, revision 7
Fetching URL: https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml
Validate XML: https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml
Parse XML: https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml
Found Android Wear ARM EABI v7a System Image, Android API 23, revision 6
Found Android Wear Intel x86 Atom System Image, Android API 23, revision 6
Found Android Wear ARM EABI v7a System Image, Android API 25, revision 3
Found Android Wear Intel x86 Atom System Image, Android API 25, revision 3
Found Android Wear Intel x86 Atom System Image, Android API 26, revision 1
Fetching URL: https://dl.google.com/android/repository/sys-img/android-tv/sys-img.xml
Validate XML: https://dl.google.com/android/repository/sys-img/android-tv/sys-img.xml
Parse XML: https://dl.google.com/android/repository/sys-img/android-tv/sys-img.xml
Found Android TV Intel x86 Atom System Image, Android API 21, revision 3
Found Android TV ARM EABI v7a System Image, Android API 21, revision 3
Found Android TV Intel x86 Atom System Image, Android API 22, revision 3
Found Android TV ARM EABI v7a System Image, Android API 22, revision 1
Found Android TV Intel x86 Atom System Image, Android API 23, revision 10
Found Android TV ARM EABI v7a System Image, Android API 23, revision 10
Found Android TV Intel x86 Atom System Image, Android API 24, revision 11
Found Android TV Intel x86 Atom System Image, Android API 25, revision 5
Found Android TV Intel x86 Atom System Image, Android API 26, revision 3
Fetching URL: https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml
Validate XML: https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml
Parse XML: https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml
Found Google APIs ARM EABI v7a System Image, Android API 10, revision 5
Found Google APIs Intel x86 Atom System Image, Android API 10, revision 5
Found Google APIs ARM EABI v7a System Image, Android API 15, revision 5
Found Google APIs Intel x86 Atom System Image, Android API 15, revision 5
Found Google APIs ARM EABI v7a System Image, Android API 16, revision 5
Found Google APIs Intel x86 Atom System Image, Android API 16, revision 5
Found Google APIs ARM EABI v7a System Image, Android API 17, revision 5
Found Google APIs Intel x86 Atom System Image, Android API 17, revision 5
Found Google APIs ARM EABI v7a System Image, Android API 18, revision 5
Found Google APIs Intel x86 Atom System Image, Android API 18, revision 5
Found Google APIs Intel x86 Atom System Image, Android API 19, revision 28
Found Google APIs ARM EABI v7a System Image, Android API 19, revision 28
Found Google APIs Intel x86 Atom System Image, Android API 21, revision 20
Found Google APIs Intel x86 Atom_64 System Image, Android API 21, revision 20
Found Google APIs ARM EABI v7a System Image, Android API 21, revision 20
Found Google APIs Intel x86 Atom System Image, Android API 22, revision 14
Found Google APIs ARM EABI v7a System Image, Android API 22, revision 14
Found Google APIs Intel x86 Atom_64 System Image, Android API 22, revision 14
Found Google APIs Intel x86 Atom System Image, Android API 23, revision 21
Found Google APIs Intel x86 Atom_64 System Image, Android API 23, revision 21
Found Google APIs ARM EABI v7a System Image, Android API 23, revision 21
Found Google APIs Intel x86 Atom System Image, Android API 24, revision 14
Found Google APIs Intel x86 Atom_64 System Image, Android API 24, revision 14
Found Google APIs ARM EABI v7a System Image, Android API 24, revision 14
Found Google APIs ARM 64 v8a System Image, Android API 24, revision 14
Found Google APIs Intel x86 Atom System Image, Android API 25, revision 6
Found Google APIs Intel x86 Atom_64 System Image, Android API 25, revision 6
Found Google APIs ARM EABI v7a System Image, Android API 25, revision 6
Found Google APIs ARM 64 v8a System Image, Android API 25, revision 6
Found Google APIs Intel x86 Atom System Image, Android API 26, revision 4
Fetching URL: https://dl.google.com/android/repository/sys-img/google_apis_playstore/sys-img.xml
Validate XML: https://dl.google.com/android/repository/sys-img/google_apis_playstore/sys-img.xml
Parse XML: https://dl.google.com/android/repository/sys-img/google_apis_playstore/sys-img.xml
Found Google Play Intel x86 Atom System Image, Android API 24, revision 13
Found Google Play Intel x86 Atom System Image, Android API 26, revision 4
Done loading packages.
Preparing to install archives
Downloading Android SDK Platform-tools, revision 26
Installing Android SDK Platform-tools, revision 26
Stopping ADB server succeeded.
Installed Android SDK Platform-tools, revision 26
Downloading SDK Platform Android 8.0.0, API 26, revision 1
Installing SDK Platform Android 8.0.0, API 26, revision 1
Installed SDK Platform Android 8.0.0, API 26, revision 1
Downloading SDK Platform Android 7.1.1, API 25, revision 3
Download interrupted: Unknown Host dl.google.com
Downloading Google APIs ARM EABI v7a System Image, Android API 23, revision 21
Download interrupted: Unknown Host dl.google.com
Downloading Google APIs Intel x86 Atom System Image, Android API 23, revision 21
Download interrupted: Unknown Host dl.google.com
Downloading Sources for Android SDK, API 25, revision 1
Download interrupted: Unknown Host dl.google.com
Downloading Android Support Repository, revision 47
Download interrupted: Unknown Host dl.google.com
Downloading Google USB Driver, revision 11
Download interrupted: Unknown Host dl.google.com
Skipping 'Android TV Intel x86 Atom System Image, Android API 25, revision 5'; it depends on 'SDK Platform Android 7.1.1, API 25, revision 3' which was not installed.
Skipping 'Google APIs ARM 64 v8a System Image, Android API 25, revision 6'; it depends on 'SDK Platform Android 7.1.1, API 25, revision 3' which was not installed.
Skipping 'Google APIs ARM EABI v7a System Image, Android API 25, revision 6'; it depends on 'SDK Platform Android 7.1.1, API 25, revision 3' which was not installed.
Skipping 'Google APIs Intel x86 Atom_64 System Image, Android API 25, revision 6'; it depends on 'SDK Platform Android 7.1.1, API 25, revision 3' which was not installed.
Skipping 'Google APIs Intel x86 Atom System Image, Android API 25, revision 6'; it depends on 'SDK Platform Android 7.1.1, API 25, revision 3' which was not installed.
Stopping ADB server succeeded.
Starting ADB server failed (code -1).
Done. 2 packages installed.
Done loading packages.
Jim Bennett (86) [Avatar] Offline
#11
You only need SDK Platform Android 7.1.1, API 25. I wouldn't install 8.0 as this is still in beta.

It's a big download, and the Google servers do drop connections every now and again, so keep retrying till it works. This is what you are seeing in the logs based off the Download interrupted: Unknown Host dl.google.com message.