Android Preview not working since v21. and now v27!

I’ve reinstalled Java, Android SDK, Fuse ( and upgraded ) and still can’t preview to Android devices. Now with v27. I get the following.
I have the latest SDK but Fuse keep redirecting to the default and earlier 1.6 version even after I entered the correct path in ~/.fuse/sdkConfig.json

Checking if JDK is corrupt
Found JDK version 1.6.65. However Fuse requires a JDK version that is higher than version 1.6.
jdk was not found.
Checking if /Users/WebbratStudios/Library/Application Support/Fusetools/Fuse/Android/AndroidNDK/toolchains exists.
/Users/WebbratStudios/Library/Application Support/Fusetools/Fuse/Android/AndroidNDK/toolchains was found.
Checking if /Users/WebbratStudios/Library/Application Support/Fusetools/Fuse/Android/AndroidNDK/prebuilt exists.
/Users/WebbratStudios/Library/Application Support/Fusetools/Fuse/Android/AndroidNDK/prebuilt was found.
androidndk was found.
Checking if /Users/WebbratStudios/Library/Application Support/Fusetools/Fuse/Android/Ant exists.
/Users/WebbratStudios/Library/Application Support/Fusetools/Fuse/Android/Ant was found.
Checking if Ant is corrupt
ant was found.
?: Error F0001: Looks like Android is not installed. Please run 'fuse install android' first.
Build ended
fuse: Failed to compile project

Hi, can you please share the content of your ~/.fuse/sdkConfig.json, as well as the output from uno config? If you don’t want to do that publicly, you can upload it to https://www.dropbox.com/request/ZgndLtJQm5eGzG9cicGK.

Here is the content of my sdkconfig.json file:

{
	"AndroidSDK":{"Path":"[user home]/dev/android-sdk"},
	"AndroidNDK":{"Path":"[user home]/Library/Application Support/Fusetools/Fuse/Android/AndroidNDK"},
	"JDK":{"Path":"/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk","PathPattern":"*.jdk"},
	"Ant":{"Path":"[user home]/Library/Application Support/Fusetools/Fuse/Android/Ant"},
	"BuildToolsVersion":"22.0.1"
}

…and by “uno config” do you mean the *.unoproj file?

{
  "RootNamespace":"",
  "Packages": [
  	"Fuse",
  	"FuseJS"
  ],
  "Includes": [
    "*"
  ]
}

Sorry, I meant the output of running the command uno config in a terminal. The output of fuse install -s android would also be of help.

I had already tried fuse install android. Below is the output of uno config

Uno 0.38.2 (build 3913) OS X 10.11 i386 255da1e

Uno settings
  Android.NDK.Directory      [user home]/Library/Application Support/Fusetools/Fuse/Android/AndroidNDK
  Android.SDK.BuildToolsVersion (../../../../../../../Library/Application Support/Fusetools/Fuse/Android) 22.0.1
  Android.SDK.Directory      [user home]/dev/android-sdk
  AndroidNdkDirectory        [user home]/Library/Application Support/Fusetools/Fuse/Android/AndroidNDK
  AndroidSdkDirectory        [user home]/dev/android-sdk
  Ant.Directory              [user home]/Library/Application Support/Fusetools/Fuse/Android/Ant
  ApacheAntDirectory         [user home]/Library/Application Support/Fusetools/Fuse/Android/Ant
  Apps.Disasm                (/Applications/Fuse.app/Contents/Uno) Uno Disasm.app
  Assemblies.PerfCmp         (/Applications/Fuse.app/Contents/Uno) uno-perf-cmp.exe
  Assemblies.PerfTest        (/Applications/Fuse.app/Contents/Uno) uno-perf-test.exe
  Assemblies.Plugins         (/Applications/Fuse.app/Contents/Uno) Uno.Compiler.Extensions.dll
  Assemblies.Test            (/Applications/Fuse.app/Contents/Uno) uno-test.exe
  Assemblies.TestGen         (/Applications/Fuse.app/Contents/Uno) uno-test-gen.exe
  Assemblies.Uno             (/Applications/Fuse.app/Contents/Uno) uno.exe
  IsRoot                     (/Applications/Fuse.app/Contents/Uno) false
  Java.JDK.Directory         /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
  JavaJdkDirectory           /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
  ModulesDirectory           (/Applications/Fuse.app/Contents) Modules
  Mono                       /Applications/Fuse.app/Contents/Mono/bin/mono
  Packages.Default           (/Applications/Fuse.app/Contents/Uno) Fuse
                             (/Applications/Fuse.app/Contents/Uno) FuseJS
  Packages.Feeds             https://api.fusetools.com/packages/v1/nuget/v2
  Packages.InstallDirectory  (/Applications/Fuse.app/Contents/Uno) ../lib
  Packages.SearchPaths       (/Applications/Fuse.app/Contents) Packages
                             /usr/local/share/uno/Packages
                             (/Applications/Fuse.app/Contents) ../../Packages
                             (/Applications/Fuse.app/Contents/Uno) ../Packages
  Paths.AppLoader            (/Applications/Fuse.app/Contents/Uno) .
  Paths.NativeLib            (/Applications/Fuse.app/Contents/Uno) .
  SdkConfig                  [user home]/Library/Application Support/Fusetools/Fuse/Android/.sdkconfig
  TemplatesDirectory         (/Applications/Fuse.app/Contents) Templates

