Importing Project Gave Unable To Resolve Target 'android-7'
Solution 1:
Well, yes that is your problem. You don't have the API level 7 downloaded. You can right click the project and go properties->android and select another available API. As long as you don't change the min sdk version in your manifest you are still targeting as many devices as before.
<uses-sdkandroid:minSdkVersion="7"/>
Update
You don't have to do this, but you can get the older APIs on the SDK Archives page
I don't know if there is any official source for the next statement but that is what I found while working. If anybody can complete this with a better answer I would appreciate it very much.
You can compile the code with a newer SDK version as long as you don't use any code not compatible to the previous ones.
Example:
I want my app to be available for API level 7. But i only have API level 15 installed. As long as I keep the minSdkVersion="7" in my Manifest and don't use any resource not available in the previous APIs the app will work just fine on my targeted devices.
Solution 2:
For anyone who wants to test their project against an API level that isn't the most recent one, you can just use the SDK Manager to install the old SDK:
In Eclipse (with adt installed):
SDK Manager:
Just check the box of the SDK you want to use to test against your project and click install. You can also remove API's that you aren't using.
Solution 3:
Right click on your project then:
Properties -> Android -> Project build target -> Check Android 4.1.2
Solution 4:
In your application's manifest.xml file add this tag
<uses-sdkandroid:minSdkVersion="8"android:targetSdkVersion="8" />
It's worked for me. Try it.
Solution 5:
I resolved this issue by editing my project.properties file
from: target=android-7
to: target=android-19
.
I also changed the target sdk version in the manifest file:
android:targetSdkVersion="19"
.
Post a Comment for "Importing Project Gave Unable To Resolve Target 'android-7'"