There are just a couple of prerequisites to note: This tutorial is a just step by step for installing Android SDK (Software Development Kit) assuming the user is starting from scratch. If needed, also set ANDROID_HOME environment variable like: export ANDROID_HOME=/path/to/android-sdk If you check the android-sdk folder after running tools/bin/sdkmanager -update it will be like: +- android-sdk The sdkmanager accepts the following flag: -sdk_root=: Use the specified SDK root instead of the SDKīut if we omit this flag, it assumes parent directory of tools directory as the sdk root, here in our case android-sdk directory. To get the SDK packages we could run: tools/bin/sdkmanager -update This extracts content to a single directory named tools, like: +- android-sdk Sdk-tools-linux-*.zip only includes the command-line tools. Tools/bin/sdkmanager "platform-tools" "platforms android–27" "build-tools 27.0.3" You can also use the sdkmanager to list and to install any specific packages needed. This could be a bit unconfortable, but you'll have just to remember to make the changes before running the SDK tool and you'll have no other headaches while updating Android.When executing the above commands, make sure that you replace * with an appropriate version number which you could find in the download page. Obviously, after updating the SDK tools, you have to redo the same changes in the new, updated android.bat batch file. In my case I left the caption as an empty string but you can write there what you want.Īfter the changes, you can start the SDK and the android.bat will be no more waiting, leaving the SDK tool free to play (and rename the ~\tools\ folder without headaches). You can add text in those hyphens and this text will be the caption of the java.exe command window you will see after the changes. Note: Keep the "" in between start and the application path. So I just replaced the "call" command with "start", so that after the change the latest row of my android.bat was: start "" "%java_exe% %REMOTE_DEBUG%" "=%tools_dir%" "=%work_dir%" -classpath "%jar_path% %swt_path%\swt.jar" %* It launches an external program and terminates. It waits for the called external program completion.īut ther's another way to run external programs from a batch file: the "start" command. You can edit the android.bat and see the call in the latest row of this batch: call "%java_exe% %REMOTE_DEBUG%" "=%tools_dir%" "=%work_dir%" -classpath "%jar_path% %swt_path%\swt.jar" %* The problem is that the android.bat runs java to launch swt.jar (the SDK tool), and it remains uselessly waiting for completion of this java program. The basic problem is that the android.bat batch file comes from the ~\tools\ folder and it's still in memory (running) while the same ~\tools\ folder needs to be updated (in our case, renamed). it works for me, even if it is a bit tricky. So I started to find an alternative working way to solve this issue and I found it finally. None of the solutions I found googling the net worked for me up now, but this is a vital job to maintain Android SDK updated. Obviously I have had the same issue and every time the Android tools needs to be updated it's a nightmare. I know this is an old post but I want to write my personal solution to the problem:įailed to rename directory C:\android-sdk\tools to C:\android-sdk\temp\ToolPackage.old01.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |