I'm trying to fix a couple errors that I'm getting when trying to create a new Android Application Project in Eclipse.
The following errors occur:
[2016-11-17 15:22:52 - Chatter] C:\Users\Chris\AppData\Local\Android\sdk\extras\android\support\v7\appcompat\res\values-v23\styles_base.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
[2016-11-17 15:22:48 - Chatter]
[2016-11-17 15:22:48 - Chatter] C:\Users\Chris\AppData\Local\Android\sdk\extras\android\support\v7\appcompat\res\values-v23\styles_base_text.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
[2016-11-17 15:22:48 - Chatter]
I have tried the following things:
Imported android-support-v7-appcompat into the project. Also created the reference.
Changed project.properties > target from android-19 to android-21
My project setup:
Minimum required SDK: API 14
Target SDK: API 21
Compile with: API 21
Blank Activity - Default names for everything.
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.
enter image description hereI have installed the android sdk and trying to create a new project but i have encounter the issues in appcompat_v7. I have tried few ways to recover the issue through the google search like project->clean, Change the target as android-19 in project properties and set the java build path but none of these work out for me.
I have faced the following issue,
D:\NewWorkSpace\appcompat_v7\res\values-v21\styles_base.xml:75: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
D:\NewWorkSpace\appcompat_v7\res\values-v21\styles_base.xml:79: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.CloseMode'.
D:\NewWorkSpace\appcompat_v7\res\values-v21\styles_base.xml:84: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'.
...etc
Then the appcompat_v7 and the folder res->values-v21->styles_base.xml
always shown in red color.
error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'
In manifest set targetsdkVersion="21"
and
In project.properties set target=android-21
I'm following this tutorial to make and app with action bar for 2.3.x devices. But i cannot import appcompat-v7 to my projecto... It gives me lots of errors like these:
[2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\appcompat_v7\res\values-v21\themes_base.xml:194: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
[2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\appcompat_v7\res\values-v21\themes_base.xml:195: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
[2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\appcompat_v7\res\values-v21\themes_base.xml:193: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
[2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\appcompat_v7\res\values-v21\themes_base.xml:190: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
[2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\appcompat_v7\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
[2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\appcompat_v7\res\values-large-v14\themes_base.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Base.AppCompat.DialogWhenLarge.Base'.
[2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\appcompat_v7\res\values-large-v14\themes_base.xml:22: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Base.AppCompat.Light.DialogWhenLarge.Base'.
So i cannot import my app theme and my action bar is not shown...
In project.properties for Your project android-support-v7-appcompat Make sure target value as follow.
Project target.
target=android-21
android.library=true
once you done Clean your Project. I hope this works.
In project.properties of both your project and android-support-v7-appcompat (under res), comment out the target api if not target=android-21 and place the new target code there.
If this doesn't work, or you can't use 21+ api, make sure in your app's project.properties that android.library=false.
Next check your project's Referenced Libraries does not contain v4 in the buildpath. I believe I'm saying this correctly, that v7-appcompat required it (the previous version), but that it is included within the android-support-v7-appcompat file and thus the duplicate entries cause a problem.
I got this problem too. I found many solutions that you must update to Android 5.0 API leveL 21..you can see one of the solutions for updating all IDE. HERE
..
(Note : Following method is my second way solution for me.)
If you don't want to update, you can try existing API level..I found solution in my way is that when you create the new android application project, choose as follow
minSdkVersion= API 14 ,
targetSdkVersion=API 17 ,
compiled with=API 17
Hope, this will help!
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
When I create a new project from existing source (Google play downloader library) to use with APK expansion files, the project is added with many errors in:
DownloaderClientMarshaller.java
DownloaderServiceMarshaller.java
DownloadProgressInfo.java
DownloaderService.java
DownloadNotification.java
V11CustomNotification.java
V3CustomNotification.java
The library targetSdkVersion is 15
Adding the library to my project generates the following errors:
[2012-04-17 23:03:54 - Atlas] D:\Programming\android sdk\android-sdk-windows\extras\google\play_apk_expansion\downloader_library\res\values-v9\styles.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.StatusBar.EventContent'.
[2012-04-17 23:03:54 - Atlas] D:\Programming\android sdk\android-sdk-windows\extras\google\play_apk_expansion\downloader_library\res\values-v9\styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.StatusBar.EventContent.Title'.
Try to delete values-v9. It's helped me.