android update project --path . --target android-25 on ubuntu 16.04
I was getting error unsupported command "update project"
because I was using sdk with tools version 26.0.1. As this command is deprecated now so it is already removed from tools version 25.3.0
I found this in documentation
https://developer.android.com/studio/releases/sdk-tools.html
So, if still want to fire this command then you have you downgrade your sdk tools to version 25.2.5 or less.
For that rename your sdk/tools folder to tool1 or else to keep it as a backup and download required sdk tools and paste that [tools] folder inside sdk folder. I have followed this link to download sdk tools or platform-tools :
https://stackoverflow.com/a/11514698/6795090
In the same way you can also upgrade your tools or platform-tools. But if you are using android-studio then I recommend to update them from SDK Manager.
One last thing, to update project using "update project" command you need to set environment variables like this:
export ANDROID_HOME=<PATH_TO_SDK>
export PATH=$PATH:<PATH_TO_PLATFORM_TOOLS>:<PATH_TO_TOOLS>
This solved my problem.
Related videos on Youtube
Comments
-
Kesha over 1 year
While executing command in terminal
update project --path . --target android-25
I am getting error
Invalid or unsupported command "update project --path . --target android-25 Supported commands are: android list target android list avd android list device android create avd android move avd android delete avd android list sdk android update sdk
I have already set down environment variables using
export JAVA_HOME=<path_to_jdk> export ANDROID_HOME=<path_to_sdk> export PATH=$PATH:<path_to_tools>:<path_to_platform_tools>:<path_to_ndk>
One Strange thing was when I had set down this variables via command, the change doesn't reflected in
/etc/environment
when opened usinggedit /etc/environment
Thanks In Advance.
-
FrickeFresh almost 7 yearsCan verify that after hours of looking Google has gave no work around other then using a pre v25.3 version. Other option is rebuild it all using Gradle like they want people now to do
-
cweiske over 4 yearsLinux version: dl-ssl.google.com/android/repository/tools_r25.2.5-linux.zip