NativeScript / NativeScript/nativescript-cli
WARNING: The Android SDK is not installed or is not configured properly.
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 1.1k
- 分支
- 204
- 平均合併
- 1 天 9 小時
- 30 天內合併 PR
- 8
描述
I followed all instructions in this official page NativeScript Advanced Setup: Linux.
I only got stuck at this step:
sudo apt-get install lib32z1 lib32ncurses5 libbz2-1.0:i386 libstdc++6:i386
for which I had to first run:
sudo dpkg --add-architecture i386
Regarding emulators, I chose genymotion. (did not install avd)
Now, after installing everything, here are all relevant environment settings/info I could get:
$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
$ node -v
v8.10.0
$ javac -version
javac 1.8.0_191
# installed latest android packages for Android 28
$ sudo $ANDROID_HOME/tools/bin/sdkmanager "tools" "emulator" "platform-tools" "platforms;android-28" "build-tools;28.0.3" "extras;android;m2repository" "extras;google;m2repository"
$ ls /opt/android-sdk
build-tools emulator extras licenses patcher platform-tools platforms tools
$ echo $PATH
/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/opt/android-sdk/tools/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
$ adb version
Android Debug Bridge version 1.0.40
Version 4986621
Installed as /opt/android-sdk/platform-tools/adb
$ tns --version
5.1.0
$ node
> process.env.ANDROID_HOME
`/opt/android-sdk`
> process.env.JAVA_HOME
'/usr/lib/jvm/java-8-oracle'
$ echo $ANDROID_HOME
/opt/android-sdk
$ echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle
Now I finally check tns doctor...
There seem to be issues with your configuration.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 5.1.0 version and is up to date.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
✖ WARNING: The Android SDK is not installed or is not configured properly.
You will not be able to run your apps in the native emulator. To be able to run apps
in the native Android emulator, verify that you have installed the latest Android SDK
and its dependencies as described in http://developer.android.com/sdk/index.html#Requirements
As you can see, tns doctor says everything is fine... but not really.
Precisely, I don't get the
"✔ A compatible Android SDK for compilation is found."
Vs
"✖ WARNING: The Android SDK is not installed or is not configured properly."
Is that even possible ?
Any idea of any further investigations I should do ?
P.S: please, this is not the same problem as #3585 where adb is clearly in cause... #3585 title should be : "WARNING: adb from the Android SDK is not installed or is not configured properly." which is quite different
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 tns doctor 進入點開始,使用 issue 中列出的 Ubuntu、Node.js、Java、NativeScript 和 Android SDK 版本重現報告。比較通過的檢查與獨立的 native 模擬器警告,並檢查報告中連結的 Android SDK 設定需求。當警告的行為獲得解釋,且診斷結果準確反映設定時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- android, java, javascript, node.js
- 領域
- cli, devtools, mobile
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100