错误信息:
......
D:\project\eyeshot\eyeshot\Source3\platforms\android\build\intermediates\manifests\full\debug\AndroidManifest.xml:46: AAPT: No resource identifier found for attribute 'appComponentFactory' in package 'android'
:processDebugResources FAILED
BUILD FAILED
Total time: 14.125 secs
D:\project\eyeshot\eyeshot\Source3\platforms\android\build\intermediates\manifests\full\debug\AndroidManifest.xml:46: error: No resource identifier found for attribute 'appComponentFactory' in package 'android'
FAILURE: Build failed with an exception.
* What went wrong:
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.
cmd: Command failed with exit code 1 Error output:
D:\project\eyeshot\eyeshot\Source3\platforms\android\build\intermediates\manifests\full\debug\AndroidManifest.xml:46: AAPT: No resource identifier found for attribute 'appComponentFactory' in package 'android'
D:\project\eyeshot\eyeshot\Source3\platforms\android\build\intermediates\manifests\full\debug\AndroidManifest.xml:46: error: No resource identifier found for attribute 'appComponentFactory' in package 'android'
FAILURE: Build failed with an exception.
* What went wrong:
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.
[ERROR] An error occurred while running subprocess cordova.
cordova run android --device exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
......
解决办法:
修改project.properties文件:
增加cordova.system.library.8=com.android.support:support-annotations:27.+
执行命令:
cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27.+
参考: