2019独角兽企业重金招聘Python工程师标准>>>
这是一个 com.android.support:support-v4
包不合适的错误
phonegap-plugin-barcodescanner
为例。diners-barcodescanner.gradle
文件里面 compile 'com.android.support:support-v4:+'
改为 compile 'com.android.support:support-v4:27+'
应该能好。
Android 目录下面 project.properties
里面也有类似配置。但是一般改插件里面的比较好吧。
➜ A git:(master) ✗ cordova build android
CHCP plugin after prepare hook:config-file set to http://.../www/chcp.json
ANDROID_HOME=/Users/felix/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
Subproject Path: CordovaLib
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_3j0awvevr86fmrv4tdel4mctj.run(/.../platforms/android/build.gradle:143)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:preBuild UP-TO-DATE
... 省略 ...
:processDebugManifest UP-TO-DATE
:processDebugResourcesERROR: In
ERROR: In
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.BUILD FAILEDTotal time: 1.564 secs
(node:31458) UnhandledPromiseRejectionWarning: Error: /.../platforms/android/gradlew: Command failed with exit code 1 Error output:
ERROR: In
ERROR: In
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.at ChildProcess.whenDone (/.../platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)at ChildProcess.emit (events.js:159:13)at maybeClose (internal/child_process.js:943:16)at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
(node:31458) 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:31458) [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.
➜ A git:(master) ✗ cordova build android
CHCP plugin after prepare hook:config-file set to http://.../www/chcp.json
ANDROID_HOME=/Users/felix/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
Subproject Path: CordovaLib
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_3j0awvevr86fmrv4tdel4mctj.run(/.../platforms/android/build.gradle:143)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:preBuild UP-TO-DATE
... 省略 ...
:cdvBuildDebugBUILD SUCCESSFULTotal time: 18.579 secs
Built the following apk(s):/.../platforms/android/build/outputs/apk/android-debug.apk