Cordova Build Android Fails: Cannot Find Module 'C:[...]\Platforms\Android\Cordova\Lib\Androidstudio'

Failed to install the following Android SDK packages as some licences have not been accepted error

You need to accept the licences before building.

According to Android SDK docs you can use the following command depending on the sdkmanager location: Docs on --licenses option seems to be missing though.

yes | sdkmanager --licenses

GNU/Linux Distributions:

yes | ~/Android/Sdk/tools/bin/sdkmanager --licenses

macOS:

export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home
yes | ~/Library/Android/sdk/tools/bin/sdkmanager --licenses

Windows:

%ANDROID_HOME%/tools/bin/sdkmanager --licenses

Flutter:

> flutter doctor --android-licenses

Could not find cordova integration in the default project

I had the same issue. In fact, with the default project, you have to copy the cordova assets to prepare the native build for mobile.
You can find more info here : Ionic documentation

Try this :

ionic cordova prepare

And then go again with :

ionic serve --devapp


Related Topics



Leave a reply



Submit