Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SDK.DIR is missing? android update project?

Tags:

android

ant

I get this error when I do

$ ant release sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var 

typing in android update project I get another error saying I must specify the path .... to the project.

Then I try cd into the directory of my project and do

android update -p . android update -path .  

etc and it says -p and -path are not globally recognized.

Could someone just give me the exact syntax?

like image 860
Code Droid Avatar asked Sep 04 '12 20:09

Code Droid


People also ask

Why my Android SDK is missing?

Method 1. The Cause for this error -SDK tools package might not be installed. Quick fix: Go to the Tools –> SDK manager –> SDK tools. Deselect Hide obsolete packages option on the right bottom and further install Android SDK Tools(obsolete).

How do I fix SDK location not found?

Close the current project and you'll see a pop-up with a dialog which will then proceed to Configure option. Configure -> Project Defaults -> Project Structure -> SDKs on left column -> Android SDK Home Path -> give the exact path as you did on local. properties and select Valid Target.

What is Android_home path?

Variable name: ANDROID_HOME , Variable value: the path where you installed the android SDK, in my case is, C:\Android\android-sdk . You have to add the variable to the Path variable system by adding this: ;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools; .

How do I set local properties?

Go to System Properties -> Environment Variables -> Add Variable -> put Variable Name and Value. Step 3. Add Variable name: ANDROID_HOME and value: as your SDK path. If your path is something else not in C Drive you have to add that.


1 Answers

cd to project directory and execute the following: The word project is part of the command, and is not to be replaced with an actual project name. The documentation does not make this clear and should be improved.

   android update project -p . 
like image 132
Code Droid Avatar answered Sep 30 '22 16:09

Code Droid