Config files
  /Applications/Fuse.app/Contents/Uno/.unoconfig
  /Applications/Fuse.app/Contents/Uno/common.unoconfig
  /usr/local/share/uno/SDKs/.sdkconfig
  ../../../../../../../Library/Application Support/Fusetools/Fuse/Android/.sdkconfig
  /Applications/Fuse.app/Contents/Uno/mac.unoconfig
  /Applications/Fuse.app/Contents/.unoconfig
  /Applications/Fuse.app/Contents/Fuse.unoconfig

.NET assemblies
  /Applications/Fuse.app/Contents/Mono/lib/mono/4.5/mscorlib.dll (4.0.0.0)
  /Applications/Fuse.app/Contents/Mono/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll (4.0.0.0)
  /Applications/Fuse.app/Contents/Mono/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll (4.0.0.0)
  /Applications/Fuse.app/Contents/Uno/stuff.exe (1.2.4.0)
  /Applications/Fuse.app/Contents/Uno/Mono.Options.dll (4.0.0.0)
  /Applications/Fuse.app/Contents/Uno/AjaxMin.dll (5.14.5506.26196)
  /Applications/Fuse.app/Contents/Uno/Microsoft.Web.XmlTransform.dll (2.1.0.0)
  /Applications/Fuse.app/Contents/Uno/Minimatch.dll (1.1.0.0)
  /Applications/Fuse.app/Contents/Uno/MonoMac.dll (0.0.0.0)
  /Applications/Fuse.app/Contents/Uno/Newtonsoft.Json.dll (8.0.0.0)
  /Applications/Fuse.app/Contents/Uno/NuGet.Common.dll (3.4.3.0)
  /Applications/Fuse.app/Contents/Uno/NuGet.Core.dll (2.11.1.812)
  /Applications/Fuse.app/Contents/Uno/NuGet.Frameworks.dll (3.4.3.0)
  /Applications/Fuse.app/Contents/Uno/NuGet.Logging.dll (3.4.3.0)
  /Applications/Fuse.app/Contents/Uno/NuGet.Packaging.Core.Types.dll (3.4.3.0)
  /Applications/Fuse.app/Contents/Uno/NuGet.Packaging.Core.dll (3.4.3.0)
  /Applications/Fuse.app/Contents/Uno/NuGet.Packaging.dll (3.4.3.0)
  /Applications/Fuse.app/Contents/Uno/NuGet.Versioning.dll (3.4.3.0)
  /Applications/Fuse.app/Contents/Uno/Uno.Native.dll (1.0.0.0)
  /Applications/Fuse.app/Contents/Uno/Uno.Runtime.Core.dll (0.0.0.0)

Fuse install android with the “s” flag, however, states that Android is not intsalled

Hi, there seems to be an inconsistency in Fuse regarding which configuration variables we use to pick up the JDK. We’ll fix this in a future version, but in the mean time you can fix it by doing the following:

  • Delete /usr/local/share/uno/SDKs
  • Open [user home]/Library/Application Support/Fusetools/Fuse/Android/.sdkconfig, and modify JavaJdkDirectory to point to the same directory as Java.JDK.Directory.

I had already modified the .sdkconfig file. It is still returning the same error. Also it seems to be looking for an addon sdk 23 or something but keep failing to fetch it. Broken links maybe?

If you have set the correct path to JavaJdkDirectory in [user home]/Library/Application Support/Fusetools/Fuse/Android/.sdkconfig, it must be picking up a conflicting value from one of the other files listed under “Config files” when you do uno config. Have you deleted /usr/local/share/uno/SDKs? It could be picking it up from there. What does [user home]/Library/Application Support/Fusetools/Fuse/Android/.sdkconfig look like now?

