Open prok155 opened 2 years ago
I was looking at his page: https://groups.google.com/g/google-admob-ads-sdk/c/fmbPnkUCIe8?pli=1 and in particular at this (for native android):
dependencies { implementation 'com.google.android.gms:play-services-ads:20.4.0'
// For apps targeting Android 12, add WorkManager dependency.
constraints {
implementation('androidx.work:work-runtime:2.7.0') { because '''androidx.work:work-runtime:2.1.0 pulled from play-services-ads has a bug ...'' }
}
}
It seems that this is a well known problem and the solution they found was to use androidx.work:work-runtime:2.7.0. I've tried to install the version available for android but that doesn't solve the problem.
Following, currently experiencing the same problem when using on API 31
Following, experiencing same issue on my app as will on android 12 device
@prok155 @marcojak @kelvin526 , I managed to fix this while running on Android 12. You just need to install these two packages on your Android project:
Can you please verify on your side? Thanks
Update: Xamarin.AndroidX.Work.Runtime 2.7.1.3 won't work. It needs to be only on 2.7.0. I don't know why the latest version won't work.
I've installed only Xamarin.AndroidX.Work.Runtime 2.7.0
and it solved issue. @jl-memosoft thank you for solution!
@jl-memosoft I can't install those package as my app dev in xamarin form which have compatibility issue. Anyone else have workaround? TIA
-Update on 9/4/2022- Found a way to install the Xamarin.AndroidX.Work.Runtime 2.7.0 and now it solved the issue. Thanks!!!
I've installed only
Xamarin.AndroidX.Work.Runtime 2.7.0
and it solved issue. @jl-memosoft thank you for solution!
Same here! I was trying to install the latest one (2.7.1.4) and it wasn't installing due to incompatible versions. Your and jl-memesoft advice saved me, thanks!
@jl-memosoft, @davidblaine228 Is it still required with v1.8.0 update ?
@jl-memosoft, @davidblaine228 Is it still required with v1.8.0 update ?
Unfortunately, can't really tell
@jl-memosoft, @davidblaine228 Is it still required with v1.8.0 update ?
For me, it is required
Describe the bug App crashes when I set targetSdk to 31 and target framework Android 12. Bug occurs only when I try to run my project on phones and emulators with android 12. Error log:
'com.companyname.mypackagename: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.'
To Reproduce Steps to reproduce the behavior:
Expected behavior App doesn't crash on devices with Android 12
Smartphone (please complete the following information):
Additional context Here are changes to pending intents when app is targeting Android12. https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability