Я использую Ubuntu 18.04, и я изучаю реакционную систему.
Вместо установки Android Studio я установил Genymotion в качестве эмулятора Android для тестирования и установил Android SDK, используя sudo apt-get install android-sdk
После установки собственных инструментов реагирования и реагирования я создал новый проект реагирования и попытался запустить его, не затрагивая ни одного кода, и у меня появляется следующая ошибка
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 863 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Installing the app...
> Configure project :app
Observed package id 'build-tools;debian' in inconsistent location '/usr/lib/android-sdk/build-tools/27.0.1' (Expected '/usr/lib/android-sdk/build-tools/debian')
Observed package id 'build-tools;debian' in inconsistent location '/usr/lib/android-sdk/build-tools/27.0.1' (Expected '/usr/lib/android-sdk/build-tools/debian')
Checking the license for package Android SDK Build-Tools 28.0.3 in /usr/lib/android-sdk/licenses
Warning: License for package Android SDK Build-Tools 28.0.3 not accepted.
Checking the license for package Android SDK Platform 28 in /usr/lib/android-sdk/licenses
Warning: License for package Android SDK Platform 28 not accepted.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;28.0.3 Android SDK Build-Tools 28.0.3
platforms;android-28 Android SDK Platform 28
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: /usr/lib/android-sdk
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
error Failed to install the app. Please accept all necessary SDK licenses using SDK Manager: "$ANDROID_HOME/tools/bin/sdkmanager --licenses". Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;28.0.3 Android SDK Build-Tools 28.0.3
platforms;android-28 Android SDK Platform 28
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: /usr/lib/android-sdk
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
at checkExecSyncError (child_process.js:629:11)
at execFileSync (child_process.js:647:13)
at runOnAllDevices (/home/arilanto/Documents/srcs/native/rdrxn/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:74:39)
at buildAndRun (/home/arilanto/Documents/srcs/native/rdrxn/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:158:41)
at then.result (/home/arilanto/Documents/srcs/native/rdrxn/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:125:12)
at process._tickCallback (internal/process/next_tick.js:68:7)
Ошибкав сообщении предлагается использовать /usr/lib/android-sdk/tools/bin/sdkmanager --licenses
, но такого файла или символической ссылки нет
$ ls -la /usr/lib/android-sdk/tools/bin/
total 8
drwxr-xr-x 2 root root 4096 sept. 25 10:11 .
drwxr-xr-x 4 root root 4096 sept. 25 10:11 ..
lrwxrwxrwx 1 root root 12 mars 11 2019 e2fsck -> /sbin/e2fsck
lrwxrwxrwx 1 root root 15 mars 11 2019 fsck.ext4 -> /sbin/fsck.ext4
lrwxrwxrwx 1 root root 15 mars 11 2019 mkfs.ext4 -> /sbin/mkfs.ext4
lrwxrwxrwx 1 root root 15 mars 11 2019 resize2fs -> /sbin/resize2fs
lrwxrwxrwx 1 root root 27 mars 11 2019 screenshot2 -> ../../../../bin/screenshot2
lrwxrwxrwx 1 root root 13 mars 11 2019 tune2fs -> /sbin/tune2fs
Можно ли завершить установку android-sdk, скопировав файлы от кого-то, кто установил Android Studio на свою Ubuntu, или установить Android Studio?вообще и поменять мой путь?