I am referring to the http://developer.android.com/resources/tutorials/testing/activity_test.html regarding activity testing.
My avd is showing platform-2.3.3 api level-10.
In eclipse when i click on create new android project and select create project from existing source and then browse to the samples\android-8\Spinner it prefill the Min Sdk Version with 3 and when i select the target platform 2.3.3 api level 10 it shows following warning:
The API level for the selected SDK target does not match the Min SDK Version.
I have checked the spinner manifest file it contains
<uses-sdk android:minSdkVersion="3"/>
I have tried different combinations like changed the sample folder and changed the target but it shows the same warning.
I want to know how to rectify the warning so that my sample run?
Please help me on this
min sdk version can be lower than target sdk version.
see this link
The app uses level 10 sdk I guess and the minsdklevel specified is 3 that is the reason for the warning. This warning can be ignored.
You can run the app on any version of android with level >= 3 as long you dont use any api calls which where introduced in level 10.
Related
I can't create a new window on Android Studio. Error message shown in red "Selected activity template has a minimum SDK level of 9" how can I solve this issue ?
You have to open build.gradle and change the minSdkVersion to 16. Then, you have to rebulid the project. I fix that issue by this way
Chose an higher minimum API level (at least 14 for this template). Go back to the first step and change the minimum api level.
Selected Activity template has a minimum SDK level of X
Android Studio says so, because you've selected Minimum SDK version to be less than X. in you case SDK version less than 9 in the previous option.
See this:
I'd get the same error as yours, as I've set Minimum SDK to be : Android 1.1.
FIX:-
Choose an SDK version higher than 9.
In your case, it's ideal to choose API 16: Android 4.1(Jelly Bean) and above as more features would be supported from this version onwards.
Go to app level gradle file. You can find it from the gradle scripts -> build.gradle(Module:app). In android{defaultConfig{minSdkVersion}}} put 16 and Sync project from top right. This should solve your problem. This happens because the API Level expressed by an application will be compared to the API Level of a given Android system, which may vary among different Android devices. You can find more details here https://developer.android.com/guide/topics/manifest/uses-sdk-element
I am new to Android Development and I tried to import an Android Application in to my Eclipse (ADT).
But , I am getting an error saying :
Unable to resolve target 'android-8'
But , I checked in the manifest file that , the min sdk and target sdk are set as follows:
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="19" />
Then , why am I having an this error? Why do I require API 8 , even-though the application supports min sdk 11 ? The Application has Facebook and GCM integrated into it?
Is it because of this? Or , are there any classes that require API 8 support?
I am getting confused and not able to find a satisfactory answer.
Thanks.
You application has set Android 8 as target version. Change it from properties option
Right click the project and click "Properties".
Then select "Android" from left. You can then select the target version from right side.
Always try to select the highest available target version. Currently go for Android 19 (4.4.2 Kitkat).
annotations.jar is a 2kb file try to download online if not
copy ..\android-sdk\extras\android\support\annotations\android-support-annotations.jar and copy it to ..\android-sdk\tools\support\
you have to open up SDK manager and simply installed API level 8.
I installed the SDK and I like work with API 7 but when I want to create a new Activity Main I have this problem and I can't create a new Activity, thanks.
This template requires a build target API version of at least 14, and the current version is 7
In the log, I can read this:
Not targeting the latest versions of Android; compatibility modes apply. Consider testing
and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details.
I recently faced the same problem when creating the activity or while setting the new android application project and able to solve this problem in this manner.
I checked the system image folder which is in sdk/system-images,build tools folder-sdk/build-tools and found that these folder does not have the API's that i am using at Minimum required sdk,target sdk,compile with. In each of these you need to provide the API no. or Android version.
So check that the API's that you are using for(Minimum required sdk,target sdk,compile with) are installed and also check the system-images and build-tools folder should have these API's
if you have done this your problem must be solved.
You probably set Build SDK to API 7. Normally, you should set Build SDK to the highest possible API level and set the other SDK, it's called Run SDK or don't rememeber how to the minimum API version you want your application to run on.
I ran into this same issue even though I had set in my AndroidManifest.xml minSdkVerion to 13 and targetSdkVersion to 19. What fixed it for me was in Eclipse going to Project > Properties > Android then checking the highest API level in Project Build Target box (API 19 for me).
I had made an application with target : Android 2.1 - API Level7. It works fine with the emulator with target : Android 2.1 - API level7. And after that i tried to run the same app in an emulator with target : Android 1.5 - API Level3. But it is not working. I am using the Eclipse to built my application..
Can anyone say why it happens like this? Or, can anyone simply describe how to make changes to run an app build in API Level7 to 5 with steps.. I am new to this environment, i may be wrong with my procedures..
So plz guide me..
Use the min sdk version in your manifest file to Android 1.5 api level 3. Your api target version is still the same.
Add the following line in your AndroidManifest.xml file
<uses-sdk android:minSdkVersion="3" />
this will allow your app to run in any device with api level 1.5 or higher.
Set the minSDK to the lowest level you want to support, and the max to the highest level. The set the target to whichever makes sense.
In summary, look at this: http://developer.android.com/guide/topics/manifest/uses-sdk-element.html.
You choose the min, target and max SDK in the manifest file.
android is backwards compatible, not forwards, so your target api should be the lowest version of android ynu would like your app to run on. your target api should be 1.5.
Yes as everyone said. Android minimum-sdk-version is trick for you question.
If you have target API 2.3.3 then minimum-sdk-version will be 10(By default).so it will run on 2.3.3, 3.1,3.3 and more which has minimum-sdk-version more than 10.
So if i change minimum-sdk-version to 4 it will work on device which have version more than 4.
No you have two solution --
1) change minimum-sdk-version in android-manifest
2) change target api
project->rightclick->properties->android then select Target API
I am having some difficulty in figuring out how to change an applications API level - the only available level I can configure is level 15. This is not so good as the device I am attempting to test software is running on level 8. Does anyone know I might go about fixing this problem?
Thanks,
J
Have you installed other platform versions?
You can change the build target by right clicking the project ->Properties->Android:
Your question can have multiple interpretations. Here's some hints:
Application Build Target API Level : when you create your application, eclipse ask you that. You can build it with a certain api level. This option is choosen in eclipse direclty when you create your project. This tells your application that it may only be available to devices with this api level since it is the level that is put in minsdk. The target is in the file project.properties.
Application MinSDK : This is the minimum version of android your application can run ( Note : It may not be the application build target level because you can create an application with target api level 15 and make it runnable with minsdk in level 7 and manage backward compatibility or avoid level 8 to 15 new features). This can be modified in your android manifest xml file.
Adding a new site replacing https by http will not work to download
platform (it's not meant for this, we're making the UI clearer).
If you really cannot download over https using r5 (there was a bug in
r4 and before but we fixed it), go to the settings page (in the
standalone version of the SDK Updater), and check "Force https sources
to be fetch using http"
Change the value of the "target" attribute in the project.properties(or default.properties) file.
OR
if you use eclipse; right clic on your project ->Properties->Android->Project Build Target
Check whether the required level 8 software is installed on your machine.
In eclipse goto Window > Android SDK Manager.
In the show column make sure that Update/New and Installed check buttons are checked.
If not installed then install the required API level. Then on the project, goto Properties and select Android on the left pane. Select your API level and click OK.