Shin-NiL / Godot-Android-Admob-Plugin

Android AdMob plugin for Godot Game Engine 3.2 or higher

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some new requirements for AdMob 20.4.0

Funmungus opened this issue · comments

Godot version: 3.4.4

AdMob Plugin version: 6.0.0

Issue description:
I successfully got test ads running on a VM and I have not reproduced issues yet. When targeting Android 12+ we may encounter the error described here: . In short, play-services depends on work-runtime version 2.1.0. The AdMob release notes suggest forcing work-runtime up to version 2.7.0. I have confirmed androidx.work:work-runtime:2.1.0 in the dependencies, and the suggested constraint will upgrade that to 2.7.0. There is no issue compiling with this version, but 2.7.0 will likely cause exceptions in the final application.

It is likely we cannot upgrade work-runtime until Android 12, and also we will have to upgrade work-runtime when possible. I am currently testing this targeting Android 11, SDK int 30.

Related to #195

Confirmed androidx.work:work-runtime:2.7.0 does not cause an error compiling or at runtime. Further updates when I try running with a release APK.
After closer inspection the final project was overriding it, but work-runtime 2.7.0 definitely caused compile issues. The highest version without minCompileSdk=31 is 2.6.0.

work-runtime project is here: https://developer.android.com/jetpack/androidx/releases/work#2.7.0. This project says it requires compileSdk 31 or greater, and the gradle transforms also declare minCompileSdk=31. This should be causing compile issues with compileSdk 30.

@cengiz-er I have not actually reproduced the PendingIntent error because I am compiling with SDK version 30. I was confirming work-runtime 2.7.0 will not compile for apps using this SDK version. When Godot upgrades the compileSdk version ≥ 31, then we will also be able to upgrade the play-services version which depends on work-runtime. This may be a non-issue completely with that upgrade, but I wanted to make sure we have references to possible solutions if it does become a problem.

@Funmungus, @Shin-NiL, I have run into this issue and am blocked as Google Play is forcing SDK v31 & above on new apps now. The same problem exists with @Shin-NiL's share plugin

Exception java.lang.IllegalArgumentException: org.godotengine.game: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.

@Shin-NiL, I have created a pull request to fix the above mentioned issue
#206

Thank you @cengiz-pz