我正在尝试构建一个phonegap应用,但是在构建过程中,我收到构建错误
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processReleaseResources'.
> 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 FAILED
Total time: 2.458 secs
Error: /project/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/project/build/intermediates/manifests/full/release/AndroidManifest.xml:56: AAPT: No resource identifier found for attribute 'appComponentFactory' in package 'android'
/project/build/intermediates/manifests/full/release/AndroidManifest.xml:56: error: No resource identifier found for attribute 'appComponentFactory' in package 'android'
此外,有些奇怪的事是日志中的应用程序属性向我显示了
--------------------------------------------------------------------------------
PROJECT PROPERTIES
--------------------------------------------------------------------------------
# Project target.
target=android-25
实际上是在config.xml文件中写的
<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="27" />
,并在错误清单之前的编译输出末尾显示
:processReleaseResources/project/build/intermediates/manifests/full/release/AndroidManifest.xml:56: AAPT: No resource identifier found for attribute 'appComponentFactory' in package 'android'
/project/build/intermediates/manifests/full/release/AndroidManifest.xml:56: error: No resource identifier found for attribute 'appComponentFactory' in package 'android'
希望你们能帮助我提前解决这个问题
编辑: config.xml文件
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.sevivol.com" version="1.7" android-versionCode="7" ios-CFBundleVersion="1" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<name>APP SEVICOL</name>
<description>Aplicacón Exclusiva de Sevicol en la que pueden interactuar, funcionarios, clientes, proveedores.
</description>
<author email="apps@programig.com.co" href="http://www.programing.com.co">
Programing Web Software
</author>
<content src="index.html" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="false" />
<preference name="webviewbounce" value="true" />
<preference name="stay-in-webview" value="false" />
<preference name="detect-data-types" value="true" />
<preference name="orientation" value="portrait"/>
<preference name="StatusBarOverlaysWebView" value="true" />
<preference name="StatusBarBackgroundColor" value="#173c59" />
<preference name="prerendered-icon" value="true" />
<preference name="deployment-target" value="7.0" />
<preference name="exit-on-suspend" value="false" />
<!-- Android only -->
<preference name="android-build-tool" value="ant|gradle" />
<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="27" />
<preference name="android-installLocation" value="auto" />
<preference name="android-windowSoftInputMode" value="stateHidden|adjustResize" />
<preference value="true" name="KeyboardShrinksView"/>
<plugin name="cordova-android-support-gradle-release" source="npm" spec="2.0.1"/>
<variable name="ANDROID_SUPPORT_VERSION" value="27.+" />
</plugin>
<plugin name="cordova-plugin-camera" source="npm" spec="~2.1.1"/>
<plugin name="cordova-plugin-media-capture" source="npm" spec="~1.2.0"/>
<plugin name="cordova-plugin-console" source="npm" spec="~1.0.2"/>
<plugin name="cordova-plugin-contacts" source="npm" spec="~2.0.1"/>
<plugin name="cordova-plugin-device" source="npm" spec="~1.1.1"/>
<plugin name="cordova-plugin-device-motion" source="npm" spec="~1.2.0"/>
<plugin name="cordova-plugin-device-orientation" source="npm" spec="~1.0.2"/>
<plugin name="cordova-plugin-dialogs" source="npm" spec="~1.2.0"/>
<plugin name="cordova-plugin-geolocation" source="npm" spec="~2.1.0"/>
<plugin name="cordova-plugin-globalization" source="npm" spec="~1.0.3"/>
<plugin name="cordova-plugin-inappbrowser" source="npm" spec="~1.3.0"/>
<plugin name="cordova-plugin-media" source="npm" spec="~2.2.0"/>
<plugin name="cordova-plugin-network-information" source="npm" spec="~1.2.0"/>
<plugin name="cordova-plugin-splashscreen" source="npm" spec="~3.2.1"/>
<plugin name="cordova-plugin-statusbar" source="npm" spec="~2.1.2"/>
<plugin name="cordova-plugin-vibration" source="npm" spec="~2.1.0"/>
<plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1"/>
<plugin name="cordova-plugin-android-permissions" source="npm" spec="1.0.0"/>
<plugin name="cordova-plugin-ios-camera-permissions" source="npm" spec="~1.2.0"/>
<plugin name="cordova-plugin-ios-microphone-permissions" source="npm" spec="1.0.0"/>
<plugin name="cordova-plugin-file-opener2" source="npm" spec="~2.0.0"/>
<plugin name="cordova-plugin-document-viewer" source="npm" spec="0.9.8"/>
<plugin name="cordova-plugin-video-thumbnail" source="npm" spec="2.0.1"/>
<plugin name="phonegap-plugin-push" source="npm" spec="~1.8.0" >
<variable name="SENDER_ID" value="775250811773" />
</plugin>
<feature name="http://api.phonegap.com/1.0/network" />
<feature name="NetworkStatus">
<param name="ios-package" value="CDVConnection" />
</feature>
<feature name="Camera">
<param name="android-package" value="org.apache.cordova.camera.CameraLauncher" />
</feature>
<feature name="Camera">
<param name="ios-package" value="CDVCamera" />
</feature>
<access origin="*" />
<plugin name="cordova-plugin-whitelist" />
<allow-intent href="https://maps.googleapis.com/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<allow-intent href="market:*" />
<icon src="res/icon.png" />
<splash src="res/splash.gif" />
<platform name="android">
<icon src="res/icon/android/mipmap-ldpi/ic_launcher.png" density="ldpi" />
<icon src="res/icon/android/mipmap-mdpi/ic_launcher.png" density="mdpi" />
<icon src="res/icon/android/mipmap-hdpi/ic_launcher.png" density="hdpi" />
<icon src="res/icon/android/mipmap-xhdpi/ic_launcher.png" density="xhdpi" />
<icon src="res/icon/android/mipmap-xxhdpi/ic_launcher.png" density="xxhdpi" />
<icon src="res/icon/android/mipmap-xxxhdpi/ic_launcher.png" density="xxxhdpi" />
</platform>
<platform name="ios">
<icon src="res/icon/ios/AppIcon.appiconset/Icon-App-60x60@3x.png" width="180" height="180" />
<icon src="res/icon/ios/AppIcon.appiconset/Icon-App-60x60@1x.png" width="60" height="60" />
<icon src="res/icon/ios/AppIcon.appiconset/Icon-App-60x60@2x.png" width="120" height="120" />
<icon src="res/icon/ios/AppIcon.appiconset/Icon-App-76x76@1x.png" width="76" height="76" />
<icon src="res/icon/ios/AppIcon.appiconset/Icon-App-76x76@2x.png" width="152" height="152" />
<icon src="res/icon/ios/AppIcon.appiconset/Icon-App-40x40@1x.png" width="40" height="40" />
<icon src="res/icon/ios/AppIcon.appiconset/Icon-App-40x40@2x.png" width="80" height="80" />
<!--<icon src="res/icon/ios/AppIcon.appiconset/icon.png" width="57" height="57" />
<icon src="res/icon/ios/AppIcon.appiconset/icon@2x.png" width="114" height="114" />-->
<icon src="res/icon/ios/AppIcon.appiconset/Icon-App-72x72@1x.png" width="72" height="72" />
<icon src="res/icon/ios/AppIcon.appiconset/Icon-App-72x72@2x.png" width="144" height="144" />
<!--<icon src="res/icon/ios/AppIcon.appiconset/icon-small.png" width="29" height="29" />
<icon src="res/icon/ios/AppIcon.appiconset/icon-small@2x.png" width="58" height="58" />-->
<icon src="res/icon/ios/AppIcon.appiconset/Icon-Small-50x50@1x.png" width="50" height="50" />
<icon src="res/icon/ios/AppIcon.appiconset/Icon-Small-50x50@2x.png" width="100" height="100" />
</platform>
</widget>