# Building for Android fails

**URL:** <https://forums.fusetools.com/t/building-for-android-fails/4961>\
**Category:** General\
**Created:** [January 13, 2016, 10:39am UTC](https://forums.fusetools.com/t/building-for-android-fails/4961 "2016-01-13T10:39:30Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rudi\_MK](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@Rudi\_MK](https://forums.fusetools.com/u/Rudi_MK)\
**Post date:** [January 13, 2016, 10:39am UTC](https://forums.fusetools.com/t/building-for-android-fails/4961/1 "2016-01-13T10:39:30Z")

</div>

Hello.

Love Fuse. Just downloaded the Weather sample app, and tried building it for Android. Before that, I also installed all the Android dependencies using `fuse install android` and it ran like a charm, no errors.

Now, after running `fuse preview --target=Android` - this is the console output:

```auto

Build started: FullCompile
Configuring
(3,727.45 ms)

Parsing source code
(6,358.82 ms)

Compiling syntax tree
(16,962.02 ms)

Installing dependencies
ERROR: /usr/local/share/uno/Packages/UnoCore/0.20.1/Targets/CPlusPlus/Prebuilt/$.stuff (Android): Access to the path "/Users/rudimk/.local/share/StuffCache" is denied.
ERROR: /usr/local/share/uno/Packages/Fuse.Scripting.V8/0.19.3/lib/$.stuff (V8-Android): Access to the path "/Users/rudimk/.local/share/StuffCache" is denied.
(24.19 ms)

Generating code and data
(38,116.07 ms)

Building native target
1/2: libweather_app.so
make: * No rule to make target /usr/local/share/uno/Packages/Fuse.Scripting.V8/0.19.3/lib/V8-Android/libv8_base.a&#39;, needed bylibs/armeabi-v7a/libweather_app.so'. Stop.
(unknown): E0000: Native build failed
?: Error E0000: Native build failed
(185.87 ms)

Build completed in 65.40 seconds.
    0 Warning(s)
    1 Error(s)

Error Summary
-------------

(unknown): E0000: Native build failed
Build ended
jdk was found.
Checking if /usr/local/share/uno/SDKs/AndroidSDK exists.
/usr/local/share/uno/SDKs/AndroidSDK was found.
Checking if /usr/local/share/uno/SDKs/AndroidSDK/tools exists.
/usr/local/share/uno/SDKs/AndroidSDK/tools was found.
Checking if Android SDK is corrupt.
Checking if all required Android components are installed.
androidsdk was found.
Checking if /Users/rudimk/Library/Android/sdk/ndk-bundle/ndk-build exists.
/Users/rudimk/Library/Android/sdk/ndk-bundle/ndk-build was found.
androidndk was found.
Checking if /usr/local/share/uno/SDKs/Ant exists.
/usr/local/share/uno/SDKs/Ant was found.
Checking if Ant is corrupt
ant was found.
fuse: Failed to compile project

```

At first, it seemed like something that could be fixed with sudo - so I ran `sudo fuse preview --target=Android`, and that returns:

```auto
fuse: Daemon handshake failed: Request failed: (6) - Daemon key was not right, maybe because daemon possesses wrong local user.

```

…ergo, root permissions are definitely not the problem here.

Would love to know where I’m going wrong. Thanks, yo!

---

<div class="post-metadata">

**Author:** ![Rudi\_MK](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@Rudi\_MK](https://forums.fusetools.com/u/Rudi_MK)\
**Post date:** [January 13, 2016, 10:44am UTC](https://forums.fusetools.com/t/building-for-android-fails/4961/2 "2016-01-13T10:44:52Z")

</div>

If it’s of any help - running `fuse preview` for a local preview works just fine.

---

<div class="post-metadata">

**Author:** ![Enguerran\_Henniart](https://avatars.discourse-cdn.com/v4/letter/e/13edae/32.png) [@Enguerran\_Henniart](https://forums.fusetools.com/u/Enguerran_Henniart)\
**Post date:** [January 13, 2016, 11:19am UTC](https://forums.fusetools.com/t/building-for-android-fails/4961/3 "2016-01-13T11:19:37Z")

</div>

Hi !

It basically looks like the user launching the `fuse preview` command doesn’t have the permission to write in `"/Users/rudimk/.local`.

You should run `ls -la` in `/Users/rudimk` to see the detailed permission on `.local`, and eventually run something like `chmod -R u+w .local`. But this also may be a bad idea if other executables are conflicting with this `.local` folder.

---

<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:** [January 13, 2016, 11:31am UTC](https://forums.fusetools.com/t/building-for-android-fails/4961/4 "2016-01-13T11:31:06Z")

</div>

Hi, could you please run `ls -ld ~ ~/.local/ ~/.local/share ~/.local/share/StuffCache` and paste the output here?

Could it be that you have run `fuse` as root the first time you ran it? That could have caused those directories to be created with the wrong owner.

---

<div class="post-metadata">

**Author:** ![Rudi\_MK](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@Rudi\_MK](https://forums.fusetools.com/u/Rudi_MK)\
**Post date:** [January 13, 2016, 11:54am UTC](https://forums.fusetools.com/t/building-for-android-fails/4961/5 "2016-01-13T11:54:27Z")

</div>

Thanks a bunch for that! Seems to be working, although the preview failed - probably have to create a new Android device for my emulator. But the build’s worked just perfect. Thanks a lot!

And, thanks for building Fuse. I swear I’m falling in love with it now.

---

<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:** [January 13, 2016, 12:03pm UTC](https://forums.fusetools.com/t/building-for-android-fails/4961/6 "2016-01-13T12:03:28Z")

</div>

Glad to hear you got it working!

I’m not 100% I understood your last post correctly, but note that our preview does not necessarily run in the Android emulator out of the box. It’s recommended to either use the normal Fuse preview, (`fuse preview` on the command line, or “local preview” in the Sublime Text plugin), or to preview on an actual Android device (`fuse preview --target=android` or “Android preview” in the plugin).

Note that you will get live reload on real devices as well as in the local preview, and that you can have several previews running at once, on several devices of various types. Doing stuff like this is pretty cool I think: [https://twitter.com/fusetools/status/685095209038921728](https://twitter.com/fusetools/status/685095209038921728).

---

<div class="post-metadata">

**Author:** ![Rudi\_MK](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@Rudi\_MK](https://forums.fusetools.com/u/Rudi_MK)\
**Post date:** [January 13, 2016, 12:21pm UTC](https://forums.fusetools.com/t/building-for-android-fails/4961/7 "2016-01-13T12:21:56Z")

</div>

Yes, I made a mistake there. I meant I hadn’t connected my phone to the Mac, so yeah. Sorry about that!

Live reloads on devices are a massive win. So helpful. Btw, when you say “several previews”, that means I can preview multiple apps in one go, on the device? That’s epic, man!

---

<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:** [January 13, 2016, 12:32pm UTC](https://forums.fusetools.com/t/building-for-android-fails/4961/8 "2016-01-13T12:32:33Z")

</div>

I was actually talking about previewing the same project on severeal devices and local previews. But yes, previewing several projects on the same device is also in fact possible, you just switch between the two preview apps like you would switch between any other two apps. No need to re-build! 🙂

 ![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/gRwhQexFgwHn-legacy-files-Qizo7NdJGV89okR9-8gNY8rEij_hEoItgOX2hQQV6.png)

---

<div class="post-metadata">

**Author:** ![mrcl3an2008](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/mrcl3an2008/32/646_2.png) [@mrcl3an2008](https://forums.fusetools.com/u/mrcl3an2008)\
**Post date:** [January 13, 2016, 11:02pm UTC](https://forums.fusetools.com/t/building-for-android-fails/4961/9 "2016-01-13T23:02:16Z")

</div>

I am running into the same error “fuse: Daemon handshake failed: Request failed: (6) - Daemon key was not right, maybe because daemon possesses wrong local user.”

I’ve only ever ran anything as my user I believe. The preview had been working fine and then all the sudden it stopped. Very strange. I’ve tried looking at the permission on the directories listed above. Are there any other places I can look? Is there a way maybe that I haven’t read about yet (or maybe skimmed over) that allows me to reset the owner of the project if it somewhow isn’t correct?

I’m on a MacBook Pro (OSX 10.10.5)

Thanks!

---

<div class="post-metadata">

**Author:** ![mrcl3an2008](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/mrcl3an2008/32/646_2.png) [@mrcl3an2008](https://forums.fusetools.com/u/mrcl3an2008)\
**Post date:** [January 13, 2016, 11:08pm UTC](https://forums.fusetools.com/t/building-for-android-fails/4961/10 "2016-01-13T23:08:30Z")

</div>

Actually, I just did a “fuse kill-all” and then reran “fuse preview” and it worked! I guess the daemon was running and somehow I got disconnected from it or something.
