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.
Related
I need to set the Android attribute
android:usesCleartextTraffic="true"
in an Eclipse Android project, but when I do so, it gives me the error:
No resource identifier found for attribute 'usesCleartextTraffic' in package 'android'
Any ideas on how to fix this problem?
Thanks.
I believe I found the problem. I needed to target a more recent SDK. Unfortunately doing so create a whole host of other problems which I will have to sort through, but they are unrelated to this question.
I am trying to implement the ActionBar in a Mono Android application. Could someone provide me steps to including the ActionBar project in my solution? I have seen the sample projected provided at this url
https://github.com/xamarin/monodroid-samples/tree/master/ActionBarSherlock
Do I have to simply add a reference of the ActionBarSherlock project in that sample? When I attempt to add a reference to that project I get many errors such as "Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Menu'." in file abs_styles.xml
Has anyone else successfully added ActionBarSherlock to a Mono Android Project? Could you please provide me steps to get a simple example working?
Ok, this is how I got it working...
Open up the sample project and build just the 'ActionBarSherlock' project on Release mode. Make sure that the minimum target android version is 4.0.3 (required)
Take the dll and reference it in your project. I have found that you can get it to compile fine if your project has a minimum android version of 2.2 - I found that if you used profile version 2.1 it doesn't work, but that just might of been my app. Maybe your minimum version is too low? I also set my 'target' android to be the latest... I don't know if this helps too.
The reason I say to reference the dll instead of the project is that you will get the correct intellisense. Otherwise as you can see in the example project it does not (Makes working on it a pain!).
Make sure you have a reference to the v4 support lib in your project (Mono.Android.Support.v4)
The final step is that need to change your default theme to use a Sherlock theme. (see xml below for example)
Use the ActionbarSherlock.* namespaces when adding Actionbars etc...
Example manifest after adding ActionbarSherlock:
<manifest ...>
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />
<application android:label="IDNT" android:theme="#style/Theme.Sherlock.Light.DarkActionBar" android:icon="#drawable/Icon">
</application>
</manifest>
BEWARE: There is a small issue with all this... If your project has a minimum version of under 3.0 (ie 2.2 as per my example) and you compile with linking (ie SDK assemblies only) you will get an error 'Mono.Cecil.ResolutionException: Failed to resolve Android.Database.IDatabaseErrorHandler'. I am currently sending support messages about this to Xamarin and will edit this post once I work out a fix.
EDIT: To fix the issue I have mentioned above make sure that the project options -> Application -> Minimum Android to target option is at LEAST 4.0.3. Your minSdkVersion can still be 7/8 or whatever so it will still run in older android versions. It also means you have to be careful you dont code in stuff that is for higher versions.
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.
When I build app in the Eclipse, all is ok, but when I try to build with the apache ant, I have got some errors:
[aapt] ...\AndroidManifest.xml:10: error: No resource identifier found for attribute 'hardwareAccelerated' in package 'android'
[aapt] ...\AndroidManifest.xml:23: error: Error: String types not allowed (at 'configChanges' with value 'keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale').
I use the "uses-sdk" with minSDKVersion=7 (I need to run app on the Android 2.1 devices). When I remove "uiMode|screenSize|smallestScreenSize" values" from "configChanges" and remove "hardwareAccelerated", then ANT properly complete it's job, but AdMob do not work properly.
I know, that "uiMode|screenSize|smallestScreenSize" values first introduced in SDK API level 13, but when I use Eclipse to build app, all working good on Android 2.1.
I don't know what I should do ;(
Try setting the targetSDKVersion to 13?
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="13"/>
I'm developing an Android application that I'd like to be compatible with 1.5 (SDK version 4). I'm testing the application on 2.2 (SDK version 8). To do this, I'm including in the manifest file the line
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="8" />
I thought this would allow me to use the newest manifest elements and APIs, but I'm getting a compile error whenever I try to use them. For example, I try to define the element installLocation to allow the app to be installed on the SD card, but Eclipse gives me the error
No resource identifier found for attribute 'installLocation' in package 'android'
Is there something else I have to do to get this to work? If I can't get this to work, what benefit is defining targetSdkVersion?
Make sure that you are using building against the android 2.2 jars. Right click on your Eclipse project, choose, properties, go down to Android and make sure the correct sdk is selected.
Change the build target by editing the project properties in Eclipse, and choose a target with at least API Level 8: ("I'm testing the application on 2.2 (SDK version 8)").