Building for Android fails


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:

Build started: FullCompile
(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
make: * No rule to make target /usr/local/share/uno/Packages/Fuse.Scripting.V8/0.19.3/lib/V8-Android/libv8_base.a', needed bylibs/armeabi-v7a/'.  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:

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!

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

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.

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.

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.

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:

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!

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! :slight_smile:

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)


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.