Project builds.
Get the following errors:
Error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. (APT0000) (_3152.Android)
Error APT0000: No resource found that matches the given name: attr 'colorAccent'. (APT0000) (_3152.Android)
Error APT0000: No resource found that matches the given name: attr 'colorPrimary'. (APT0000) (_3152.Android)
Error APT0000: No resource found that matches the given name: attr 'colorPrimaryDark'. (APT0000) (_3152.Android)
Error APT0000: No resource found that matches the given name: attr 'windowActionBar'. (APT0000) (_3152.Android)
Error APT0000: No resource found that matches the given name: attr 'windowActionModeOverlay'. (APT0000) (_3152.Android)
Error APT0000: No resource found that matches the given name: attr 'windowNoTitle'. (APT0000) (_3152.Android)
Error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog'. (APT0000) (_3152.Android)
Error APT0000: No resource found that matches the given name: attr 'colorAccent'. (APT0000) (_3152.Android)
I've now seen this on new projects in VS for Mac _and_ VS for Windows, and occasionally on older projects that I've opened up in both.
Target Android version for the new project is 8.1 (27), with minimum version set to 4.4 (19).
I've also seen a community report of this problem (https://github.com/xamarin/Xamarin.Forms/issues/3152).
The error messages appear to be the same ones as #1696.
Visual Studio Community 2017 for Mac
Version 7.5.2 (build 40)
Installation UUID: e5e44794-b4af-4307-b8c8-9bfb701aa680
Runtime:
Mono 5.10.1.57 (2017-12/ea8a24b1bbf) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 4.4.1.178 (master / eeaeb7e6)
Package version: 510010057
NuGet
Version: 4.3.1.4445
.NET Core
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.0.5
2.0.3
SDK: /usr/local/share/dotnet/sdk/2.1.4/Sdks
SDK Versions:
2.1.4
2.0.3
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.10.1/lib/mono/msbuild/15.0/bin/Sdks
Xamarin.Profiler
Version: 1.6.2
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Xamarin.Android
Version: 8.3.3.2 (Visual Studio Community)
Android SDK: /Users/ezhart/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
4.0.3 (API level 15)
4.4 (API level 19)
4.4.87 (API level 20)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.5
SDK Build Tools Version: 25.0.2
Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
Apple Developer Tools
Xcode 9.4.1 (14161)
Build 9F2000
Xamarin.Mac
Version: 4.4.1.193 (Visual Studio Community)
Xamarin.iOS
Version: 11.12.0.4 (Visual Studio Community)
Hash: 64fece5f
Branch: d15-7
Build date: 2018-05-29 20:00:44-0400
Xamarin Inspector
Version: 1.4.0
Hash: b3f92f9
Branch: master
Build date: Fri, 19 Jan 2018 22:00:34 GMT
Client compatibility: 1
Build Information
Release ID: 705020040
Git revision: cfe2fc0566bc4db990242959de40505a13f58352
Build date: 2018-05-30 11:24:18-04
Xamarin addins: 3ac7413ef51a88e06367313c27aec8f7292752a6
Build lane: monodevelop-lion-d15-7
Operating System
Mac OS X 10.13.5
Darwin 17.6.0 Darwin Kernel Version 17.6.0
Tue May 8 15:22:16 PDT 2018
root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64
Enabled user installed addins
Internet of Things (IoT) development (Preview) 7.5
VS bug #785389
This might be fixed in #1914 but I just filed a similar issue at #1933.
@hartez if you Rebuild or delete bin and obj, does the issue go away?
@hartez I missed what you did on No. 2 Run NuGet update.
I believe #1878 will solve your issue, as I recently found updating NuGet packages breaks various files in obj.
Does deleting obj fix the problem?
I've run into this same error, and I've tried every clean/rebuild, update/reinstall NuGet, delete bin/obj, stand-on-my-head-recite-the-alphabet-backwards, etc. type of band-aid that I can think of and nothing works. Any insight into why this happens?
I recognize "No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'" as an error produced in native Android development platforms many years ago, and it usually indicated a mismatch between targeted API and installed SDK. I (and the OP) have double checked these items yet I still get the error.
@petemillermultimedia we've made changes in Xamarin.Android to fixes issues like this, but...
I think the root cause was an issue in VS for Mac for these types of issues, though. It was running msbuild twice in parallel, corrupting obj...
Can you the VS for Mac 7.8 preview where they fixed this issue? https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2017-mac-preview-relnotes#xamarinandroid-1
I've heard from other devs that this solved a lot of their problems.
I'm currently using Visual Studio Community for Mac. I updated to 7.8.1 (build 4) but the issue remains.
@petemillermultimedia could you file a new issue with more information?
Anything you could send would help, thanks!
I have the same issue, im running on visual studio preview 3,
@sgermosen ditto: https://github.com/xamarin/xamarin-android/issues/1934#issuecomment-468339987
I would like to fix this, but I don't have enough info to go on. Let me know if you can file a new issue, thanks!
@jonathanpeppers to reproduce the issue you only have to:
I have to aclararte than, that problems was only with the preview 3 of vs2019. Now on the release one I don't have this problem.
Marking this as resolved as per the latest comments. @petemillermultimedia if you're still encountering a similar issue on the VS Mac side could you please open a new issue?
Getting this in VS 2017 15.9.13
like sgermosen said..
File
New Project
Choose Xamarin
Choose Xamarin forms App
Choose blank application
Try to run it
Microsoft Visual Studio Community 2017
Version 15.9.13
VisualStudio.15.Release/15.9.13+28307.718
Microsoft .NET Framework
Version 4.7.03190
@natashavg try to add
<AndroidUseManagedDesignTimeResourceGenerator>False</AndroidUseManagedDesignTimeResourceGenerator>
to the csproj file
Adding theAndroidUseManagedDesignTimeblah tag fixed the problem for me (tho I did nuke the .obj and .bin folders before reloading the Android project), and then doing a rebuild.
_Exactly the same repro (just add new project, select blank app and build - forced to use VS 2017 15.9.8)_
Most helpful comment
@natashavg try to add
<AndroidUseManagedDesignTimeResourceGenerator>False</AndroidUseManagedDesignTimeResourceGenerator>to the csproj file