Error generating APK using Quasar framework

Asked

Viewed 359 times

1

I am trying to generate the APK of an application made with Quasar Framework, but I get the following error:

$ quasar build -m cordova -T android

Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=/usr/lib/android-sdk (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

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

Information from the Cor:

$ cordova requirements

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: not installed 
android: Command failed with exit code ENOENT
Gradle: installed /usr/share/gradle/bin/gradle

I tried to install Android target, but still no success.

someone has been through the same problem?

  • Looks like you have to use the Android Studio SDK Manager to accept the license and install SDK Platform and Build-Tools

  • 1

    Opa, already installed the SDK and Build-Tools

1 answer

1

If the problem is only the license you can try to accept by running the SDK Manager android Studio. (update/install a new SDK can make the license accept menu appear)

Imagem SDK Manage no android studio

Or try via Command-line using sdkmanager --licenses:
(may be the option --licenses is deprecated, my sdkmanager still works)

  • Enter the directory of android-sdk (in your case seems to be /usr/lib/android-sdk);

     $ cd /usr/lib/android-sdk
    
  • Within the directory of android-sdk enter the directory tools/bin

     $ cd tools/bin
    
  • Accept the licenses, run the sdkmanager passing as parameter --licenses for it shows the licenses.

     $ ./sdkmanager --licenses
    

Another possibility

You can be with 2 or + places like the android-sdk.
Example: Your Android Studio is using android-sdk which is in your directory /home/nomeDoUsuario and Quasar/Cordova using the android-sdk that is in the directory /usr/lib/android-sdk.

If this is the case you will have to adjust this to use only 1, or accept the license/install the SDK Platform and Build-Tools in the android 2/+ -sdk

Android Studio - Command line tools

  • 1

    well, I ran . /sdkmanager --licenses , I accepted the licenses, but when I went to generate again the APK gave the same error again. I will check if you are with the 2 or + locations the android-sdk.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.