ionic-cli: Output file does not match expected format:
Description
First time configuring and running android application on a mac. When running the command, ionic cordova run android --verbose, build is successful but fail to parse the output file and run simulator. Please provide an insight to resolve this issue.
Steps to Reproduce: run command ionic cordova run android --verbose
Output: Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use ‘–warning-mode all’ to show the individual deprecation warnings. See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 1s 39 actionable tasks: 39 up-to-date Command finished with error code 0: /Users/xy/devproj/platforms/android/gradlew cdvBuildDebug,-b,/Users/xy/devproj/platforms/android/build.gradle Built the following apk(s): /Users/xy/devproj/platforms/android/app/build/outputs/apk/debug/app-debug.apk No scripts found for hook “after_compile”. No scripts found for hook “after_build”. ionic:lib:cordova:project Output file does not match expected format: { ionic:lib:cordova:project version: 1, ionic:lib:cordova:project artifactType: { type: ‘APK’, kind: ‘Directory’ }, ionic:lib:cordova:project applicationId: ‘io.ionic.starter’, ionic:lib:cordova:project variantName: ‘debug’, ionic:lib:cordova:project elements: [ ionic:lib:cordova:project { ionic:lib:cordova:project type: ‘SINGLE’, ionic:lib:cordova:project filters: [], ionic:lib:cordova:project properties: [], ionic:lib:cordova:project versionCode: 1, ionic:lib:cordova:project versionName: ‘1’, ionic:lib:cordova:project enabled: true, ionic:lib:cordova:project outputFile: ‘app-debug.apk’ ionic:lib:cordova:project } ionic:lib:cordova:project ] ionic:lib:cordova:project } +0ms [ERROR] Could not parse build output file: /Users/xy/devproj/platforms/android/app/build/outputs/apk/debug/output.json ionic:utils-process onBeforeExit handler: ‘process.exit’ received +0ms ionic:utils-process onBeforeExit handler: running 2 functions +0ms ionic:utils-process processExit: exiting (exit code: 1) +19ms
My ionic info
:
Ionic:
Ionic CLI : 6.10.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.1.1
@angular-devkit/build-angular : 0.901.7
@angular-devkit/schematics : 9.1.7
@angular/cli : 9.1.7
@ionic/angular-toolkit : 2.2.0
Cordova: Cordova CLI : 9.0.0 (cordova-lib@9.0.1) Cordova Platforms : android 8.1.0, ios 5.1.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 4 other plugins)
Utility: cordova-res : 0.14.0 native-run : 1.0.0
System: Android SDK Tools : 26.1.1 (/Users/xx/Library/Android/sdk) ios-deploy : 1.10.0 ios-sim : 8.0.2 NodeJS : v12.18.0 (/usr/local/bin/node) npm : 6.14.4 OS : macOS Catalina Xcode : Xcode 11.5 Build version 11E608c
Other Information:
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 16 (6 by maintainers)
Commits related to this issue
- fix(cordova): handle new format of output.json files for Android builds fixes https://github.com/ionic-team/ionic-cli/issues/4467 — committed to ionic-team/ionic-cli by imhoffd 4 years ago
- fix(cordova): handle new format of output.json files for Android builds (#4470) fixes https://github.com/ionic-team/ionic-cli/issues/4467 — committed to ionic-team/ionic-cli by imhoffd 4 years ago
Okay, 6.10.1 is out! Please let me know if you run into any more issues. Thanks! 💙
Excellent @dwieeb! Your changes on the latest Ionic CLI build 6.10.1 works. Thanks