How to combine two projects made under different API level? - android

I m creating a customised music player with some additional features in it.... for that i copied one project whose API level is 10 and pasted it in my current working project whose API level is 19..... i m getting an error "Using 1.7 requires compiling with Android 4.4 (KitKat); currently using API 10"...... I don't know how to make two API level work in the same project ..... please help....... i tried cleaning my project and rebuilding it ..... but after that it shows R cannot be resolved to a variable

Try changing the api level on the project, in your project manifest you will find this line:
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
Change the targetSdkVersion to 19 to make it work with Android 4.4.

Related

error in every new android project with eclipse

I am trying to create an android project and it gives me errors
and errors appear only if I have more than one android project (R cannot be resolved to a variable ) and if i import it errors change to (R.menu.main,R.layout.activity_main,R.id.action_settings
Change android:minSdkVersion to 11 in your androidmanifest.xml. Yours is currently 8 which does not allow the call your are trying to make in onCreateView() method. First error in your screenshot clearly says it.
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="23" />
target SDK could be what you want.
Based on your comment if you still want to continue using API level 8. You should determine the API level at runtime and then call the method that works for the Android version on device. Read this for more info: Check System Version at Runtime

What is android api level of my project

If the minSdkVersion of my project is 11 then what is the api level of my project? I mean how
to check whether I am working in api version 2, 3 or above? thanks.
You can actually keep the project's targetSDK at the same level, and just use a minSDK value.
What this means is that your application will target to build against a certain API, but it will let phones with lesser versions of Android than that API to also run the app. The catch is that you have to make sure you don't make any API calls that don't exist in the older versions of Android.
To change this, go to your AndroidManifest.xml and add the following inside of the xml node:
<uses-sdk android:minSdkVersion="3" />
This would set your minsdk to Android 1.5. Change it 4 for Android 1.6 and so on.
But if you really want to change the TargetSDK, right click on your project --> properties. Then click the Android tab on the left. Then check the box of the target API you want to build against.
List of api level is here and example is here
The minSdkVersion attribute only specifies the lowest API level on which your application will run.
If you did not set targetSdk or maxSdkVersion, then your app will run on the api level of the android device (if it is above or equal of minSdkVersion).
See http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
1) Right Click On Project
2) Click on "Properties"
3) Select "Android" from left Tab
Check targetSdkVersion in AndroidManifest.xml.
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />

ADT project creating error

I would like to create a new project in ADT, but I can not do this, I always get similar messages to this:
This template requires a build target API version of at least 14, and
the current version is 10
I would like to use Android 2.3.3 to build.
Make sure you have updated the SDK manager upto the recent API level and you can set minSDK version to 10 and target SDKVersion as 14..Also set Theme as None because you are probably using a HoloTheme...
This template requires a build target API version of at least 14, and the current version is 10
Here it is clearly saying that your trying to use a template which requires minimum of API level 14 but you mentioned API level 10 as in your manifest file. So go to Android manifest file and change target SDK version to 14
like:
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="14" />

Android Lint error: Class requires API level 3, current is min is 1

When running my Android app I often get a list of errors, wich says
Class requires API level 3 (current min is 1): android.hardware.SensorEventListener
I've searched for the correct answer to this, like Android tools > Clear Link Markers, but this doesn't solve the problem. Every once in a while the list of errors keeps coming back. Is it something in my project settings or are my methods deprecated? I've installed the latest SDK for Android 4.4.
In your manifest file set the sdk like this based on your requirement..
<uses-sdk
android:maxSdkVersion="17"
android:minSdkVersion="8" />
Restart and invalidate cache if this error just started up for no apparent reason
Change your application minsdk from Preference>Android>select the api level Android1.6

Changing android:minSdkVersion Has No Effect

I am developing an Android app using eclipse. When I try to run my project I get the error
Call requires API level 13 (current min is 8): android.view.Display#getSize which refers to the line display.getSize(size);.
So in the AndroidManifest.xml I made the following change:
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="17" />
However when I try running the project again, I still get the same error. The target SDK is Android 4.0. Does anyone know what is causing this error?
Try to clean your project. If it still shows error after cleaning then right click on project goto Properties>Android tab and select the Android Build target Android 3.2. And after performing this Build your project. I think it should work after this.

Categories

Resources