Issue
When following the official NativeScript installation for Linux (https://docs.nativescript.org/start/ns-setup-linux) you will get to Step 6: Install all packages for the Android SDK Platform 28.
If you just paste the mentioned command into the CLI like this:
sudo $ANDROID_HOME/tools/bin/sdkmanager "tools" "emulator" "platform-tools" "platforms;android-28" "build-tools;28.0.3" "extras;android;m2repository" "extras;google;m2repository"
It will fail with the following warrning:
Warning: Could not create settings
java.lang.IllegalArgumentException
at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.<init>(SdkManagerCliSettings.java:428)
at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.createSettings(SdkManagerCliSettings.java:152)
at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.createSettings(SdkManagerCliSettings.java:134)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:57)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Solution
The solution is to add the following flag to the command --sdk_root=${ANDROID_HOME}
after you have set the ANDROID_HOME environment variable at step 3 (https://docs.nativescript.org/start/ns-setup-linux).
This appears to be a bug with the way sdkmanager locates the SDK installation folder. The whole command then looks like this:
sudo $ANDROID_HOME/tools/bin/sdkmanager --sdk_root=${ANDROID_HOME} "tools" "emulator" "platform-tools" "platforms;android-28" "build-tools;28.0.3" "extras;android;m2repository" "extras;google;m2repository"
Answered By - sunwarr10r
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.