Вот ситуация:
Приложение работает отлично, когда я тестирую его как на эмуляторе, так и на физическом устройстве.
Я также могу создать APK вручную и установить его на мой телефон без каких-либо проблем.
Я также попробовал создать AAB, преобразовать его в APK и установить этот APK на устройство, и все работает безупречно.
Однако, когда я загружаю AAB в Google Play и попытаюсь установить приложение оттуда, я столкнусь с ошибкой INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION. Это происходит на разных устройствах; Из-за этой проблемы никто не может загрузить и установить мое приложение из Google Play.
Что я пробовал:
- Я обязательно очистил и перестроил свой проект перед созданием AAB. Я также попытался удалить папки Android и node_modules и начал заново, но проблема все еще возникает.
- Я искал потенциальные проблемы в моем AndroidManifest.xml, но вроде все в порядке:
Код: Выделить всё
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
Код: Выделить всё
apply plugin: 'com.android.application'
android {
namespace "my.app.id"
compileSdk rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "my.app.id"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 9
versionName "1.1.0a"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
implementation project(':capacitor-android')
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')
}
apply from: 'capacitor.build.gradle'
try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
}
} catch(Exception e) {
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}
Код: Выделить всё
ext {
minSdkVersion = 22
compileSdkVersion = 34
targetSdkVersion = 34
androidxActivityVersion = '1.8.0'
androidxAppCompatVersion = '1.6.1'
androidxCoordinatorLayoutVersion = '1.2.0'
androidxCoreVersion = '1.12.0'
androidxFragmentVersion = '1.6.2'
coreSplashScreenVersion = '1.0.1'
androidxWebkitVersion = '1.9.0'
junitVersion = '4.13.2'
androidxJunitVersion = '1.1.5'
androidxEspressoCoreVersion = '3.5.1'
cordovaAndroidVersion = '10.1.1'
}
[img]https:/ /i.sstatic.net/k3vy6sb8.png[/img]
Если кто-нибудь сталкивался с этой проблемой или имеет представление о том, что может быть причиной этой ошибки, я был бы очень признателен за вашу помощь!
Если кто-то сталкивался с этой проблемой или знает, что может быть причиной этой ошибки, я был бы очень признателен за вашу помощь!
Спасибо!
Подробнее здесь: https://stackoverflow.com/questions/790 ... p-from-goo
Мобильная версия