# I get an error when building Android.

**URL:** <https://forums.fusetools.com/t/i-get-an-error-when-building-android/5212>\
**Category:** Bug Reports\
**Created:** [November 22, 2016, 2:11am UTC](https://forums.fusetools.com/t/i-get-an-error-when-building-android/5212 "2016-11-22T02:11:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jahyun.dev](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jahyun.dev](https://forums.fusetools.com/u/jahyun.dev)\
**Post date:** [November 22, 2016, 2:11am UTC](https://forums.fusetools.com/t/i-get-an-error-when-building-android/5212/1 "2016-11-22T02:11:10Z")

</div>

I get an error when building on Android. This is an error that does not occur in Local Preview.  
I dont know the cause.

This is the error

```auto
[10:56]  
D/AndroidRuntime(32487): Shutting down VM
E/AndroidRuntime(32487): FATAL EXCEPTION: main
E/AndroidRuntime(32487): Process: com.apps.bombdeal, PID: 32487
E/AndroidRuntime(32487): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.apps.bombdeal/com.apps.bombdeal.bombdeal}: java.lang.RuntimeException: Object reference was null
E/AndroidRuntime(32487): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2808)
E/AndroidRuntime(32487): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2873)
E/AndroidRuntime(32487): at android.app.ActivityThread.access$900(ActivityThread.java:181)
E/AndroidRuntime(32487): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1482)
E/AndroidRuntime(32487): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(32487): at android.os.Looper.loop(Looper.java:145)
E/AndroidRuntime(32487): at android.app.ActivityThread.main(ActivityThread.java:6145)
E/AndroidRuntime(32487): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(32487): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(32487): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
E/AndroidRuntime(32487): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
E/AndroidRuntime(32487): Caused by: java.lang.RuntimeException: Object reference was null
E/AndroidRuntime(32487): at com.apps.bombdeal.ActivityNativeEntryPoints.cppOnCreate(Native Method)
E/AndroidRuntime(32487): at com.apps.bombdeal.bombdeal.onCreate(bombdeal.java:150)
E/AndroidRuntime(32487): at android.app.Activity.performCreate(Activity.java:6374)
E/AndroidRuntime(32487): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
E/AndroidRuntime(32487): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2752)
E/AndroidRuntime(32487): ... 10 more

```

---

<div class="post-metadata">

**Author:** ![Baggers](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/baggers/32/665_2.png) [@Baggers](https://forums.fusetools.com/u/Baggers)\
**Post date:** [November 29, 2016, 3:18pm UTC](https://forums.fusetools.com/t/i-get-an-error-when-building-android/5212/2 "2016-11-29T15:18:48Z")

</div>

Hi Jahyun,

Sorry to hear that you are running into issues. Could you tell us what kind of android device you are testing on? Also are you building with `Gradle` and does running `uno clean` in the repo before building make any difference?

---

<div class="post-metadata">

**Author:** ![Mehdi.jarraya](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@Mehdi.jarraya](https://forums.fusetools.com/u/Mehdi.jarraya)\
**Post date:** [January 10, 2017, 2:55pm UTC](https://forums.fusetools.com/t/i-get-an-error-when-building-android/5212/3 "2017-01-10T14:55:11Z")

</div>

Hi Jahyun,

Try to remove NativeViewHost in your UX page.

---

<div class="post-metadata">

**Author:** ![Remi\_Pedersen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/remi_pedersen/32/432_2.png) [@Remi\_Pedersen](https://forums.fusetools.com/u/Remi_Pedersen)\
**Post date:** [January 10, 2017, 5:43pm UTC](https://forums.fusetools.com/t/i-get-an-error-when-building-android/5212/4 "2017-01-10T17:43:13Z")

</div>

Hi Mehdi,  
We’re not aware of NativeViewHost causing any issues like this. If you have experienced any trouble with it then please create a new thread and provide enough information to identify and (ideally) reproduce the issue. 🙂
