# App crashes on Android with simple MapView

**URL:** https://forums.fusetools.com/t/app-crashes-on-android-with-simple-mapview/4584
**Category:** Bug Reports
**Created:** [June 7, 2016, 4:03pm UTC](https://forums.fusetools.com/t/app-crashes-on-android-with-simple-mapview/4584 "2016-06-07T16:03:41Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![lg1](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@lg1](https://forums.fusetools.com/u/lg1)
#### Post date: [June 7, 2016, 4:03pm UTC](https://forums.fusetools.com/t/app-crashes-on-android-with-simple-mapview/4584/1 "2016-06-07T16:03:41Z")

</div>

Fuse 0.20.2, Windows 10, Nexus5

My simple app crashes on Android

```auto
<App>
    <NativeViewHost>
        <MapView/>
    </NativeViewHost>
</App>

```

.unoproj

```auto
{
    "Packages": [
        "Fuse",
        "FuseJS",
        "Fuse.GeoLocation",
        "Fuse.Maps"
    ],
    "Includes": [
        "",
        ".js:Bundle"
    ],
    "Android": {
        "Geo": {
            "ApiKey": "my_api_key"
        }
    }
}

```

with errors:

```auto
06-07 18:56:12.738 7917 7917 D AndroidRuntime: Shutting down VM
06-07 18:56:12.739 7917 7917 E AndroidRuntime: FATAL EXCEPTION: main
06-07 18:56:12.739 7917 7917 E AndroidRuntime: Process: Fuse.Preview, PID: 7917
06-07 18:56:12.739 7917 7917 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke interface method 'void com.fusetools.androidmapsapi.FuseMap$FuseMapCallback.onReady()' on a null object reference
06-07 18:56:12.739 7917 7917 E AndroidRuntime: at com.fusetools.androidmapsapi.FuseMap.configure(FuseMap.java:138)
06-07 18:56:12.739 7917 7917 E AndroidRuntime: at com.fusetools.androidmapsapi.FuseMap.access$100(FuseMap.java:20)
06-07 18:56:12.739 7917 7917 E AndroidRuntime: at com.fusetools.androidmapsapi.FuseMap$1.onMapReady(FuseMap.java:66)
06-07 18:56:12.739 7917 7917 E AndroidRuntime: at com.google.android.gms.maps.MapView$zza$1.zza(Unknown Source)
06-07 18:56:12.739 7917 7917 E AndroidRuntime: at com.google.android.gms.maps.internal.zzo$zza.onTransact(Unknown Source)
06-07 18:56:12.739 7917 7917 E AndroidRuntime: at android.os.Binder.transact(Binder.java:387)
06-07 18:56:12.739 7917 7917 E AndroidRuntime: at wv.a(:com.google.android.gms.DynamiteModulesB:82)
06-07 18:56:12.739 7917 7917 E AndroidRuntime: at maps.ag.t$5.run(Unknown Source)
06-07 18:56:12.739 7917 7917 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)
06-07 18:56:12.739 7917 7917 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
06-07 18:56:12.739 7917 7917 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
06-07 18:56:12.739 7917 7917 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
06-07 18:56:12.739 7917 7917 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
06-07 18:56:12.739 7917 7917 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
06-07 18:56:12.739 7917 7917 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

06-07 18:56:14.062 7917 8448 E DynamiteModule: Failed to load module descriptor class: Didn't find class "com.google.android.gms.dynamite.descriptors.com.google.android.gms.googlecertificates.ModuleDescriptor" on path: DexPathList[[zip file "/data/app/Fuse.Preview-1/base.apk"],nativeLibraryDirectories=[/data/app/Fuse.Preview-1/lib/arm, /data/app/Fuse.Preview-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
06-07 18:56:14.065 7917 8448 I DynamiteModule: Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:1
06-07 18:56:14.066 7917 8448 I DynamiteModule: Selected remote version of com.google.android.gms.googlecertificates, version >= 1
06-07 18:56:14.075 7917 8448 W System : ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/00000000/n/armeabi
06-07 18:56:14.077 7917 8448 D ChimeraFileApk: Primary ABI of requesting process is armeabi-v7a
06-07 18:56:14.087 7917 8448 D ChimeraFileApk: Classloading successful. Optimized code found.
06-07 18:56:14.093 7917 8448 D GoogleCertificates: com.google.android.gms.googlecertificates module is loaded
06-07 18:56:14.246 7917 8448 D GoogleCertificatesImpl: Fetched 154 Google release certificates
06-07 18:56:14.258 7917 8448 V GoogleSignatureVerifier: Fuse.Preview signature not valid. Found:

```

---

<div class="post-metadata">

### Author: ![Andreas\_Ronning](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/andreas_ronning/32/303_2.png) [@Andreas\_Ronning](https://forums.fusetools.com/u/Andreas_Ronning)
#### Post date: [June 10, 2016, 11:43am UTC](https://forums.fusetools.com/t/app-crashes-on-android-with-simple-mapview/4584/2 "2016-06-10T11:43:30Z")

</div>

Hey, this issue has been solved on our master branch and should be fixed with the next release ☹ Sorry about this

---

<div class="post-metadata">

### Author: ![lg1](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@lg1](https://forums.fusetools.com/u/lg1)
#### Post date: [June 22, 2016, 10:27am UTC](https://forums.fusetools.com/t/app-crashes-on-android-with-simple-mapview/4584/3 "2016-06-22T10:27:36Z")

</div>

Tried the latest build 0.21.0 and I still cannot preview on Android. however when building in release the app works ok

```auto
06-21 21:25:34.069 11387 11387 E AndroidRuntime: FATAL EXCEPTION: main
06-21 21:25:34.069 11387 11387 E AndroidRuntime: Process: Fuse.Preview, PID: 11387
06-21 21:25:34.069 11387 11387 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke interface method 'void com.fusetools.maps.FuseMap$FuseMapCallback.onReady()' on a null object reference
06-21 21:25:34.069 11387 11387 E AndroidRuntime: at com.fusetools.maps.FuseMap.configure(FuseMap.java:130)
06-21 21:25:34.069 11387 11387 E AndroidRuntime: at com.fusetools.maps.FuseMap.access$000(FuseMap.java:21)
06-21 21:25:34.069 11387 11387 E AndroidRuntime: at com.fusetools.maps.FuseMap$1.onMapReady(FuseMap.java:54)
06-21 21:25:34.069 11387 11387 E AndroidRuntime: at com.google.android.gms.maps.MapView$zza$1.zza(Unknown Source)
06-21 21:25:34.069 11387 11387 E AndroidRuntime: at com.google.android.gms.maps.internal.zzo$zza.onTransact(Unknown Source)
06-21 21:25:34.069 11387 11387 E AndroidRuntime: at android.os.Binder.transact(Binder.java:387)
06-21 21:25:34.069 11387 11387 E AndroidRuntime: at wv.a(:com.google.android.gms.DynamiteModulesB:82)
06-21 21:25:34.069 11387 11387 E AndroidRuntime: at maps.ag.t$5.run(Unknown Source)
06-21 21:25:34.069 11387 11387 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)
06-21 21:25:34.069 11387 11387 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
06-21 21:25:34.069 11387 11387 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
06-21 21:25:34.069 11387 11387 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
06-21 21:25:34.069 11387 11387 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
06-21 21:25:34.069 11387 11387 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
06-21 21:25:34.069 11387 11387 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
06-21 21:25:34.914 11387 11996 I b : Received API Token: AH0uPGEJx7I3RSXjKmmqgRGRE1rUnsNMSGSBHO7EQPHc0kPXBI3kc_Et2amODwZii9eXT2MnT6LV1wdwHFEnFsan5-dem4ktptB0pbJc3HjoCi3RffE0X_FW2MJNmXjpIg_N_wKO67D070VV5kW8s28T52zZHaIO0wsq0o3x8_x0244avfanVi8 / Expires in: 432000000ms
06-21 21:25:34.914 11387 11996 I c : Scheduling next attempt in 431700 seconds.
06-21 21:25:34.926 11387 11996 I d : Saved auth token
06-21 21:25:35.094 11387 11399 I art : Background partial concurrent mark sweep GC freed 14768(1549KB) AllocSpace objects, 6(1056KB) LOS objects, 40% free, 20MB/34MB, paused 5.581ms total 102.441ms
06-21 21:25:35.135 11387 11959 V GoogleSignatureVerifier: Fuse.Preview signature not valid. Found:

```

---

<div class="post-metadata">

### Author: ![Andreas\_Ronning](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/andreas_ronning/32/303_2.png) [@Andreas\_Ronning](https://forums.fusetools.com/u/Andreas_Ronning)
#### Post date: [June 23, 2016, 1:52pm UTC](https://forums.fusetools.com/t/app-crashes-on-android-with-simple-mapview/4584/4 "2016-06-23T13:52:05Z")

</div>

This is due to the preview app being given a different package name than the full build, resulting in an invalid signature, as you can see from the error message `Fuse.Preview signature not valid`

We’re discussing this internally to find a good approach for this. In the meanwhile, the fix is to add `Fuse.Preview` as a valid package for your API key in the google developer console

---

<div class="post-metadata">

### Author: ![lg1](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@lg1](https://forums.fusetools.com/u/lg1)
#### Post date: [June 25, 2016, 3:19pm UTC](https://forums.fusetools.com/t/app-crashes-on-android-with-simple-mapview/4584/5 "2016-06-25T15:19:41Z")

</div>

To add Fuse.Preview as a package in the google developer console it asks for a valid SHA-1 certificate fingerprint. How can I get one for fuse?

---

<div class="post-metadata">

### Author: ![Andreas\_Ronning](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/andreas_ronning/32/303_2.png) [@Andreas\_Ronning](https://forums.fusetools.com/u/Andreas_Ronning)
#### Post date: [June 27, 2016, 11:54am UTC](https://forums.fusetools.com/t/app-crashes-on-android-with-simple-mapview/4584/6 "2016-06-27T11:54:34Z")

</div>

Didn’t you do this already for your existing API key? You need to print the key from your debug keystore. This is a requirement for using google maps on android in general and [Google’s docs](https://developers.google.com/maps/android/) go into this.