As for the sdk 23 issue, which command are you running that results in this error, and what’s the actual output?

Sorry! I was trying to upload a screen shot but didn’t work. The command for that output is “fuse install android”. It says that additional software needs to be installed after which it lists several failures to fetch the said software ![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/yAI0rgyquokh-image-1477484437814.20.09 AM.png)

new uno config output:

Uno 0.38.2 (build 3913) OS X 10.11 i386 255da1e

Uno settings
  Android.NDK.Directory      /[ user home]Library/Application Support/Fusetools/Fuse/Android/AndroidNDK
  Android.SDK.BuildToolsVersion (../../../../../../../Library/Application Support/Fusetools/Fuse/Android) 22.0.1
  Android.SDK.Directory      /[ user home]dev/android-sdk
  Ant.Directory              /[ user home]Library/Application Support/Fusetools/Fuse/Android/Ant
  Apps.Disasm                (/Applications/Fuse.app/Contents/Uno) Uno Disasm.app
  Assemblies.PerfCmp         (/Applications/Fuse.app/Contents/Uno) uno-perf-cmp.exe
  Assemblies.PerfTest        (/Applications/Fuse.app/Contents/Uno) uno-perf-test.exe
  Assemblies.Plugins         (/Applications/Fuse.app/Contents/Uno) Uno.Compiler.Extensions.dll
  Assemblies.Test            (/Applications/Fuse.app/Contents/Uno) uno-test.exe
  Assemblies.TestGen         (/Applications/Fuse.app/Contents/Uno) uno-test-gen.exe
  Assemblies.Uno             (/Applications/Fuse.app/Contents/Uno) uno.exe
  IsRoot                     (/Applications/Fuse.app/Contents/Uno) false
  Java.JDK.Directory         /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
  ModulesDirectory           (/Applications/Fuse.app/Contents) Modules
  Mono                       /Applications/Fuse.app/Contents/Mono/bin/mono
  Packages.Default           (/Applications/Fuse.app/Contents/Uno) Fuse
                             (/Applications/Fuse.app/Contents/Uno) FuseJS
  Packages.Feeds             https://api.fusetools.com/packages/v1/nuget/v2
  Packages.InstallDirectory  (/Applications/Fuse.app/Contents/Uno) ../lib
  Packages.SearchPaths       (/Applications/Fuse.app/Contents) Packages
                             /usr/local/share/uno/Packages
                             (/Applications/Fuse.app/Contents) ../../Packages
                             (/Applications/Fuse.app/Contents/Uno) ../Packages
  Paths.AppLoader            (/Applications/Fuse.app/Contents/Uno) .
  Paths.NativeLib            (/Applications/Fuse.app/Contents/Uno) .
  SdkConfig                  /[ user home]Library/Application Support/Fusetools/Fuse/Android/.sdkconfig
  TemplatesDirectory         (/Applications/Fuse.app/Contents) Templates

Config files
  /Applications/Fuse.app/Contents/Uno/.unoconfig
  /Applications/Fuse.app/Contents/Uno/common.unoconfig
  ../../../../../../../Library/Application Support/Fusetools/Fuse/Android/.sdkconfig
  /Applications/Fuse.app/Contents/Uno/mac.unoconfig
  /Applications/Fuse.app/Contents/.unoconfig
  /Applications/Fuse.app/Contents/Fuse.unoconfig

.NET assemblies
  /Applications/Fuse.app/Contents/Mono/lib/mono/4.5/mscorlib.dll (4.0.0.0)
  /Applications/Fuse.app/Contents/Mono/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll (4.0.0.0)
  /Applications/Fuse.app/Contents/Mono/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll (4.0.0.0)
  /Applications/Fuse.app/Contents/Uno/stuff.exe (1.2.4.0)
  /Applications/Fuse.app/Contents/Uno/Mono.Options.dll (4.0.0.0)
  /Applications/Fuse.app/Contents/Uno/AjaxMin.dll (5.14.5506.26196)
  /Applications/Fuse.app/Contents/Uno/Microsoft.Web.XmlTransform.dll (2.1.0.0)
  /Applications/Fuse.app/Contents/Uno/Minimatch.dll (1.1.0.0)
  /Applications/Fuse.app/Contents/Uno/MonoMac.dll (0.0.0.0)
  /Applications/Fuse.app/Contents/Uno/Newtonsoft.Json.dll (8.0.0.0)
  /Applications/Fuse.app/Contents

