# Android build failed: fatal error

**URL:** <https://forums.fusetools.com/t/android-build-failed-fatal-error/1524>\
**Category:** Bug Reports\
**Created:** [January 15, 2016, 10:40am UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524 "2016-01-15T10:40:23Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex.dejong](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@alex.dejong](https://forums.fusetools.com/u/alex.dejong)\
**Post date:** [January 15, 2016, 10:40am UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/1 "2016-01-15T10:40:23Z")

</div>

Hi Folks,

I recently rebuilt my mac and I’m setting up Fuse again now. I can preview the Example Fuse app Locally but running into a problem when building for Android.

I have jdk1.8.0\_65 installed.

“fuse install android” verifies that everything is ok.

However I get the following when I try and build or preview for android:

fuse build -t=android Uno 0.20.1-OSX (build 902)

Configuring (2,664.38 ms)

Parsing source code (5,572.30 ms)

Compiling syntax tree (15,065.14 ms)

Generating code and data (26,963.25 ms)

Building native target 1/2: libBlankProject1501.so 2/2: BlankProject1501-debug.apk (78,644.65 ms)

(unknown): E0000: Native build failed Build completed in 128.92 seconds. 0 Warning(s) 1 Error(s)

## Error Summary

(unknown): E0000: Native build failed FATAL ERROR: Build failed. fuse: Errors were encountered while building the project

Hope you can help.

## Regards,

Alex

---

<div class="post-metadata">

**Author:** ![Emil\_Sandsto](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/emil_sandsto/32/523_2.png) [@Emil\_Sandsto](https://forums.fusetools.com/u/Emil_Sandsto)\
**Post date:** [January 15, 2016, 7:10pm UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/2 "2016-01-15T19:10:00Z")

</div>

Hi Alex,

Could you please try to run `fuse build -t=android -v`. By adding `-v` you get verbose info from the compiler that makes it easier for us to troubleshoot.

---

<div class="post-metadata">

**Author:** ![alex.dejong](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@alex.dejong](https://forums.fusetools.com/u/alex.dejong)\
**Post date:** [January 18, 2016, 9:51am UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/3 "2016-01-18T09:51:36Z")

</div>

Hi Emil,

Thanks for that. Adding -v resulted in the following info:

```auto
Error: JAVA_HOME is not defined correctly.
  We cannot execute /Library/Java/JavaVirtualMachines/Contents/Home/bin/java
---
(exit code: 1)

```

I tried setting JAVA\_HOME and also added it to my PATH

```auto
echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home

```

However this still resulted in the same error; suggesting Fuse wasn’t actually using the value in $JAVA\_HOME. As a workaround I’ve created a link from the /Library/Java/JavaVirtualMachines/ directory to the /Library/Java/JavaVirtualMachines/jdk1.8.0\_65.jdk/Contents/Home directory which worked.

(if anyone else is looking to do the same, just navigate to /Library/Java/JavaVirtualMachines/ in the terminal and execute the command `sudo ln -s ./jdk1.8.0_65.jdk/Contents/ ./Contents` )

Alex

---

<div class="post-metadata">

**Author:** ![Emil\_Sandsto](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/emil_sandsto/32/523_2.png) [@Emil\_Sandsto](https://forums.fusetools.com/u/Emil_Sandsto)\
**Post date:** [January 22, 2016, 7:02pm UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/4 "2016-01-22T19:02:13Z")

</div>

This should have been fixed in Fuse v0.9.7.

I suggest you to download the latest version from here [https://www.fusetools.com/downloads](https://www.fusetools.com/downloads) and then rerun `fuse install android`. Sorry for the inconvenience.

---

<div class="post-metadata">

**Author:** ![Karl](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@Karl](https://forums.fusetools.com/u/Karl)\
**Post date:** [May 25, 2016, 3:07am UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/5 "2016-05-25T03:07:40Z")

</div>

I have the latest version, 12.4 and this is still an issue. Preview doesn’t work at all.

---

<div class="post-metadata">

**Author:** ![Anders\_Schau\_Knatten](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_schau_knatten/32/41_2.png) [@Anders\_Schau\_Knatten](https://forums.fusetools.com/u/Anders_Schau_Knatten)\
**Post date:** [May 25, 2016, 6:50am UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/6 "2016-05-25T06:50:48Z")

</div>

Hi Karl, can you please run the following commands, and paste the full output here?

`fuse preview -tandroid -v`

`fuse install -s android`

`fuse --version`

`uno config`

---

<div class="post-metadata">

**Author:** ![davymarshall](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@davymarshall](https://forums.fusetools.com/u/davymarshall)\
**Post date:** [May 25, 2016, 3:59pm UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/7 "2016-05-25T15:59:26Z")

</div>

I seem to have a simular problem, however I’m new to all of this so it could be something I’m doing wrong. Here is the Report when I ran with ‘V-’

```auto
C:\Users\Dave's>fuse preview -tandroid -v
fuse: Could not find a fuse project to preview

C:\Users\Dave's>
C:\Users\Dave's>fuse install -s android
# Verifying install status of JDK
Checking if C:\Program Files\Java\jdk1.7.0_79 exists.
C:\Program Files\Java\jdk1.7.0_79 was found.
Checking if JDK is corrupt
jdk was found.
# Verifying install status of AndroidSDK
Checking if C:\Users\Dave's\AppData\Local\Android\sdk exists.
C:\Users\Dave's\AppData\Local\Android\sdk was found.
Checking if C:\Users\Dave's\AppData\Local\Android\sdk\tools exists.
C:\Users\Dave's\AppData\Local\Android\sdk\tools was found.
Checking if Android SDK is corrupt.
Checking if all required Android components are installed.
androidsdk was found.
# Verifying install status of AndroidNDK
Checking if C:\Users\Dave's\AppData\Local\Fusetools\Fuse\Android\AndroidNDK\ndk-build exists.
C:\Users\Dave's\AppData\Local\Fusetools\Fuse\Android\AndroidNDK\ndk-build was found.
Checking if C:\Users\Dave's\AppData\Local\Fusetools\Fuse\Android\AndroidNDK\toolchains exists.
C:\Users\Dave's\AppData\Local\Fusetools\Fuse\Android\AndroidNDK\toolchains was found.
Checking if C:\Users\Dave's\AppData\Local\Fusetools\Fuse\Android\AndroidNDK\prebuilt exists.
C:\Users\Dave's\AppData\Local\Fusetools\Fuse\Android\AndroidNDK\prebuilt was found.
androidndk was found.
# Verifying install status of Ant
Checking if C:\Users\Dave's\AppData\Local\Fusetools\Fuse\Android\Ant exists.
C:\Users\Dave's\AppData\Local\Fusetools\Fuse\Android\Ant was found.
Checking if Ant is corrupt
ant was found.
android is installed.

C:\Users\Dave's>
C:\Users\Dave's>fuse --version
Fuse version 0.12.4 (build 6406)
Copyright (C) 2016 Fusetools

C:\Users\Dave's>
C:\Users\Dave's>uno config

```

I’m Useing the test project, But it’s saying it can’t find a project. Just a little confused. It seems to work fine on the local Preview.

---

<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:** [May 25, 2016, 7:15pm UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/8 "2016-05-25T19:15:04Z")

</div>

Hi Dave! When you run fuse without a target project path, like `C:\Users\Dave's>fuse preview -tandroid -v` it will look for a suitable project to preview in the current directory. If there’s no .unoproj file in `C:\Users\Dave's` then you’ll get the error you reported.

Did you run the local preview the same way (only without `-tandroid`) or did you start it from the GUI?

---

<div class="post-metadata">

**Author:** ![davymarshall](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@davymarshall](https://forums.fusetools.com/u/davymarshall)\
**Post date:** [May 26, 2016, 12:06pm UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/9 "2016-05-26T12:06:59Z")

</div>

I started both previews by right clicking in Sublime, the Local worked, The Android didn’t. I’m going to try again today, see if I can make it work.

---

<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:** [May 26, 2016, 12:13pm UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/10 "2016-05-26T12:13:58Z")

</div>

Great! I’m sure we can get this one worked out as well. 🙂

From the command line, cd into the directory containing the .unoproj of the project that failed and do `fuse build -tandroid -v` and let’s see what the log says. (Doing a verbose _build_ provides more sensible output than a verbose preview)

---

<div class="post-metadata">

**Author:** ![davymarshall](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@davymarshall](https://forums.fusetools.com/u/davymarshall)\
**Post date:** [May 26, 2016, 12:36pm UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/11 "2016-05-26T12:36:50Z")

</div>

![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/pAFxbCIAfhb9-legacy-files-URiU0J8x2jUaMknx-ELfl5T4QMA66IaUxlMZmat8Z.PNG)

 ![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/1HImfwlwQDj8-legacy-files-wv0c4UdiUGc4pI3S-ASfRZJY_VjbPneYob3KiNf2_.PNG)

I was following the Tutorials, as you see from the first screenshot I was getting a local preview, the second shows the error I recieved when trying to preview on android.

---

<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:** [May 26, 2016, 1:00pm UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/12 "2016-05-26T13:00:31Z")

</div>

Thanks, this gives us a bit more to work with. 🙂

We suspect it _might_ be related to the apostrophe in your username (and something in the Android NDK not dealing very well with it). We’ll dig in a bit further and let you know what we find!

---

<div class="post-metadata">

**Author:** ![davymarshall](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@davymarshall](https://forums.fusetools.com/u/davymarshall)\
**Post date:** [May 26, 2016, 1:09pm UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/13 "2016-05-26T13:09:16Z")

</div>

![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/CWioNFrEC8EI-legacy-files-C43tQ3YUGYwO9xcL-lUZC8zk9sXOLddlh3l1EzaTa.PNG)

 ![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/oxTASER1rGKU-legacy-files-jIS17q5yoS3t66Ab-1_tHj28ZC89tbR5185Iq2oFU.PNG)

This is the report from the command Prompt. As I say I’m quite new to all this, so it is more than likely something I’ve done wrong, but I’m enjoying learning and Fuse is a great product, with excelent Tutorials. Keep on doing what your doing.

---

<div class="post-metadata">

**Author:** ![Emil\_Sandsto](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/emil_sandsto/32/523_2.png) [@Emil\_Sandsto](https://forums.fusetools.com/u/Emil_Sandsto)\
**Post date:** [May 26, 2016, 1:37pm UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/14 "2016-05-26T13:37:24Z")

</div>

Hi,

We are able to reproduce the issue, and it’s related to the apostrophe in your username. The fix will not be released in a while, however here is a **workaround** :

1. Move `%localappdata%\Fusetools\Fuse\Android\AndroidNDK` to a path that doesn’t contain `'`, for example `C:\`
2. Run `fuse install android`, and when asked to provide an existing path to the AndroidNDK, provide the path to the new location (the location of where you moved the NDK).

---

<div class="post-metadata">

**Author:** ![davymarshall](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@davymarshall](https://forums.fusetools.com/u/davymarshall)\
**Post date:** [May 26, 2016, 3:03pm UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/15 "2016-05-26T15:03:41Z")

</div>

Hi, thanks, I will try that. I was going to change the name of the folder but I’m on windows Home addition and it doesn’t allow you to do that.

---

<div class="post-metadata">

**Author:** ![davymarshall](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@davymarshall](https://forums.fusetools.com/u/davymarshall)\
**Post date:** [May 26, 2016, 3:58pm UTC](https://forums.fusetools.com/t/android-build-failed-fatal-error/1524/16 "2016-05-26T15:58:50Z")

</div>

Well that worked, Thanks. Also for other Noobs. on old Samsungs make sure the USB is set to PTP rather than MTP. That was another thing that was stopping it from working.
