완성된 App Bundle을 Google Play 콘솔에 업로드할 때 문제가 발생합니다. 다운로드 후 다음 메시지가 나타납니다.
"기기 구성에 따라 앱이 Google Play 서비스의 다른 버전을 선언할 수 없습니다. 다음 버전이 발견되었습니다: [0, 12451000]"
앱은 하단 스마트 배너(Google Ads)를 표시하고 네트워크를 사용하며 알고리즘과는 별도로 더 많은 작업을 수행하지 않습니다.
build.gradle:
ext {
version = '1.0'
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.6.21'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0-alpha09'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle:앱:
plugins {
id 'kotlin-android'
id 'org.jetbrains.kotlin.kapt'
id 'com.android.application'
}
android {
...
signingConfigs {
debug {
...
}
release {
...
}
}
compileSdk 32
buildToolsVersion '30.0.3'
defaultConfig {
minSdk 19
targetSdk 32
versionName '1.0'
versionCode 100
multiDexEnabled true
...
}
buildFeatures {
//noinspection DataBindingWithoutKapt
dataBinding true
viewBinding true
}
buildTypes {
debug {
applicationIdSuffix ".debug"
versionNameSuffix "-debug"
}
beta {
applicationIdSuffix ".beta"
versionNameSuffix "-beta"
}
release {
applicationIdSuffix ".release"
versionNameSuffix "-release"
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility "11"
targetCompatibility "11"
}
kotlinOptions {
jvmTarget = "11"
}
ndkVersion '25.0.8221429 rc2'
flavorDimensions "level"
productFlavors {
free {
...
dimension "level"
versionCode 100
versionName "1.0"
targetSdk 32
minSdk 19
signingConfig signingConfigs.release
}
pro {
...
dimension "level"
versionCode 100
versionName "1.0"
targetSdk 32
minSdk 19
signingConfig signingConfigs.release
}
}
sourceSets {
free {
java { srcDirs 'src/free/java' }
res { srcDirs 'src/free/res' }
}
pro {
java { srcDirs 'src/pro/java' }
res { srcDirs 'src/pro/res' }
}
}
lint {
checkReleaseBuilds false
}
dependenciesInfo {
includeInApk true
includeInBundle true
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1-native-mt'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1-native-mt'
implementation 'androidx.appcompat:appcompat:1.6.0-alpha01'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'io.reactivex.rxjava3:rxjava:3.1.4'
implementation 'com.google.android.gms:play-services-ads:20.6.0'
implementation 'com.android.support:multidex:1.0.3'
}
task wrapper(type: Wrapper) {
gradleVersion = '7.3'
}
AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingLeanbackLauncher">
<!-- Need to listen to UDP datagrams -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<!-- For Android S devices & GMA SDK version 20.3.0 or lower -->
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
<!-- Support Android TV and do not require a touchscreen -->
<uses-feature
android:name="android.software.leanback"
android:required="false" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/MyTheme.Blue.SplashScreen">
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="<APP_KEY>" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name=".ActivitySplash"
android:exported="true"
android:theme="@style/MyTheme.Blue.SplashScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Preference activity -->
<activity
android:name=".ActivityMain"
android:exported="true"
android:theme="@style/MyTheme.Blue.SplashScreen">
</activity>
</application>
</manifest>
내가 검토한 해당 문제와 관련된 링크:
기기 구성에 따라
다른 버전의 Google Play 서비스를 선언할 수 없습니다. 앱은 기기 구성에 따라
다른 버전의 Google Play 서비스를 선언할 수 없습니다. 다른 버전의 Google Play 서비스는 다음에 따라 선언할 수 없습니다. 기기 구성
https://issuetracker.google.com/issues/223240936#comment21
https://issuetracker.google.com/issues/223240936
내가 한 것:
그러나 나는 여전히 완전히 붙어 있습니다. 이 문제를 어떻게 해결할 수 있는지 전혀 모르겠습니다.
10년 넘게 stackoverflow를 집중적으로 탐구했지만 이 포럼에 대한 첫 번째 게시물입니다. 저는 지금까지 stackoverflow, 다른 포럼, 문서...에서 솔루션을 찾아 문제를 해결해 왔습니다. 위의 모든 링크는 도움이 되지 않았습니다.
아무도 나를 도울 수 있습니까? 친애하는
편집: 이제 버그가 수정되었습니다. 이제 7.3.0-*에서도 작동합니다.
현재 Android Gradle 플러그인 7.3.0-alphaXX로 빌드된 앱의 Play Console에 버그가 있습니다. 이 문제가 해결될 때까지 7.2 0으로 되돌리면 차단이 해제됩니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다