Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android change SDK version in Eclipse? Unable to resolve target android-x

I developed an Android aplication against 2.1 SDK. Since then I have re-installed Eclipse/Android SDK; with the new install, I want to 'upgrade' the dependancy of the Android application to 2.2 SDK (because I dont want 2.1 installed on my machine). Is this possible? I am getting the following error from eclipse:

[2010-08-31 18:18:32 - AndroidApplication] Unable to resolve target 'android-7' 
like image 233
wuntee Avatar asked Sep 01 '10 00:09

wuntee


People also ask

How do I change compile SDK in eclipse?

Goto project --> properties --> Android(This is second in listed item order leftPanel) and in the RightPanel Project Build Target, select Android 4.4. 2 as Target name and apply changes It will rebuild the workspace.

What is minSdkVersion and targetSdkVersion in Android?

android:minSdkVersion — Specifies the minimum API Level on which the application is able to run. The default value is "1". android:targetSdkVersion — Specifies the API Level on which the application is designed to run.

Can I change SDK version Android studio?

Select the tab Flavors on the right panel, click the defaultConfig item in the dialog center list area. Then you can select your desired android Min Sdk Version and Target Sdk Version from the related dropdown list on the right side. Click the OK button to save the selection.


2 Answers

If you're using eclipse you can open default.properties file in your workspace and change the project target to the new sdk (target=android-8 for 2.2). I accidentally selected the 1.5 sdk for my version and didn't catch it until much later, but updating that and restarting eclipse seemed to have done the trick.

like image 121
fufux Avatar answered Sep 28 '22 19:09

fufux


go to project properties and change the target from 7 to 8 also change the target in android manifest and also go to properties of project by right clicking on the project and choose the target

like image 37
Ravindra singh Avatar answered Sep 28 '22 19:09

Ravindra singh