NativeScript / NativeScript/nativescript-cli

WARNING: The Android SDK is not installed or is not configured properly.

Đang mở
#4,265 3 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

bug severity: medium
Ngôn ngữ chính
JavaScript
Star
1.1k
Fork
204
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
8

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với điểm vào tns doctor và tái hiện báo cáo bằng các phiên bản Ubuntu, Node.js, Java, NativeScript và Android SDK được liệt kê trong issue. So sánh các bước kiểm tra đã đạt với cảnh báo riêng về trình giả lập native và kiểm tra các yêu cầu thiết lập Android SDK được liên kết trong báo cáo. Được xem là hoàn tất khi hành vi của cảnh báo được giải thích và chẩn đoán phản ánh chính xác cấu hình.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
android, java, javascript, node.js
Lĩnh vực
cli, devtools, mobile
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.