Mapview Crash on API 28

Mapview crash with API 28 (Android) that is required now by Google! On Uno version 1.10.0-rc1 (build 187) macOS 10.13 x86_64 b79b2df

"SDK": {
  "BuildToolsVersion": "28.0.1",
  "CompileVersion": 28,
  "MinVersion": 16,
  "TargetVersion": 28
}

The log:

		Cristians-iMac:maps $ fuse build -tandroid -r
		Uno 1.10.0-rc1 (build 187) macOS 10.13 x86_64 b79b2df
		Copyright © 2018-present Fuse Open


		Configuring
		  0.08 s
		Target is up-to-date -- stopping build (pass --force to override)

		Build completed in 0.08 seconds

		Installing APK on 1 device(s)

		Launching activity 'maps'

		Running logcat on 315a415141563098

		07-22 15:39:34.003  8931  8931 E Zygote  : isWhitelistProcess - Process is Whitelisted
		07-22 15:39:34.004  8931  8931 E Zygote  : accessInfo : 1
		07-22 15:39:34.010  8931  8931 I SELinux : SELinux: seapp_context_lookup: seinfo=untrusted, level=s0:c165,c259,c512,c768, pkgname=com.apps.maps
		07-22 15:39:34.020  1457  1491 I ActivityManager: Start proc 8931:com.apps.maps/u0a933 for activity com.apps.maps/.maps
		07-22 15:39:34.031  8931  8931 I com.apps.maps: Late-enabling -Xcheck:jni
		07-22 15:39:34.124  8931  8931 D ConnectivityManager_URSP: Ursp sIsUrsp=false, sIsCheckUrsp=false, uid=10933
		07-22 15:39:34.126  8931  8931 D Proxy   : urspP is null: 10933

		07-22 15:39:34.361  8931  8931 D maps    : SDK: 28
		07-22 15:39:34.416  8931  8931 I Adreno  : QUALCOMM build                   : e358e5f, I382744abf5
		07-22 15:39:34.416  8931  8931 I Adreno  : Build Date                       : 02/28/19
		07-22 15:39:34.416  8931  8931 I Adreno  : OpenGL ES Shader Compiler Version: EV031.25.03.03
		07-22 15:39:34.416  8931  8931 I Adreno  : Local Branch                     :
		07-22 15:39:34.416  8931  8931 I Adreno  : Remote Branch                    : refs/tags/AU_LINUX_ANDROID_LA.UM.7.3.R1.09.00.00.423.055
		07-22 15:39:34.416  8931  8931 I Adreno  : Remote Branch                    : NONE
		07-22 15:39:34.416  8931  8931 I Adreno  : Reconstruct Branch               : NOTHING
		07-22 15:39:34.416  8931  8931 I Adreno  : Build Config                     : S P 6.0.7 AArch32
		07-22 15:39:34.419  8931  8931 I Adreno  : PFP: 0x016ee180, ME: 0x00000000
		07-22 15:39:34.422  8931  8931 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
		07-22 15:39:34.422  8931  8931 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
		07-22 15:39:34.426  8931  8931 D OpenGLRenderer: Skia GL Pipeline
		07-22 15:39:34.567  8931  8931 I zzbz    : Making Creator dynamically
		07-22 15:39:34.579  8931  8931 W com.apps.maps: Unsupported class loader
		07-22 15:39:34.580  8931  8931 W com.apps.maps: Skipping duplicate class check due to unsupported classloader
		07-22 15:39:34.582  8931  8931 I DynamiteModule: Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:221
		07-22 15:39:34.582  8931  8931 I DynamiteModule: Selected remote version of com.google.android.gms.maps_dynamite, version >= 221
		07-22 15:39:34.600  8931  8931 W ChimeraDebugLogger: Singleton logger instance not set.
		07-22 15:39:34.601  8931  8931 W com.apps.maps: Unsupported class loader
		07-22 15:39:34.603  8931  8931 W com.apps.maps: Skipping duplicate class check due to unsupported classloader

		07-22 15:39:34.621  8931  8931 I Google Maps Android API: Google Play services client version: 12211000
		07-22 15:39:34.630  8931  8931 I Google Maps Android API: Google Play services package version: 17785037
		07-22 15:39:34.645  1457 12156 W ActivityManager: wait for provider publish: waiters=1 callerApp=ProcessRecord{444a5c6d0 8931:com.apps.maps/u0a933} cpr=ContentProviderRecord{8e11987 u0 com.google.android.gsf/.settings.GoogleSettingsProvider}

		07-22 15:39:34.893  8931  8931 W com.apps.maps: Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)

		07-22 15:39:35.011  1457  1884 D ConnectivityService: filterNetworkStateForUid() uid: 10933, pid: 8931
		07-22 15:39:35.011  1457  1884 D ConnectivityService: filterNetworkStateForUid() uid: 10933, pid: 8931, networkInfo: [type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false]

		07-22 15:39:35.016  1457  1884 D ConnectivityService: filterNetworkStateForUid() uid: 10933, pid: 8931
		07-22 15:39:35.016  1457  1884 D ConnectivityService: filterNetworkStateForUid() uid: 10933, pid: 8931, networkInfo: [type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false]
		07-22 15:39:35.028  8931  9149 D NetworkSecurityConfig: No Network Security Config specified, using platform default
		07-22 15:39:35.031  8931  9149 I System.out: (HTTPLog)-Static: isSBSettingEnabled false
		07-22 15:39:35.032  8931  9149 I System.out: (HTTPLog)-Static: isSBSettingEnabled false
		07-22 15:39:35.036  8931  9149 D TcpOptimizer: TcpOptimizer-ON

		07-22 15:39:35.065  8931  8931 W com.apps.maps: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)
		07-22 15:39:35.066  8931  8931 W com.apps.maps: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)
		07-22 15:39:35.076  8931  8931 D EmergencyMode: [EmergencyManager] android createPackageContext successful
		07-22 15:39:35.093  8931  8931 D InputTransport: Input channel constructed: fd=104
		07-22 15:39:35.094  8931  8931 D ViewRootImpl@4752d37[maps]: setView = DecorView@edbcb96[maps] TM=true MM=false
		07-22 15:39:35.095  8931  8931 I Choreographer: Skipped 32 frames!  The application may be doing too much work on its main thread.
		07-22 15:39:35.106  8931  8931 D SurfaceView: onWindowVisibilityChanged(0) true 566d304 of ViewRootImpl@4752d37[maps]
		07-22 15:39:35.109  8931  8931 D ViewRootImpl@4752d37[maps]: dispatchAttachedToWindow

		07-22 15:39:35.121   753   753 I SurfaceFlinger: id=8731 createSurf (1080x2220),1 flag=4, com.apps.maps/com.apps.maps.maps[8931]#0
		07-22 15:39:35.123  1457  1884 D InputDispatcher: Focus entered window (8931): d511b4f 0
		07-22 15:39:35.125  8931  8931 D ViewRootImpl@4752d37[maps]: Relayout returned: old=[0,0][1080,2220] new=[0,0][1080,2220] result=0x7 surface={valid=true 3320745984} changed=true
		07-22 15:39:35.126  8931  9219 I OpenGLRenderer: Initialized EGL, version 1.4
		07-22 15:39:35.126  8931  9219 D OpenGLRenderer: Swap behavior 2
		07-22 15:39:35.133  8931  9219 D OpenGLRenderer: eglCreateWindowSurface = 0xc5f14b80, 0xc5ee9008

		07-22 15:39:35.179  8931  8931 D ViewRootImpl@4752d37[maps]: Relayout returned: old=[0,0][1080,2220] new=[0,0][1080,2220] result=0x3 surface={valid=true 3320745984} changed=false
		07-22 15:39:35.184   753   753 I SurfaceFlinger: id=8732 createSurf (1080x2220),4 flag=404, SurfaceView - com.apps.maps/com.apps.maps.maps@566d304@0[8931]#0
		07-22 15:39:35.184   753   753 I SurfaceFlinger: id=8733 createSurf (1080x2220),1024 flag=20404, Background for -SurfaceView - com.apps.maps/com.apps.maps.maps@566d304@0[8931]#0
		07-22 15:39:35.185  8931  8931 D SurfaceView: show() Surface(name=SurfaceView - com.apps.maps/com.apps.maps.maps@566d304@0[8931])/@0x5270534 android.view.SurfaceView{566d304 V.E...... ......ID 0,0-1080,2220}
		07-22 15:39:35.198  8931  8931 D SurfaceView: surfaceCreated 1 #8 android.view.SurfaceView{566d304 V.E...... ......ID 0,0-1080,2220}
		07-22 15:39:35.199  8931  8931 D SurfaceView: surfaceChanged (1080,2220) 1 #8 android.view.SurfaceView{566d304 V.E...... ......ID 0,0-1080,2220}

		07-22 15:39:35.236  8931  8931 D ViewRootImpl@4752d37[maps]: MSG_WINDOW_FOCUS_CHANGED 1 1
		07-22 15:39:35.237  1457  1569 I WindowManager: commitFinishDrawingLocked: mDrawState=READY_TO_SHOW Surface(name=com.apps.maps/com.apps.maps.maps[8931])/@0xff4e2dc
		07-22 15:39:35.245  8931  8931 D InputMethodManager: prepareNavigationBarInfo() DecorView@edbcb96[maps]
		07-22 15:39:35.246  8931  8931 D InputMethodManager: getNavigationBarColor() -855310
		07-22 15:39:35.248  8931  8931 D InputMethodManager: prepareNavigationBarInfo() DecorView@edbcb96[maps]
		07-22 15:39:35.248  8931  8931 D InputMethodManager: getNavigationBarColor() -855310
		07-22 15:39:35.248  8931  8931 V InputMethodManager: Starting input: tba=com.apps.maps ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
		07-22 15:39:35.248  8931  8931 D InputMethodManager: startInputInner - Id : 0
		07-22 15:39:35.248  8931  8931 I InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
		07-22 15:39:35.251  1457  3316 V InputMethodManagerService: Creating new session for client ClientState{a44a712 uid 10933 pid 8931}
		07-22 15:39:35.255  8931  8954 D InputTransport: Input channel constructed: fd=111

		07-22 15:39:35.260  8931  8931 D ViewRootImpl@4752d37[maps]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1080, 2220) ci=Rect(0, 63 - 0, 39) vi=Rect(0, 63 - 0, 39) or=1
		07-22 15:39:35.262  8931  8931 D InputMethodManager: prepareNavigationBarInfo() DecorView@edbcb96[maps]
		07-22 15:39:35.262  8931  8931 D InputMethodManager: getNavigationBarColor() -855310
		07-22 15:39:35.262  8931  8931 V InputMethodManager: Starting input: tba=com.apps.maps ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
		07-22 15:39:35.262  8931  8931 D InputMethodManager: startInputInner - Id : 0
		07-22 15:39:35.271   753   753 I SurfaceFlinger:      Device | 0x7213839360 | 0002 | RGBA_8888 |   0.0    0.0 1080.0  406.0 |    0 1814 1080 2220 | SurfaceView - com.apps.maps/com.apps.maps.maps@566d304@0[8931]#0
		07-22 15:39:35.271   753   753 I SurfaceFlinger:      Device | 0x721305c2a0 | 0000 | RGBA_8888 |   0.0    0.0 1080.0  406.0 |    0 1814 1080 2220 | com.apps.maps/com.apps.maps.maps[8931]#0

		07-22 15:39:35.353  8931  9149 E AndroidRuntime: FATAL EXCEPTION: Thread-3
		07-22 15:39:35.353  8931  9149 E AndroidRuntime: Process: com.apps.maps, PID: 8931
		07-22 15:39:35.353  8931  9149 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion;
		07-22 15:39:35.353  8931  9149 E AndroidRuntime: 	at gw.b(:com.google.android.gms.dynamite_mapsdynamite@17785081@17.7.85 (100400-253824076):3)
		07-22 15:39:35.353  8931  9149 E AndroidRuntime: 	at gt.a(:com.google.android.gms.dynamite_mapsdynamite@17785081@17.7.85 (100400-253824076):3)
		07-22 15:39:35.353  8931  9149 E AndroidRuntime: 	at gv.a(:com.google.android.gms.dynamite_mapsdynamite@17785081@17.7.85 (100400-253824076):14)
		07-22 15:39:35.353  8931  9149 E AndroidRuntime: 	at com.google.maps.api.android.lib6.drd.ak.a(:com.google.android.gms.dynamite_mapsdynamite@17785081@17.7.85 (100400-253824076):6)
		07-22 15:39:35.353  8931  9149 E AndroidRuntime: 	at fx.a(:com.google.android.gms.dynamite_mapsdynamite@17785081@17.7.85 (100400-253824076):22)
		07-22 15:39:35.353  8931  9149 E AndroidRuntime: 	at fx.run(:com.google.android.gms.dynamite_mapsdynamite@17785081@17.7.85 (100400-253824076):8)
		07-22 15:39:35.353  8931  9149 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.ProtocolVersion" on path: DexPathList[[zip file "/data/user_de/0/com.google.android.gms/app_chimera/m/00000071/MapsDynamite.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/00000071/MapsDynamite.apk!/lib/armeabi-v7a, /data/user_de/0/com.google.android.gms/app_chimera/m/00000071/MapsDynamite.apk!/lib/armeabi, /system/lib]]
		07-22 15:39:35.353  8931  9149 E AndroidRuntime: 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
		07-22 15:39:35.353  8931  9149 E AndroidRuntime: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
		07-22 15:39:35.353  8931  9149 E AndroidRuntime: 	at ab.loadClass(:com.google.android.gms.dynamite_dynamiteloader@17785081@17.7.85 (100400-253824076):4)
		07-22 15:39:35.353  8931  9149 E AndroidRuntime: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
		07-22 15:39:35.353  8931  9149 E AndroidRuntime: 	... 6 more
		07-22 15:39:35.358  1457  3316 D InputDispatcher: Focus left window (8931): d511b4f 0

		07-22 15:39:35.393  8931  8931 D ViewRootImpl@4752d37[maps]: MSG_WINDOW_FOCUS_CHANGED 0 1
		07-22 15:39:35.393  8931  8931 D InputMethodManager: prepareNavigationBarInfo() DecorView@edbcb96[maps]
		07-22 15:39:35.393  8931  8931 D InputMethodManager: getNavigationBarColor() -855310
		07-22 15:39:35.398  8931  8931 E SchedPolicy: set_timerslack_ns write failed: Operation not permitted

		07-22 15:39:35.456  8931  8931 D InputTransport: Input channel destroyed: fd=111

		07-22 15:39:35.468  8931  8931 D SurfaceView: windowStopped(true) false 566d304 of ViewRootImpl@4752d37[maps]
		07-22 15:39:35.469  8931  8931 D SurfaceView: show() Surface(name=SurfaceView - com.apps.maps/com.apps.maps.maps@566d304@0[8931])/@0x5270534 android.view.SurfaceView{566d304 V.E...... ........ 0,0-1080,2220}
		07-22 15:39:35.471  8931  8931 D SurfaceView: surfaceDestroyed callback.size 1 #1 android.view.SurfaceView{566d304 V.E...... ........ 0,0-1080,2220}
		07-22 15:39:35.472   753  1514 I SurfaceFlinger: id=8732 Removed SurfaceView - com.apps.maps/com.apps.maps.maps@566d304@0[8931]#0 (1/61)
		07-22 15:39:35.473  8931  8931 D SurfaceView: destroy() Surface(name=SurfaceView - com.apps.maps/com.apps.maps.maps@566d304@0[8931])/@0x5270534 android.view.SurfaceView{566d304 V.E...... ........ 0,0-1080,2220}
		07-22 15:39:35.473   753   821 I SurfaceFlinger: id=8733 Removed Background for -SurfaceView - com.apps.maps/com.apps.maps.maps@566d304@0[8931]#0 (0/60)
		07-22 15:39:35.481   753   753 I Layer   : id=8733 onRemoved Background for -SurfaceView - com.apps.maps/com.apps.maps.maps@566d304@0[8931]#0
		07-22 15:39:35.481   753   753 I Layer   : id=8732 onRemoved SurfaceView - com.apps.maps/com.apps.maps.maps@566d304@0[8931]#0
		07-22 15:39:35.488   753   753 I SurfaceFlinger:      Device | 0x721305c620 | 0000 | RGBA_8888 |   0.0    0.0 1080.0 2156.0 |    0   64 1080 2220 | com.apps.maps/com.apps.maps.maps[8931]#0
		07-22 15:39:35.506  8931  8931 I Process : Sending signal. PID: 8931 SIG: 9

		07-22 15:39:35.520   753   753 I SurfaceFlinger:      Device | 0x721305c620 | 0000 | RGBA_8888 |   0.0    0.0 1080.0 2203.0 |    0   17 1080 2220 | com.apps.maps/com.apps.maps.maps[8931]#0
		07-22 15:39:35.536   753   753 I SurfaceFlinger:      Device | 0x721305c620 | 0000 | RGBA_8888 |   0.0    0.0 1080.0 2215.0 |    0    5 1080 2220 | com.apps.maps/com.apps.maps.maps[8931]#0

		07-22 15:39:35.744  1457  3210 I ActivityManager: Process com.apps.maps (pid 8931) has died: cch  CRE (495,1575)
		07-22 15:39:35.744  1457  3145 V WindowManager: Remove Window{d511b4f u0 com.apps.maps/com.apps.maps.maps}: mSurfaceController=Surface(name=com.apps.maps/com.apps.maps.maps[8931])/@0xff4e2dc mAnimatingExit=false mRemoveOnExit=false mHasSurface=true surfaceShowing=false isAnimationSet=false app-animation=false mWillReplaceWindow=false inPendingTransaction=false mDisplayFrozen=false callers=com.android.server.wm.WindowState.access$300:274 com.android.server.wm.WindowState$DeathRecipient.binderDied:3237 android.os.BinderProxy.sendDeathNotice:1206 <bottom of call stack> <bottom of call stack> <bottom of call stack>
		07-22 15:39:35.744  1457  1492 W libprocessgroup: kill(-8931, 9) failed: No such process
		07-22 15:39:35.744  1457  3145 I WindowManager: Destroying surface Surface(name=com.apps.maps/com.apps.maps.maps[8931])/@0xff4e2dc called by com.android.server.wm.WindowStateAnimator.destroySurface:1826 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:804 com.android.server.wm.WindowState.removeImmediately:2615 com.android.server.wm.WindowState.removeIfPossible:2765 com.android.server.wm.WindowState.access$300:274 com.android.server.wm.WindowState$DeathRecipient.binderDied:3237 android.os.BinderProxy.sendDeathNotice:1206 <bottom of call stack>
		07-22 15:39:35.745   753   821 I SurfaceFlinger: id=8731 Removed com.apps.maps/com.apps.maps.maps[8931]#0 (0/61)
		07-22 15:39:35.748   753   753 I Layer   : id=8731 onRemoved com.apps.maps/com.apps.maps.maps[8931]#0
		07-22 15:39:35.751  1457  1492 W libprocessgroup: kill(-8931, 9) failed: No such process
		07-22 15:39:35.751   925   925 I Zygote  : Process 8931 exited due to signal (9)

		07-22 15:39:35.756  1457  1492 W libprocessgroup: kill(-8931, 9) failed: No such process
		07-22 15:39:35.756  1457  1492 I libprocessgroup: Successfully killed process cgroup uid 10933 pid 8931 in 12ms
		07-22 15:39:35.762  1457  1504 W ActivityManager: setHasOverlayUi called on unknown pid: 8931

		Process com.apps.maps terminated.

		Cristians-iMac:maps $

My maps are working, its probably the gradle dependency version, have a look at my change here:

…in the MapView.uno.

This PR don’t solve the problem I solve the issue creating a uxl with:

<Extensions Backend="CPlusPlus">
  <Require Condition="Android" AndroidManifest.ApplicationElement>
    <![CDATA[
      <uses-library android:name="org.apache.http.legacy" android:required="false"/>
    ]]>
  </Require>
</Extensions>

I find the solution on https://stackoverflow.com/questions/50782806/android-google-maps-java-lang-noclassdeffounderror-failed-resolution-of-lorg-a .

Confirmed: https://developers.google.com/maps/documentation/android-sdk/config#specify_requirement_for_apache_http_legacy_library

With com.google.android.gms:play-services-maps:16.1.0 in Fuse.Maps solve the problem without modifying the manifest!

1 Like

:muscle: :smile: :tada: