"compileSdkVersion is not specified" when running cordova run android

Re: "compileSdkVersion is not specified" when running cordova run android

by Dhammika Dolawattha -
Number of replies: 1

Hi,

when use "cordova run android" following lines are displaying. But when installing apk file on a real device it is only showing splash. Which cordova plugin should install and how they install?.


C:\Users\Admin>cd c:\moodlemobiledirectory


c:\moodlemobiledirectory>cordova run android

Android Studio project detected

ANDROID_HOME=C:\Users\Admin\AppData\Local\Android\sdk

JAVA_HOME=C:\Program Files\java\jdk1.8.0_181

studio

Subproject Path: CordovaLib

Subproject Path: app

publishNonDefault is deprecated and has no effect anymore. All variants are now published.

Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

        at build_1pfka4hu16y6wfhslc8rbjyuj.run(C:\moodlemobiledirectory\platforms\android\app\build.gradle:144)

:CordovaLib:preBuild UP-TO-DATE

:CordovaLib:preDebugBuild UP-TO-DATE

:CordovaLib:compileDebugAidl UP-TO-DATE

:CordovaLib:compileDebugRenderscript UP-TO-DATE

:CordovaLib:checkDebugManifest UP-TO-DATE

:CordovaLib:generateDebugBuildConfig UP-TO-DATE

:CordovaLib:prepareLintJar UP-TO-DATE

:CordovaLib:generateDebugResValues UP-TO-DATE

:CordovaLib:generateDebugResources UP-TO-DATE

:CordovaLib:packageDebugResources UP-TO-DATE

:CordovaLib:platformAttrExtractor UP-TO-DATE

:CordovaLib:processDebugManifest UP-TO-DATE

:CordovaLib:processDebugResources UP-TO-DATE

:CordovaLib:generateDebugSources UP-TO-DATE

:CordovaLib:javaPreCompileDebug UP-TO-DATE

:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE

:CordovaLib:processDebugJavaRes NO-SOURCE

:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE

:app:preBuild UP-TO-DATE

:app:preDebugBuild UP-TO-DATE

:app:compileDebugAidl UP-TO-DATE

:CordovaLib:packageDebugRenderscript NO-SOURCE

:app:compileDebugRenderscript UP-TO-DATE

:app:checkDebugManifest UP-TO-DATE

:app:generateDebugBuildConfig UP-TO-DATE

:app:prepareLintJar UP-TO-DATE

:app:generateDebugResValues UP-TO-DATE

:app:generateDebugResources UP-TO-DATE

:app:mergeDebugResources UP-TO-DATE

:app:createDebugCompatibleScreenManifests UP-TO-DATE

:app:processDebugManifest UP-TO-DATE

:app:splitsDiscoveryTaskDebug UP-TO-DATE

:app:processDebugResources UP-TO-DATE

:app:generateDebugSources UP-TO-DATE

:app:javaPreCompileDebug UP-TO-DATE

:app:compileDebugJavaWithJavac UP-TO-DATE

:app:compileDebugNdk NO-SOURCE

:app:compileDebugSources UP-TO-DATE

:CordovaLib:mergeDebugShaders UP-TO-DATE

:CordovaLib:compileDebugShaders UP-TO-DATE

:CordovaLib:generateDebugAssets UP-TO-DATE

:CordovaLib:mergeDebugAssets UP-TO-DATE

:app:mergeDebugShaders UP-TO-DATE

:app:compileDebugShaders UP-TO-DATE

:app:generateDebugAssets UP-TO-DATE

:app:mergeDebugAssets UP-TO-DATE

:app:transformClassesWithStackFramesFixerForDebug UP-TO-DATE

:app:transformClassesWithDesugarForDebug UP-TO-DATE

:app:transformClassesWithDexBuilderForDebug UP-TO-DATE

:app:transformDexArchiveWithExternalLibsDexMergerForDebug UP-TO-DATE

:app:transformDexArchiveWithDexMergerForDebug UP-TO-DATE

:CordovaLib:compileDebugNdk NO-SOURCE

:CordovaLib:mergeDebugJniLibFolders UP-TO-DATE

:CordovaLib:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE

:CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE

:app:mergeDebugJniLibFolders UP-TO-DATE

:app:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE

:app:processDebugJavaRes NO-SOURCE

:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE

:app:validateSigningDebug

:app:packageDebug UP-TO-DATE

:app:assembleDebug UP-TO-DATE

:app:cdvBuildDebug UP-TO-DATE


BUILD SUCCESSFUL in 25s

46 actionable tasks: 1 executed, 45 up-to-date

Built the following apk(s):

        c:\moodlemobiledirectory\platforms\android\app\build\outputs\apk\debug\app-debug.apk

ANDROID_HOME=C:\Users\Admin\AppData\Local\Android\sdk

JAVA_HOME=C:\Program Files\java\jdk1.8.0_181

No target specified and no devices found, deploying to emulator

No emulator specified, defaulting to Nexus_5X_Edited_API_26

Waiting for emulator to start...

(node:11660) UnhandledPromiseRejectionWarning: CordovaError: Failed to execute shell command "getprop,dev.bootcomplete"" on device: Error: C:\Users\Admin\AppData\Local\Android\sdk\platform-tools\adb.exe: Command failed with exit code 1 Error output:

error: device still connecting

    at c:\moodlemobiledirectory\platforms\android\cordova\lib\Adb.js:88:25

    at _rejected (c:\moodlemobiledirectory\platforms\android\cordova\node_modules\q\q.js:864:24)

    at c:\moodlemobiledirectory\platforms\android\cordova\node_modules\q\q.js:890:30

    at Promise.when (c:\moodlemobiledirectory\platforms\android\cordova\node_modules\q\q.js:1142:31)

    at Promise.promise.promiseDispatch (c:\moodlemobiledirectory\platforms\android\cordova\node_modules\q\q.js:808:41)

    at c:\moodlemobiledirectory\platforms\android\cordova\node_modules\q\q.js:624:44

    at runSingle (c:\moodlemobiledirectory\platforms\android\cordova\node_modules\q\q.js:137:13)

    at flush (c:\moodlemobiledirectory\platforms\android\cordova\node_modules\q\q.js:125:13)

    at process._tickCallback (internal/process/next_tick.js:61:11)

(node:11660) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

(node:11660) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.