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?
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).
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.
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; .
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.
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 .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With