尝试将我的Cordova应用程序升级到Android API 31。我可以编译它,但当我尝试在设备上安装签名版本时,我得到
adb: failed to install xyzzy.apk: Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse /data/app/vmdl2088675470.tmp/base.apk: AndroidManifest.xml]
我编译代码,使用zipalign和apksigner(我已经做了很长时间),然后使用adb安装到设备上。
我尝试了API 31和32。我使用的是cordova 10.0.0、cordova-android 11.0.0、Java 11、构建工具31.0.0和32.0.0、min sdk版本22、gradle 7.6。我已经从设备中删除了应用程序,多次运行"./Gradlew Clean"。我没有更改签名密钥。我下载了我使用的20个左右插件的新鲜副本。
运行"jarsigner-verify"并获得大量输出,似乎签名正确。
我可以在设备上安装未签名的版本,但不能安装签名的版本。
有什么建议吗?
谢谢你,乔恩
我的机器人清单. xml
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="23005" android:versionName="2.30.5" package="com.xyzzy.xyzzy" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:usesCleartextTraffic="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:exported="true" android:label="@string/activity_name" android:launchMode="singleInstance" android:name="MainActivity" android:screenOrientation="portrait" android:theme="@style/Theme.App.SplashScreen" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="@string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementService" />
<service android:exported="false" android:name="org.apache.cordova.firebase.FirebasePluginMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<receiver android:name="org.apache.cordova.firebase.OnNotificationOpenReceiver" />
<activity android:excludeFromRecents="true" android:exported="true" android:name="org.apache.cordova.firebase.OnNotificationReceiverActivity" android:noHistory="true" android:taskAffinity="" android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/accent" />
<meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="@string/default_notification_channel_id" />
<meta-data android:name="firebase_analytics_collection_enabled" android:value="true" />
<meta-data android:name="firebase_performance_collection_enabled" android:value="true" />
<meta-data android:name="firebase_crashlytics_collection_enabled" android:value="true" />
<meta-data android:name="firebase_messaging_auto_init_enabled" android:value="true" />
<provider android:authorities="${applicationId}.emailcomposer.provider" android:exported="false" android:grantUriPermissions="true" android:name="de.appplant.cordova.emailcomposer.Provider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/emailcomposer_provider_paths" />
</provider>
<provider android:authorities="${applicationId}.localnotifications.provider" android:exported="false" android:grantUriPermissions="true" android:name="de.appplant.cordova.plugin.notification.util.AssetProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/localnotification_provider_paths" />
</provider>
<receiver android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.TriggerReceiver" />
<receiver android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.ClearReceiver" />
<activity android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.ClickReceiver" android:theme="@style/Theme.AppCompat.NoActionBar" />
<receiver android:directBootAware="true" android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.RestoreReceiver">
<intent-filter>
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</application>
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<queries>
<intent>
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="mailto" />
</intent>
</queries>
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
</manifest>
1条答案
按热度按时间l0oc07j21#
想明白了!
现在 cordova 编译产生。aab文件,我需要使用bundletools签署的应用程序,然后解压缩。apks文件创建。apk文件。