I deployed a virtual machine on Azure. I've installed Visual Studio 2015, Xamarin and other mobile development tools. I did the same setup on my local computer to test my apps on my devices from Visual Studio
The only difference is the installation of the Android SDK. On my local machine, I have no image system.
I developed an application on my virtual machine. I have no error during compilation. I uses Android.Support.Design, Android.Support.V4, Android.Support.V7.AppCompat, Android.Support.V7.RecyclerView (latest releases from NuGet) and their MvvmCross implementation.
I wanted to continue the development of the application on my local computer. NuGet the packages are properly restored.
When I build app, I have some errors :
Error Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error Error retrieving parent for item: No resource found that matches the given name 'Base.Widget.AppCompat.Button'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'buttonStyle'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'colorAccent'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'colorPrimary'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'colorPrimaryDark'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'windowActionBar'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'windowNoTitle'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'windowNoTitle'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
I tried
target=android-19
to target=android-21
in C:\Program Files (x86)\Android\android-sdk\extras\android\support\v7\appcompat\project.properties
Could someone explain to me what's the problem? I dropped. Same OS, same tools, same SDK, same JDK,
These are steps:
Creating a new app
Then right click on "Xamarin.Android.Support.v7.AppCompat", choose "update".
Wait for IDE to finish updating and rebuild the app.
In my case, "Minimum Android Version" API 21, but "Target Android Version" is "use target framework version (API 23)", however it wasn't working earlier, then I've point both the version as API 21 and all of sudden it is started working as expected.
Later I've changed Minimum Android Version is API 21 and Target Android Version as "use target framework version (API 23)"
I had the same problem because ,I was using these item in style.xml
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
but inside color.xml there were no colorAccent defined
<resources>
<color name="primary">#2196F3</color>
<color name="primaryDark">#1976D2</color>
<color name="accent">#FFC107</color>
<color name="window_background">#F5F5F5</color>
<color name="splash_background">#3498DB</color>
simply solved by adding
<color name="colorAccent">#3498db</color>
Try this.
Navigate to C:\Program Files (x86)\Android\android-sdk\extras\android\support\v7\appcompat
.
Open project.properties
file.
Change target android to target=android-21
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With