A
A
Apstrew2021-12-03 20:35:36
Mobile development
Apstrew, 2021-12-03 20:35:36

Why doesn't Gradle see that I have accepted licenses in the Android SDK manager?

The React Native app runs fine on a physical device via expo. I'm trying to make a debug version of an apk.

The first step worked:

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res


Next, I go to the subfolder (cd android)

And - plug - VS code command ./gradlew assembleDebug does not work. Issues see below:
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
     patcher;v4 SDK Patch Applier v4
     platforms;android-30 Android SDK Platform 30
     emulator Android Emulator
     tools Android SDK Tools
     build-tools;29.0.2 Android SDK Build-Tools 29.0.2
     platform-tools Android SDK Platform-Tools
  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: C:\Program Files\Android\Android Studio


While I went to C:\Users\1\AppData\Local\Android\Sdk\cmdline-tools\latest\bin
and accepted all licenses with the sdkmanager.bat --licenses command, see below.
61aa5297e16e2206002822.jpeg

ANDROID_HOME I have C:\Users\1\AppData\Local\android\Sdk

How can I build apk?

Thank you!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question