Skip to content

Instantly share code, notes, and snippets.

@psturc
Created June 18, 2018 13:14
Show Gist options
  • Select an option

  • Save psturc/f7c82c839a8764b0a565c79b5dcc3932 to your computer and use it in GitHub Desktop.

Select an option

Save psturc/f7c82c839a8764b0a565c79b5dcc3932 to your computer and use it in GitHub Desktop.
Cannot build Cordova Showcase App - Android / iOS
λ ~/work/aerogear/aerogear-js-sdk/cordova-example/ master* npm run ionic:android
> cordova-showcase-template@0.0.1 ionic:android /Users/psturc/work/aerogear/aerogear-js-sdk/cordova-example
> ionic cordova run android
> cordova platform add android --save
Using cordova-fetch for cordova-android@7.1.0
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: org.aerogear.js.showcase
Name: AeroGear_Cordova_Showcase
Activity: MainActivity
Android target: android-27
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@7.1.0
Android Studio project detected
Android Studio project detected
Installing "cordova-plugin-aerogear-metrics" for android
Plugin dependency "cordova-plugin-device@2.0.2" already fetched, using that version.
Installing "cordova-plugin-device" for android
Plugin dependency "cordova-plugin-app-version@0.1.9" already fetched, using that version.
Installing "cordova-plugin-app-version" for android
Installing "cordova-plugin-aerogear-push" for android
Plugin dependency "phonegap-plugin-push@2.2.3" already fetched, using that version.
Installing "phonegap-plugin-push" for android
Installing "cordova-support-google-services" for android
Subproject Path: CordovaLib
Subproject Path: app
Installing "phonegap-plugin-multidex" for android
Subproject Path: CordovaLib
Subproject Path: app
Subproject Path: CordovaLib
Subproject Path: app
Installing "cordova-plugin-aerogear-security" for android
Plugin dependency "cordova-plugin-iroot@0.7.0" already fetched, using that version.
Installing "cordova-plugin-iroot" for android
Subproject Path: CordovaLib
Subproject Path: app
Plugin dependency "cordova-plugin-device@2.0.2" already fetched, using that version.
Dependent plugin "cordova-plugin-device" already installed on android.
Plugin dependency "cordova-plugin-is-debug@1.0.0" already fetched, using that version.
Installing "cordova-plugin-is-debug" for android
Failed to install 'cordova-plugin-aerogear-security': CordovaError: Version of installed plugin: "cordova-plugin-pincheck@0.0.1" does not satisfy dependency plugin requirement "cordova-plugin-pincheck@^0.0.5". Try --force to use installed plugin as dependency.
at /Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:557:37
at _fulfilled (/Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:749:13)
at /Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:509:49
at flush (/Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:75892) UnhandledPromiseRejectionWarning: CordovaError: Version of installed plugin: "cordova-plugin-pincheck@0.0.1" does not satisfy dependency plugin requirement "cordova-plugin-pincheck@^0.0.5". Try --force to use installed plugin as dependency.
at /Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:557:37
at _fulfilled (/Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:749:13)
at /Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:509:49
at flush (/Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:75892) 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:75892) [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.
Running app-scripts build: --platform android --target cordova
[15:02:12] build dev started ...
[15:02:12] clean started ...
[15:02:12] clean finished in 11 ms
[15:02:12] copy started ...
[15:02:12] deeplinks started ...
[15:02:12] deeplinks finished in 165 ms
[15:02:12] transpile started ...
[15:02:20] transpile finished in 8.31 s
[15:02:20] preprocess started ...
[15:02:20] preprocess finished in 1 ms
[15:02:20] webpack started ...
[15:02:21] copy finished in 8.84 s
[15:02:31] webpack finished in 10.95 s
[15:02:31] sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[15:02:34] sass finished in 2.08 s
[15:02:34] postprocess started ...
[15:02:34] postprocess finished in 7 ms
[15:02:34] lint started ...
[15:02:34] build dev finished in 21.93 s
> cordova run android
Android Studio project detected
Discovered plugin "@aerogear/cordova-plugin-aerogear-metrics" in config.xml. Adding it to the project
Plugin "cordova-plugin-aerogear-metrics" already installed on android.
Plugin "cordova-plugin-aerogear-metrics" already installed on ios.
Discovered plugin "@aerogear/cordova-plugin-aerogear-security" in config.xml. Adding it to the project
[15:02:41] lint finished in 7.17 s
Installing "cordova-plugin-aerogear-security" for android
Plugin dependency "cordova-plugin-iroot@0.7.0" already fetched, using that version.
Dependent plugin "cordova-plugin-iroot" already installed on android.
Plugin dependency "cordova-plugin-device@2.0.2" already fetched, using that version.
Dependent plugin "cordova-plugin-device" already installed on android.
Plugin dependency "cordova-plugin-is-debug@1.0.0" already fetched, using that version.
Dependent plugin "cordova-plugin-is-debug" already installed on android.
Failed to install 'cordova-plugin-aerogear-security': CordovaError: Version of installed plugin: "cordova-plugin-pincheck@0.0.1" does not satisfy dependency plugin requirement "cordova-plugin-pincheck@^0.0.5". Try --force to use installed plugin as dependency.
at /Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:557:37
at _fulfilled (/Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:749:13)
at /Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:509:49
at flush (/Users/psturc/.nvm/versions/node/v8.11.2/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
Failed to restore plugin "@aerogear/cordova-plugin-aerogear-security" from config.xml. You might need to try adding it again. Error: Version of installed plugin: "cordova-plugin-pincheck@0.0.1" does not satisfy dependency plugin requirement "cordova-plugin-pincheck@^0.0.5". Try --force to use installed plugin as dependency.
Discovered plugin "@aerogear/cordova-plugin-aerogear-push" in config.xml. Adding it to the project
Plugin "cordova-plugin-aerogear-push" already installed on android.
Plugin "cordova-plugin-aerogear-push" already installed on ios.
Discovered plugin "cordova-plugin-aerogear-security" in config.xml. Adding it to the project
Failed to restore plugin "cordova-plugin-aerogear-security" from config.xml. You might need to try adding it again. Error: Error: npm: Command failed with exit code 1 Error output:
npm ERR! code E404
npm ERR! 404 Not found : cordova-plugin-aerogear-security
npm ERR! 404
npm ERR! 404 'cordova-plugin-aerogear-security' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/psturc/.npm/_logs/2018-06-18T13_02_58_899Z-debug.log
ANDROID_HOME=/Users/psturc/Library/Android/sdk/
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
studio
:wrapper
BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed
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_5uo972e1pmi12ge1j0oqfo4m2.run(/Users/psturc/work/aerogear/aerogear-js-sdk/cordova-example/platforms/android/app/build.gradle:146)
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl
:CordovaLib:compileDebugRenderscript
:CordovaLib:checkDebugManifest
:CordovaLib:generateDebugBuildConfig
:CordovaLib:prepareLintJar
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:platformAttrExtractor
:CordovaLib:processDebugManifest
:CordovaLib:javaPreCompileDebug
:CordovaLib:processDebugJavaRes NO-SOURCE
:app:preBuild UP-TO-DATE
:app:preDebugBuild
:app:compileDebugAidl
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript
:app:checkDebugManifest
:app:generateDebugBuildConfig
:app:prepareLintJar
:app:generateDebugResValues
:app:generateDebugResources
:app:processDebugGoogleServices
Parsing json file: /Users/psturc/work/aerogear/aerogear-js-sdk/cordova-example/platforms/android/app/google-services.json
:app:mergeDebugResources
:app:createDebugCompatibleScreenManifests
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:app:processDebugResources
:app:generateDebugSources
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/psturc/work/aerogear/aerogear-js-sdk/cordova-example/platforms/android/app/src/main/java/com/adobe/phonegap/push/PushPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:app:compileDebugNdk
NO-SOURCE
:app:compileDebugSources
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:transformClassesWithStackFramesFixerForDebug
:app:transformClassesWithDesugarForDebug
:app:transformClassesWithDexBuilderForDebug
:app:transformClassesWithMultidexlistForDebug
:app:transformDexArchiveWithDexMergerForDebug
:CordovaLib:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugJniLibFolders
:CordovaLib:transformNativeLibsWithMergeJniLibsForDebug
:CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug
:app:mergeDebugJniLibFolders
:app:transformNativeLibsWithMergeJniLibsForDebug
:app:processDebugJavaRes NO-SOURCE
:app:transformResourcesWithMergeJavaResForDebug
:app:validateSigningDebug
:app:packageDebug
:app:assembleDebug
:app:cdvBuildDebug
BUILD SUCCESSFUL in 1m 23s
47 actionable tasks: 47 executed
Built the following apk(s):
/Users/psturc/work/aerogear/aerogear-js-sdk/cordova-example/platforms/android/app/build/outputs/apk/debug/app-debug.apk
ANDROID_HOME=/Users/psturc/Library/Android/sdk/
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
No target specified, deploying to device 'FA6AB0309809'.
none
Skipping build...
Built the following apk(s):
/Users/psturc/work/aerogear/aerogear-js-sdk/cordova-example/platforms/android/app/build/outputs/apk/debug/app-debug.apk
Using apk: /Users/psturc/work/aerogear/aerogear-js-sdk/cordova-example/platforms/android/app/build/outputs/apk/debug/app-debug.apk
Package name: org.aerogear.js.showcase
LAUNCH SUCCESS
[ERROR] An error occurred while running cordova run android (exit code 1).
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cordova-showcase-template@0.0.1 ionic:android: `ionic cordova run android`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cordova-showcase-template@0.0.1 ionic:android script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment