I have many error (71) in my new project (Android - Xamarin).
I created new project and add my last layouts and xmls
When I tried to build this application it show me 71 error about drawable.
No resource found that matches the given name (at...
I sent this project to my friend, he built and debug and it doesn't have error.
What should I do with this problem?
Related
I have a Xamarin Forms project and now I'd like to improve it with the new Visual / Material features.
On IOS, it works like a charm.
On Android I have strange problems: after adding Xamarin.Forms.Visual.Material nuget I get weird error messages and my project does not build:
\res\values\values.xml(6): error APT0000: Attribute "statusBarBackground" already defined with incompatible format.
\res\values\values.xml(2): error APT0000: Original attribute defined here.
\res\values\values.xml(10): error APT0000: Attribute "layout_anchorGravity" already defined with incompatible format.
\res\values\values.xml(2): error APT0000: Original attribute defined here.
\res\values\values.xml(17): error APT0000: Attribute "layout_insetEdge" already defined with incompatible format.
\res\values\values.xml(2): error APT0000: Original attribute defined here.
\res\values\values.xml(17): error APT0000: Attribute "layout_dodgeInsetEdges" already defined with incompatible format.
\res\values\values.xml(2): error APT0000: Original attribute defined here.
\res\values\styles.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Theme.MaterialComponents.Light.DarkActionBar'.
\res\values\styles.xml(2): error APT0000: No resource found that matches the given name: attr 'materialButtonStyle'.
\res\values\styles.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Widget.MaterialComponents.Button'.
\res\values\styles.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Widget.MaterialComponents.Button.OutlinedButton'.
\res\values\styles.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Widget.MaterialComponents.TextInputLayout.FilledBox'.
\res\values\styles.xml(2): error APT0000: No resource found that matches the given name: attr 'boxCollapsedPaddingTop'.
I use Visual Studio 2017 Professional on Windows, I don't use any prerelease nuget.
Xamarin.Forms version is 3.6.0.293080.
Minimum Android API level is 21, target is 28, and compiled with 28.
Xamarin Android support libraries version is 28.0.0.1.
I tried the usual tricks (delete bin, obj dir, restart Visual Studio, run it in admin mode, delete Xamarin app data...) but neither helped.
The same thing happens if I create a new project from schratch, and don't do anything with it, just add visual.material nuget to the Android project.
Do you have any suggestions? Thanks a lot!
I had the same issue a few days ago where I first had TargetFramework set to Android 8.1, installed same packages and later changed it to Android9 and installed a new package.
The Xamarin.Forms.Visual.Material requires Android 9 to be set in Android project options and you previously had 8.1 configured and installed nuget packages for Android 8.1.
If you still use old packages.config like me to add NuGet packages, make sure you always see same monodroid string in hint path in the csproj and don't mix 81 with 90 and always have monoandroid90.
<Reference Include="Xamarin.Forms.Visual.Material , Version=3.6.0.293080, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.Material.3.6.0.293080\lib\monoandroid90\Xamarin.Forms.Material.dll</HintPath>
</Reference>
After changing TargetFramework to 9, open Package Manager Console and run
Update-Package -Reinstall -IgnoreDependencies
to let VS update the packages.config and csproj.
I found this answer on github:
Migrating Package.json File to PackageReference to resolved problem.
1 - Click right on packages.config in Android Project
2 - Click on Migration Package.config to PackageReference
3 - Accept
4 - Run Project
Ref: https://github.com/xamarin/Xamarin.Forms/issues/5828
I also updated references with Nuget, done a clean, removed obj and bin fonder, and then Build.
Im trying to add a Library Project (https://github.com/inmite/android-styled-dialogs) to my Android Studio project.
However I get the following build errors because my build is not able to reference the values in the Android-styled-dialog LibraryProject
android-apt-compiler: [NavigationDrawer] /Users/Jase/Downloads/NavigationDrawer/res/values-v11/themes_apptheme.xml:23: error: Error retrieving parent for item: No resource found that matches the given name 'DialogStyleLight'.
android-apt-compiler: [NavigationDrawer] /Users/Jase/Downloads/NavigationDrawer/res/values-v11/themes_apptheme.xml:30: error: Error: No resource found that matches the given name: attr 'buttonBackgroundColorNormal'.
android-apt-compiler: [NavigationDrawer] /Users/Jase/Downloads/NavigationDrawer/res/values-v11/themes_apptheme.xml:29: error: Error: No resource found that matches the given name: attr 'buttonSeparatorColor'.
....
I don't really know anything about Gradle but I feel that I possibly need to tell the build to reference Android-styled-dialog. I don't know I'm completely lost...
PS: When I created a new android studio project with the demo project for Android-Styled-Dialogs it created the following mavin file... which I don't have in my other project - https://gist.github.com/anonymous/8207108
I don't really know anything about Java build systems, please help
I'm getting this error when trying to build the application. The xml editor did not highlight both error as missing. As the file/string are already there.
android-apt-compiler: [XXX]
D:\private\xxx\android\XXX\src\AndroidManifest.xml:35: error: Error:
No resource found that matches the given name (at 'icon' with value
'#drawable/ic_launcher').
android-apt-compiler: [XXX]
D:\private\xxx\android\XXX\src\AndroidManifest.xml:233: error: Error:
No resource found that matches the given name (at 'value' with value
'#string/FacebookAppID').
The project structure is like this:
ProjectFolder
|-external_lib
|-src
|-src (actual source)
|-res
|-...
I can confirm that both file is already in the project. As I use IntelliJ, I could just Ctrl + click then it open those files for me. However, I'm still getting this error.
I checked with both Google and SO. Most of the issues were about not having the files or storing in different folders. Which I can ensure that it is in the right place alongside hundred other files and strings.
Another issue is about % sign in strings.xml. I tried searching for "%" and nothing is found in the file.
Shutting down IDE and reopen it doesn't help, nor rebuilding the project. How could I get the app to build?
Look for any error message during the resource compilation.
Sometimes, if you have resource filenames containing illegal characters (such as underscores or uppercase letters), the whole process fails almost silently, and the IDE can't find any resources anymore.
I'm not sure that it's what is happening in your case, but I did eventually encounter such issues...
I am learning android and I have downloaded an open source app named Astrid and was deploying in eclipse. I got the "No resource found that matches the given name"#string/name_hint". I checked the Strings.xml and found that this label was not available in there. There is another file called String-legacy.xml and in that this value is set. Eclipse is not referring to string-legacy.xml and throwing these errors.
I copied the values from strings-legacy.xml and pasted it to strings.xml and this error was removed. I am sure this is not the right approach...there should be some setting for me to tell eclipse to read from string-legacy.xml
anybody have any thoughts on the same, please advice. Thanks
Harry
Vista 64; Eclipse 3-5-1.
I'm getting this error when I work on main.xml:
ERROR Error: No resource found that matches the given name (at 'text' with value '#string/get_text').
To eliminate variables I've created a new Android Project
Opened main.xml and pasted this in
When I hit save I get the above error in a red X next to the
This is related to a problem mentioned on this site. It's question # is 885009.
My project is set to automatically build.
Add this line in your string.xml
<string name="get_text">SAMPLE</string>