[MOD-2507] ti.admob - Android 9 support?
DescriptionThe ti.admob module crashes on Android 9. We have had to completely disable it for this operating system version.
- Joshua Quick 2019-03-27
It's an issue on Google's end because the AdMob library is still using the deprecate Apache library which has been removed as of Android 9. Please see:
The work-around is to add the below
<uses-library/>to your "tiapp.xml". This is Google's recommendation as well.
Note that this is an issue with Google Maps as well if you use it.
<?xml version="1.0" encoding="UTF-8"?> <ti:app xmlns:ti="http://ti.appcelerator.org"> <android xmlns:android="http://schemas.android.com/apk/res/android"> <manifest> <application> <uses-library android:name="org.apache.http.legacy" android:required="false"/> </application> </manifest> </android> </ti:app>
- Jason Kotchoff 2019-04-09
In order for this module to be compatible with the latest firebase modules for Ti SDK 8.0.0 to run on Android 9, it needs to also compile and run alongside ti.playservices v16.1.2.
This ti.admob module won't compile on ti.playservices v16.1.2 as it errors out with:
Can this be fixed?
[ERROR] TiExceptionHandler: (main) [91,91] Failed resolution of: Lcom/google/android/gms/ads/AdSize;
- Rene Pot 2019-04-10 Currently a ti.admob rewrite is in progress for both iOS & Android to support more ad types and make them properly cross platform. [~ybanev] is working on that. I've assigned him to make sure it will work as well on Android 9