And .sdkconfig:

{
"Android.SDK.Directory":"/[user home]/dev/android-sdk",
"Android.NDK.Directory":"/[user home]/Library/Application Support/Fusetools/Fuse/Android/AndroidNDK",
"Ant.Directory":"/[user home]/Library/Application Support/Fusetools/Fuse/Android/Ant",
"Java.JDK.Directory":"/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home",
"Android.SDK.BuildToolsVersion":"22.0.1"}
}

Yes, I deleted directory at /usr/local/share/uno/SDKs

Ok, it looks like your JDK issues should be resolved now, and that you just need to install platform 23 tools.

Which exact errors do you get from fuse install android when it tries to do that?

How do I install this platform 23? Is this referring to an Android API? If so, I ran the “android” command and I there is no API 23 listed. The most recent I have is API 22. As mentioned above, the command ( fuse install android) , asks to install additional software. The output:

![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/AhSsJMmAbxsh-image-1477490210310.54.28 AM.png)

It might be that you have several versions of the android command installed. If you launch it using uno android you should get the one that Fuse uses.

However, I think we first need to find out why fuse install android fails, as this is supposed to take care of things for you.

It looks like you are unable to connect to dl.google.com. Are you behind a firewall that could be blocking you? What happens if you try to visit https://dl.google.com/android/repository/addons_list-2.xml in your web browser?

Hi Karl,

I had the same problem. My fix:

  1. Delete all Android SDKs (I also deleted Android Studio, but I’m not sure that’s necessary)
  2. Remove old java JKDs (The folder C:\Program Files\Java now only contains the 1.8.0 version)
  3. Delete Fuse
  4. Download new Fuse version
  5. Install Fuse
  6. Open your project via Fuse dashboard
  7. Open command
  8. uno clean your project
  9. fuse install android (let Fuse install all Android SDKs)

After these steps by build en preview worked again, maybe you could give it a try.

Thanks for that toine! I however think he first needs to find out why his computer can’t connect to dl.google.com, or he won’t get step 9 to work anyway.

Hello and thanks @toine but I’m on Mac. I’ve already done 3 - 9 yet it is still not working. @Anders, the XML loads but with errors:

![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/XxkNcmBMFuV7-image-1477503050756.11.11 AM.png)

To explain a bit more what’s going on: fuse install android is trying to install the various tools you need to build for Android. To do that, it needs to contact the Google servers to download software and meta-data. In the error message you pasted above, it says Unknown host dl.google.com, which means it cannot connect to Google’s servers. This might be due to temporary network problems, or because you are behind a firewall (your own, your company’s or your government’s). That’s why I asked you to paste the url in a browser. It seems you are able to access that url just fine in a browser, so then I don’t understand why you couldn’t through fuse install android.

Could it be that you had temporary network issues? Can you try fuse install android again and see if you still get the same message? If so, can you try to disable any firewall you have running on your Mac?

By the way, the message about lacking style information can be ignored. It is just a message from Chrome that it doesn’t know how to display this xml file from Google. Which is fine, since it is not meant for humans anyway.

By the way, you could also try the following commands to diagnose your connection to Google:

host dl.google.com
ping dl.google.com
curl -I dl.google.com

I did that already! I figured it out. However, during the “fuse preview -t android” command, I keep getting this error:

WARNING: Failed to lock /usr/local/share/uno/Packages/Fuse.Scripting.V8/0.38.6/lib/.stuff/OSX.lock, /var/folders/_d/4myrth7x057_b4lls_8h9n5m0000gn/T/.stuff/httpsaz664292vomsecndnetfilestu8kdw6def9c63t8-osxzip-925784345.zip.lock;

Ok, so you’ve now successfully done fuse install android, and it doesn’t print any error messages? What does uno config say now?

I finally got everything to work! After scratching my head for two days, I checked my .zshrc file and found out why fuse kept pointing to the old version of Java. I changed the “java_home” path to the new JDK did the “fuse install android” command. When asked I entered the same path as in “java_home” in the terminal and presto the error for Java stopped showing. As for the Android bit, I was tempted to reinstall it (that’d be a nightmare!). Instead I ran the “android” command to find the mysterious platform 23. The big issue with the Android SDK is its terribly slow and seems to have some issues connecting to its servers / external sites. I had to run it several times to get platform 23 and each time a different set of platforms were either listed or disappeared.