[MOD-2467] Ti.Map: Exception thrown when targeting Android P
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 7.5.0 |
Fix Version/s | n/a |
Components | Map |
Labels | android, map |
Reporter | Hans Knöchel |
Assignee | Yordan Banev |
Created | 2018-10-28T10:43:48.000+0000 |
Updated | 2018-11-22T00:41:51.000+0000 |
Description
When using Ti.Map on Android P, an error is thrown:
[ERROR] TiExceptionHandler: (main) [13088,13088]
[ERROR] TiExceptionHandler: dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
[ERROR] TiExceptionHandler: java.lang.ClassLoader.loadClass(ClassLoader.java:379)
[ERROR] TiExceptionHandler: dhd.loadClass(:com.google.android.gms@12862026@12.8.62 (040700-199405334):3)
[ERROR] TiExceptionHandler: java.lang.ClassLoader.loadClass(ClassLoader.java:312)
[ERROR] TiExceptionHandler: el.b(:com.google.android.gms.dynamite_mapsdynamite@12862026@12.8.62 (040700-199405334):3)
[ERROR] TiExceptionHandler: ek.a(:com.google.android.gms.dynamite_mapsdynamite@12862026@12.8.62 (040700-199405334):4)
[ERROR] TiExceptionHandler: em.a(:com.google.android.gms.dynamite_mapsdynamite@12862026@12.8.62 (040700-199405334):51)
[ERROR] TiExceptionHandler: com.google.maps.api.android.lib6.drd.ap.a(:com.google.android.gms.dynamite_mapsdynamite@12862026@12.8.62 (040700-199405334):11)
[ERROR] TiExceptionHandler: dw.a(:com.google.android.gms.dynamite_mapsdynamite@12862026@12.8.62 (040700-199405334):16)
[ERROR] TiExceptionHandler: dw.run(:com.google.android.gms.dynamite_mapsdynamite@12862026@12.8.62 (040700-199405334):61)
Following the [Android bug tracker](https://issuetracker.google.com/issues/79478779), this is a known issue and the workaround is to add the following to the manifest:
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
I can confirm the fix works fine for Titanium as well.
PR: https://github.com/appcelerator-modules/ti.map/pull/249
Update: It seems like this surfaced another issue in the SDK. The
uses-library
tag cannot be properly merged into the final AndroidManifest:For now, the above fix needs to be applied manually to the project. Once the CLI is fixed, the Ti.Map PR can be reviewed.
[~hknoechel], regarding the CLI issue, I believe you're running into this: [MOD-2263]
Merged the PR from [~hknoechel]. Waiting for MOD-2458, MOD-2457 and possibly [#254](https://github.com/appcelerator-modules/ti.map/pull/254) to draft a new Android release.
BTW, the workaround