While running my application i am getting the below given warning and application went force close.
[2011-10-17 12:09:09 - LunarLander] WARNING: Application does not specify an API level requirement!
[2011-10-17 12:09:09 - LunarLander] Device API version is 9 (Android 2.3.1)
How to resolve this. I created another emulator with API level 10, then also i am getting the same error.
I am sure you forget to define the API level inside the AndroidManifest.xml file, define it as:
<uses-sdk android:minSdkVersion="5"
android:maxSdkVersion="10"
android:targetSdkVersion="8"/>
You should define the API level of your application in manifest file. I think you forgot to that. Launch the application according to that.
Just looking at that error you need to specify an API level for your application:
http://developer.android.com/guide/appendix/api-levels.html
Related
I want to add flutter_sound_lite to my application, Currently my Android API level is 16 and iOS target is 9.0
Flutter Sound requires an iOS 10.0 SDK and Android API level 21
I want to keep my API level (16) and iOS target(9.0), and add Flutter Sound too, just don't use it on old devices, How can I do it?
For android I add the following line in manifest
<uses-sdk tools:overrideLibrary="com.dooboolab.fluttersound, com.dooboolab.TauEngine" />
But in android log cat I have error
04-17 10:27:08.182 2973-2973/ir.karget E/dalvikvm: Could not find class 'android.media.AudioAttributes$Builder', referenced from method androidx.core.app.NotificationCompat$Builder.setSound
In my Android Manifest I have these value set:
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
But I keep getting errors like this:
Error:(7, 5) uses-sdk:minSdkVersion 9 cannot be smaller than version 10 declared in library …app\build\intermediates\exploded-aar\com.facebook.android\facebook\3.21.1\AndroidManifest.xml
Or at another place where I using this code:
newFragment.show(getFragmentManager(), "datePicker");
I get warning with red line that however when i run it runs fine:
`Call requires min API level 11 (current min is 9…`
Why is that when I have set minSdkVersion to way above than required?
If you are using Gradle, the minSdkVersion declared in your build.gradle file takes precedence over what is declared in your AndroidManifest.xml - in fact, you can remove those lines from your manifest entirely.
The minSdk errors that you are getting is because of the libraries included and not because of your app. For example facebook requires minSdk 9 which is declared in its manifest
I am trying to change the transition from default to sliding in. I would like to keep my minSdkVersion to be 3 however overridePendingTransition wasn't added until API level 5 (Android 2.0).
I tried creating an integer to represent the SDK version and then only override the transition when in Android 1.6 or less via a simple if statement.
int sdkVersion = Integer.parseInt(Build.VERSION.SDK);
if(sdkVersion>=5)
overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.fade_out);
Eclipse gives me a LINT warning stating "Call requires API level 5 (current min is 3): android.app.Activity#overridePendingTransition"
If I suppress this error and run it anyway it crashes on Android 1.6 or lower.
What is wrong with my code and how can I fix it? Any suggestions would be very appreciated!
In your android manifest file you have this ...
<uses-sdk
android:minSdkVersion="3"
android:targetSdkVersion="latest version" />
Change the min sdk version to 5 like show below
<uses-sdk
android:minSdkVersion="5"
android:targetSdkVersion="latest version" />
in Android :
I want to use the method : getLoaderManager.initLoader() with API level 10 .
I know that this method requires API Level 11 or higher and i tried to use Android Support package but this package doesn't have this method .
what can i do ??
It sure looks to me like the Android Support Package has it. See the docs for android.support.v4.app.LoaderManager.initLoader().
Update:
For the equivalent of getLoaderManager, see getSupportLoaderManager.
You can increase the minimum SDK to level 15 and it will work fine.
I imported android project an I got 3 errors
error: Error: String types not allowed (at 'screenOrientation' with value 'sensorPortait'). AndroidManifest.xml /com.cartmillimaging.fishingmate.MapViewActivity line 16 Android AAPT Problem
same error on different lines.
<activity android:name=".MapViewActivity" android:screenOrientation="sensorPortait">
For project build target I have selected Google APIs 2.3.3. 10.
I also enabled Java compiler project specific settings and put compiler compliance error to 1.6.
I am new to android development, so can you help me?
checkout your API level. The following attributes:
android:screenOrientation="sensorPortrait" only can work on API level 16+
android:screenOrientation="sensorPortait" can work under level 15
I think it's a fixed bug
There's a typo error in the value. The correct name is "sensorPortrait"
when you load project I get this error (I use api level 10). I found solution for this. You change screenOrientation to something else, save it, and then return to sensorPortait and everything now is working.
Confirmed what cashmere said.
i changed all
android:screenOrientation="sensorPortrait"
to
android:screenOrientation="sensorLandscape"
built the project and then changed it back again for all my activites in the manifest and all works good :)
Had this error and couldn't kick it. Some how my build settings had API 13 selected... Selected API 21 and yay no more issue!