我正在使用https://build.phonegap.com来构建我的apk和ipa文件。
我创建了zip包并更新它,然后我下载了apk / ipa。
从今天起我遇到了麻烦:apk文件未编译,我可以在日志中看到错误(生成ipa时)。
注意我在Android设置上没有任何改变,我认为有一个Android更新导致了这一点。
Phonegap日志说(这只是预告片):
建立失败
总时间:4.069秒
错误:/ gradlew:命令失败,退出代码为1错误输出:注意:某些输入文件使用或覆盖已弃用的API。
注意:使用-Xlint重新编译:弃用以获取详细信息。
注意:某些输入文件使用或覆盖已弃用的API。
注意:使用-Xlint重新编译:弃用以获取详细信息。
错误:在FontFamilyFont中,无法找到属性android:font
错误:在FontFamilyFont中,无法找到属性android:fontStyle
错误:在FontFamilyFont中,无法找到属性android:fontVariationSettings
错误:在FontFamilyFont中,无法找到属性 android:fontWeight错误:在FontFamilyFont中, 无法找到属性android:ttcIndex
失败:构建因异常而失败。
- 出了什么问题:任务执行失败':processDebugResources'。
com.android.ide.common.process.ProcessException:无法执行aapt
我使用DevExtreme,一个基于Phonegap的平台,所以纯手机版的工作解决方案也应该适用于我的项目。
我的config.xml是
<widget id="com.devexpress.apptemplate" version="1.0" versionCode="1">
<name>ApplicationTemplate</name>
<description>Template</description>
<author email="info@info.com" href="http://www.info.com/">Info</author>
<preference name="permissions" value="none" />
<preference name="prerendered-icon" value="true" />
<preference name="phonegap-version" value="cli-7.0.1" />
<icon src="icon/ios/icon.png" width="1024" height="1024" />
<preference name="android-windowSoftInputMode" value="adjustPan" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="FadeSplashScreen" value="false" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarStyle" value="default" />
<feature name="StatusBar">
<param name="ios-package" value="CDVStatusBar" onload="true" />
</feature>
<preference name="StatusBarBackgroundColor" value="#000000" />
<preference name="android-minSdkVersion" value="15" />
<preference name="android-targetSdkVersion" value="26" />
<platform name="android">
<resource-file src="google-services.json" target="google-services.json" />
</platform>
<platform name="ios">
<resource-file src="GoogleService-Info.plist" />
</platform>
<plugin name="cordova-plugin-geolocation" spec="2.4.1" />
<plugin name="cordova-plugin-inappbrowser" />
<plugin name="cordova-plugin-splashscreen" onload="true" />
<plugin name="cordova-plugin-whitelist" />
<plugin name="cordova-plugin-ios-longpress-fix" />
<!--<plugin name="cordova-plugin-statusbar" onload="true" />-->
<plugin name="phonegap-plugin-push" spec="2.0.0" />
<plugin spec="https://github.com/Telerik-Verified-Plugins/BarcodeScanner.git" source="git">
<param name="CAMERA_USAGE_DESCRIPTION" value="To scan barcodes." />
</plugin>
<plugin name="cordova-plugin-camera" spec="^2.4.1" source="npm">
<variable name="CAMERA_USAGE_DESCRIPTION" value="This app requires access to take picture and send them, if needed." />
<variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="This app requires access to the photo library to send them, if needed." />
</plugin>
<access origin="*" />
<!--<engines>
<engine name="android" spec="^6.3.0" />
</engines>-->
</widget>
答案 0 :(得分:1)
我找到了解决这个问题的神奇技巧。
我在config.xml中添加了这个:
<plugin name="cordova-android-support-gradle-release">
<variable name="ANDROID_SUPPORT_VERSION" value="26.0.0"/>
</plugin>
并将targetSdkVersion更改为26:
<preference name="android-targetSdkVersion" value="26"/>