I am originally using Unity 2021.1.22f1
I have made a cardboard vr app for android and I need to make an update to it. I am not using in app purchases or something similar, but I use the Play Asset Delivery package for unity in order to minimize the app size. I successfully built the app and it throws an error when I upload the app for internal testing and it will not proceed if this is not resolved.
We have detected that this app is using an unsupported version of Play Billing.
Please upgrade your Billing Library to version 4 or later to publish this app.
When I click the “learn more” button it redirects me to this link: Google Play Billing Library version deprecation | Google Play's billing system | Android Developers and the internal test button is greyed out.
It is saying that the Google Play Billing Library must be upgraded from version 3 to at least version 4.
Due to this forum thread Important update: Google Play Billing Library v5.1.0 I searched about the changelog in the unity versions Changelog | In App Purchasing | 4.4.1. In this changelog is written, that the “GooglePlay - Google Play Billing Library version 4.0.0” is added in IAP 4.4.0 and date 2022-07-11.
So I guessed that i had to upgrade the unity version. I downloaded Unity 2022.1.23f1 and built the same app with the current settings (Google Play Billing Library v3) and it was successfully built without errors.
I found a way to upgrade the library by downloading the unity package of Play Billing Library from this website Explore Google packages for Unity | Google for Developers even if it is saying version 3.2.4 . When I tried to build it a new error appeared:
Gradle Error: Colliding Attributes
The attribute
meta-data#com.google.android.play.billingclient.version@value=3.0.3
in :billing-4.0.0: collides with another value
(See the Console for details)
I tried updating the Play Asset Delivery package but there was no change in the error message.
I found this in my search for the bug Integration with Unity IAP 2.2.5 · Issue #37 · RevenueCat/purchases-unity · GitHub. In this link, the Google Play Billing Library is having a conflict with the same library inside the IAP and it suggest a code to bypass the IAP library. and tried it, but to no avail.
After trying this I guess that there is a Google Play Billing Library v3 in the Play Asset Delivery package that probably is needed to be bypassed.
If the Play Billing Library can be completely skipped it would be the best, because there is no billing function planned to be implemented in the app, but I mainly want to be able to upload it to the playstore.
This is the mainTemplate.gradle file:
// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN
// Android Resolver Repos Start
([rootProject] + (rootProject.subprojects as List)).each { project ->
project.repositories {
def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
maven {
url "https://maven.google.com"
}
maven {
url "https://android-sdk.is.com/" // Assets/IronSource/Editor/IronSourceSDKDependencies.xml:9
}
maven {
url "https://maven.google.com/" // Assets/IronSource/Editor/IronSourceSDKDependencies.xml:17, Assets/IronSource/Editor/IronSourceSDKDependencies.xml:25
}
mavenLocal()
mavenCentral()
}
}
// Android Resolver Repos End
apply plugin: 'com.android.library'
**APPLY_PLUGINS**
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.android.gms:play-services-vision:15.0.2'
implementation 'com.google.protobuf:protobuf-lite:3.0.0'
// Android Resolver Dependencies Start
implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0' // Assets/IronSource/Editor/IronSourceSDKDependencies.xml:17
implementation 'com.google.android.gms:play-services-basement:17.2.1' // Assets/IronSource/Editor/IronSourceSDKDependencies.xml:25
implementation 'com.google.android.play:asset-delivery:2.0.0' // Assets/GooglePlayPlugins/com.google.play.assetdelivery/Editor/Dependencies.xml:3
implementation 'com.google.android.play:core-common:2.0.0' // Assets/GooglePlayPlugins/com.google.play.core/Editor/Dependencies.xml:3
implementation 'com.ironsource.sdk:mediationsdk:7.2.5' // Assets/IronSource/Editor/IronSourceSDKDependencies.xml:9
// Android Resolver Dependencies End
**DEPS**}
// Android Resolver Exclusions Start
android {
packagingOptions {
exclude ('/lib/armeabi/*' + '*')
exclude ('/lib/armeabi-v7a/*' + '*')
exclude ('/lib/mips/*' + '*')
exclude ('/lib/mips64/*' + '*')
exclude ('/lib/x86/*' + '*')
exclude ('/lib/x86_64/*' + '*')
}
}
// Android Resolver Exclusions End
android {
aaptOptions {
noCompress = ['.ress', '.resource', '.obb'] + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
}
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
}
lintOptions {
abortOnError false
}
**PACKAGING_OPTIONS**
}**REPOSITORIES**
**IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**