When I try to build the application " ionic build android
" see the error
below. This error only happens when I install phonegap-plugin-BarcodeScanner
. Anyone know what can this be?
Error: error code 1 for command: /path/to/app/platforms/android/gradlew with args: cdvBuildDebug, -b, /path/to/app/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
Mostly this error happens because the gradle version of your project and the gradle version of a plugin is missmatching.
What you can do is removing the platform and add it again.
Open the project and deny the question from AndroidStudio to upgrade to the newest gradle version.
I think that the problem was solved. What I did was remove a line from myapp-barcodescanner.gradle file. This is the code removed: compile 'com.android.support:support-v4:+'.
Now, it is working normally.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.