Which Android sdkmanager version to use?

北慕城南 提交于 2020-07-10 10:25:25

问题


I've followed the steps from Jing Li's answer for this question. My initial directory structure for Android was:

$ tree -L 3 ~/Programs/
~/Programs/
└── Android
    └── cmdline-tools
        └── tools

I added these lines to .bashrc:

export ANDROID_SDK_ROOT=$HOME/Programs/Android
export ANDROID_HOME=$ANDROID_SDK_ROOT
export PATH=$ANDROID_SDK_ROOT/cmdline-tools/tools:$PATH
export PATH=$ANDROID_SDK_ROOT/cmdline-tools/tools/bin:$PATH
export PATH=$ANDROID_SDK_ROOT/cmdline-tools/tools/lib:$PATH
export PATH=$ANDROID_SDK_ROOT/platform-tools:$PATH

Current sdkmanager version:

$ sdkmanager --version
    4.0.1

Installing packages for Android 10:

$ sdkmanager --install "platform-tools" "platforms;android-29" "build-tools;29.0.3"

After installing them I got this structure:

$ tree -L 1 Programs/Android
Programs/Android
├── build-tools
├── cmdline-tools
├── emulator
├── licenses
├── patcher
├── platform-tools
├── platforms
└── tools

$ tree -L 2 Programs/Android/cmdline-tools/
Programs/Android/cmdline-tools/
└── tools
    ├── NOTICE.txt
    ├── bin
    ├── lib
    └── source.properties

$ tree -L 1 Programs/Android/tools/
Programs/Android/tools/
├── NOTICE.txt
├── android
├── bin
├── emulator
├── emulator-check
├── lib
├── mksdcard
├── monitor
├── package.xml
├── proguard
├── source.properties
└── support

As listed above several directories were created, among them tools directory is relevant, if I run the following commands I got:

$ sdkmanager --version
    4.0.1    
$ ./Programs/Android/tools/bin/sdkmanager --version
    26.1.1

Supposedly Programs/Android/tools directory should not exist, what should I do before/during/after installing some packages? Which sdkmanager version should I use? What other modifications should I do?

Thanks in advance.

来源:https://stackoverflow.com/questions/62803346/which-android-sdkmanager-version-to-use

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!