I am receiving the following error when compiling an Android project using SDK 4.1.2:
/res/values-v14/styles.xml:3: error: Error retrieving parent for item: No resource found that matches the given name '#android:Theme.Holo.Light'.
The values-v14 resource directory is the only place this theme is referenced.
The uses-sdk in my manifest is <uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="16"/> and the project SDK is set to build with Android 4.1.2 with the Google APIs.
Can anyone give me some idea of what might be occurring?
I am using the latest version of Intellij IDEA.
Since this was a project imported from Eclipse, I had to go back and change the SDK built against to 4.1.2 in Eclipse, and then IDEA decided to play nice.
Related
error: No resource identifier found for attribute 'hardwareAccelerated' in package 'android'
This error happens when eclipse android project build is running.
I'm using
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="8"> right now,
am I using a wrong sdk version?
Also can I find these kind of android attribute working according to sdk version?
These two attributes, 'hardwareAccelerated' and 'largeHeap' attribute supports above Android 3.0( API 11 ),
and I'm using .
I've cleaned my project, but the project still shows the same error.
Still keep looking for the real answer.
I don't know what I did to break my build, probably an SDK upgrade, but in any case, I'm getting the above error when I rebuild my app.
I tried all the answers given on SO for the same problem, but nothing helped. Here are some details:
In the Android manifest:
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="23" />
I set the project build target to Android 6.0 and imported android-support-v7-appcompat and included it in the project:
I've spent over two days on this and have run out of ideas.
UPDATE: The problem seems to be due to android-v7-appcompat.jar not getting placed in the /bin directory. I tried copying it from /libs to /bin, but that didn't help.
I worked around the problem by installing a newer version of Eclipse (Mars), re-installing the Android SDK and importing my project from a backup. Builds fine now.
I recently changed my Project Build Target from Android 2.3.3 to Google APIs and from this time I get an error from the values-v11 folder which says
error: Error retrieving parent for item: No resource found that
matches the given name 'android:Theme.Holo.Light'.
Maybe I need to remove that folder or there is something else I can do to include this theme in my app
2.3.3 is doesn't have the Holo styles and resources. So, it will give this error.
You have two options:
Remove those styles
Switch to latest SDK
BTW, any specific reason of using build target as 2.3.3? You could have the target set to the latest version, and run your app on 2.3.3 as well.
I have imported Support4Demos project from Android SDK (from directory extras/android/support/samples/Support4Demos/) into eclipse.
Initially I got more than 800 errors.
After adding android-support-v4.jar library to build path still more than 100 errors exist.
Probably all of them have the same cause - R class is not generated due to error in XML file.
error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo'.
As I understood - Holo Theme is missing..
Project is imported "as is" - no modifications were made. So I expect that should work.
Where is the Holo Theme? It is not part of Android SDK?
Which file should I copy to which directory?
Or should I add some reference?
The problem is very likely that Holo theme is for Android SDK 4.x and above and you are using some older SDK in your project. You are probably importing samples from a recent API and your project is using an older one.
Solutions are (descending order of how good the solution is):
Import samples targeted at the SDK you wish to use.
or
Change the theme of the sample.
or
Set up your project with a newer Android API (eg. +4.x).
You can also check this question: Trying to use holo theme in Android not working
Problem solved... I mean.
When project is imported into eclipse project.properties file is created. My eclipse creates file with target=8 inside. Probably it is lowest version which is installed. But I am not sure.
Holo theme is not part of Android Support Library so project should be compiled with Project Build Target set to platform version containing Holo Theme (3.0 or higher - API 11 or higher). It can be done via eclipse menu Project->Properties->Android or directly in project.properties file. eclipse automatically updates reference to the right version of android.jar platform library. Note that targetSdkVersion in AndroidManifest.xml has no effect (or?). I have this unchanged line in AndroidManifest.xml:
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="13" />
I have installed platforms of version 8, 10, 13 and 16. Project cannot be compiled with API level 13 due to another compatibility problem in AndroidManifest.xml.
So I can successfully build project only with platform version 4.1 (API level 16) - in other words with target=16 in project.properties file.
Small problem with running application - eclipse shows only Android 4.1 AVD (others are considered as incompatible and are hidden. My Samsung Galaxy Y Duos is showing also as incompatible, but application can run on it.
I am playing with the new google expansion pack stuff, and the google library project for the downloader has a special values-v9/styles.xml file for the notification text properties. This causes an error when the app that is using the library is preAPI9... at least for me. It is referring to some style stuff that only appeared in api9. I've tried setting
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="9" />
in the AndroidManifest.xml of the main app, but this didn't help. I would (naively) hope eclipse would just ignore the error if I'm building for api8, and then when deployed on the market the system would use the values-9 stuff if the phone were at or above that level, but it doesn't seem to work that way. So, I'm hoping I'm missing something trivial here.
btw - here are the specific errors
Description Resource Path Location Type
error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.StatusBar.EventContent.Title'. styles.xml /Google Play Downloader Library/res/values-v9 line 4 Android AAPT Problem
Description Resource Path Location Type
error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.StatusBar.EventContent.Title'. styles.xml /Google Play Downloader Library/res/values-v9 line 4 Android AAPT Problem
Yes, I'm getting this also. I posted a related question here:
Android apk expansion file libs problems
I'm stumped to know what to do.
Update:
This worked for me. I deleted the values-v9 folder and rebuilt everything. The DownloadManager is now working. How, I don't know.
Try changing build target via Project->Properties->Android AND/OR Clean your project via Project->clean...
This worked for me after having to manually create the styles.xml file inside the styles-v9 folder through windows explorer.
I've fixed this error by building the project with the following commands:
android update project -p . -t 3 --target android-10
ant release
The first command tells to use the Android 2.3.3 toolchain for buiding the project.
Note that I still have android:minSdkVersion="8" in AndroidManifest.xml.
You should not delete the values-v9/ folder. Removing it can cause displaying notification with dark font on dark background.
If you download the latest api version, you should be able to build the library project against that correctly.
At runtime, Android will discard any code that doesn't work with the api on the device (you'll see various log messages about this), and ignore any res folders with a too high version number. Watch out for the v11 notification code, however: it only works on v14 and above so you'll have to change the code which decides which notification to use.