unhandled exception: Failed to run app.


I’m new to fuse, saw an ad on Twitter yesterday and trying it today. I had already Android Studio and have all of the SDK-files. I’ve tried to preview the app on my phone, but it doesn’t work cuz I’m getting some error. I have USB/Network -debugging and have no troubles too debug from Android Studio.

fuse: unhandled exception: Failed to run app.
Trying to uninstall existing version of APK
Couldn't find the filepath
(exit code: 1)

   at Uno.Build.BuildResult.Run(Logger log, Boolean newline) in c:\BuildAgent-1\work\397767071b813b09\Source\Build\Uno.Build\BuildResult.cs:line 75
   at Outracks.Fuse.Preview.PreviewExported.RunExported(PreviewArguments args, BuildId buildId, PreviewTarget target, CacheCleaner cacheCleaner)
   at Outracks.Fuse.Preview.PreviewExportedWithVerification.Run(PreviewArguments args, PreviewTarget target, CacheCleaner cacheCleaner)
   at Outracks.Fuse.Preview.PreviewMain.Run(PreviewArguments args, IMessagingService client)
   at Outracks.Fuse.Preview.PreviewWithDaemon.Preview(PreviewArguments argument)
   at Outracks.Fuse.Preview.CLI.PreviewCliCommand.RunInternal(String[] args)
   at Outracks.Fuse.Preview.CLI.PreviewCliCommand.Run(String[] args)
   at Outracks.Fuse.LazyCliCommand.Run(String[] args)
   at Outracks.CLI.CliProgram.<>cDisplayClass4.<Main>b0(String arg)
   at Outracks.Optional1.Do(Action1 some, Action none)
   at Outracks.CLI.CliProgram.Main(String[] args)
Unhandled exception: Failed to run app.

I’ve tried serveral times by creating new projects, removing old, reinstall the software and plugins, but no luck. Also unchecked USB-debugging and checked it again. I have researched the problem and doesn’t find any solution, I need help.

So is it a bug in this release or have I any kind of configuration-fault on my side? Thanks in advance!

Regards, Davvarn

Btw, the problem doens’t appear while previewing it in local, only to my phone(Android)…

Does the project name contain any spaces? That is currently known to fail (to be fixed soon).

If not, could you try to build the project for android with verbose output and send us the full log? (You do this by building from the command line. Navigate to the project folder and do fuse build -t=android -v -r)

No the project name doesn’t contain spaces, but I had the project folder inside a folder I call “Android Projects” where I store every android projects, so I created a new project with the Example Project and named it without spaces also and stored it in “default-save-location” called Fuse. No success this way either, same error.

What do you mean with “send us the full log” exactly, it doesn’t output any new “log”-file. Should I copy all lines in commandprompt and paste it here?

Yes please, that’s exactly what I meant. :slight_smile:

Should I output it straight into this forum or upload it somewhere and then link? It’s many lines, thats why I’m wondering… :slight_smile:

Excellent point. :slight_smile: You can upload it here: https://www.dropbox.com/request/Rx1QN3QluvxAJiyGJqrh


Hi, your log says ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.

Can you please run fuse install android to make sure it gets set correctly? Since you already have the SDKs installed, you can just give it those paths when it asks, to avoid us installing a second copy for you.

Oh, and in case you want to handle all of this manually: Fuse requires API levels 19 and 21.

# Starting Ant installer
Verifies that Ant is installed and valid.
Checking if C:\ProgramData\Uno\SDKs\Ant exists.
C:\ProgramData\Uno\SDKs\Ant was found.
Checking if Ant is corrupt
Ant was found here 'C:\ProgramData\Uno\SDKs\Ant'
Done installing Ant

Got same errormessage when previewing it to my phone…

Any ideas what to do? Tried to install Fuse into my laptop on a recent fresh install of Windows(which means no Android SDK files that can interfere. But I get the exact same errormessage, so is it my phone that doesn’t support it? I have an LG G3 D855 with Cyangenomod 13(Nightlies) which is Android Marshmallow (6.0). Does Fuse work on Marshmallow or is it every version below such as Lollipop?

Thanks in advance!

Regards, Davvarn

The ANT_HOME was a false lead. The log file shows that the build completes anyway (which makes sense as we get the correct paths from the SDK config). We’ll make sure the misleading printout is fixed.

But back to the case at hand: what happens if you try to manually install the apk that Fuse built? Would also be good to see if there’s any diff between the adb installed by Fuse vs. the one you already had from Android Studio (which would be the one in PATH).

E.g. try these two and see if any of them work: %programdata%\uno\sdks\androidsdk\platform-tools\adb install <PATH TO APK> and adb install <PATH TO APK>

Where do I find the apk-file then?

In this case it’s under .build\Android-Debug\bin\ inside the project directory.

Nope there is not even a Android-Debug folder in any of my project-folders… Just Simulator

Ah, the log you uploaded showed that you had one, but that was of course because you did a regular build (fuse build -t=android) as described earlier in this thread: https://www.fusetools.com/community/forums/permalink/9b16b742-8116-4e4c-b1ab-e2514261a785

If you do a regular build it ends up in .build\Android-Debug\bin\. If you do a preview the apk ends up in .build\Simulator\Android\bin\

It seems for some weird reason/reasons to work now, doens’t now if it because of setting the ANT manually…