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)
(unknown): E0000: Native build failed FATAL ERROR: Build failed. fuse: Errors were encountered while building the project
Hope you can help.
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.
Thanks for that. Adding -v resulted in the following info:
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
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 )
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 and then rerun
fuse install android. Sorry for the inconvenience.
I have the latest version, 12.4 and this is still an issue. Preview doesn’t work at all.
Hi Karl, can you please run the following commands, and paste the full output here?
fuse preview -tandroid -v
fuse install -s android
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-’
C:\Users\Dave's>fuse preview -tandroid -v
fuse: Could not find a fuse project to preview
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.
Fuse version 0.12.4 (build 6406)
Copyright (C) 2016 Fusetools
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.
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?
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.
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)
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.
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!
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.
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:
%localappdata%\Fusetools\Fuse\Android\AndroidNDK to a path that doesn’t contain
', for example
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).
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.
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.