Preview and Export Fail (Android)

Fuse version: 1.0.3 (build 13739) (Pro trial version)

Operating system version: Windows 10

Whether previewing or exporting from Fusetool’s menu or from command line, the build fails with an exception every time. The error message is “Error: com.android.builder.internal.aapt.AaptException: Failed to crunch file” with a reference to the file path which ends with “\build\Android\Debug\app\build\intermediates\res\merged\debug\drawable-ldrtl-hdpi-v17\abc_ic_ab_back_mtrl_am_alpha.png”

As far as I know, I installed everything correctly, ran uno clean after updating to the latest version of Fuse, installed the correct drivers, etc.

Your help is appreciated, thanks!

Hi Angela,

seems like you have hit an OS path length limit. Can you try to put the project some levels higher in directory tree or maybe rename the file and/or containing folders?

Thanks Uldis! I moved the project higher in the directory tree and shortened the name. Now it is throwing another exception: Execution failed for task ':app:externalNativeBuildDebug'.

Error while executing 'C:\Users\username\AppData\Local\Fusetools\Fuse\Android\AndroidSDK\cmake\3.6.4111459\bin\cmake.exe' with arguments {--build C:\directory-name\app-name\build\Android\Preview\app\.externalNativeBuild\cmake\debug\armeabi-v7a --target appname}

Alright, does that happen only on one particular project? Can you create a new, clean example project and preview/build that?

Sorry for the delay, I just wanted to try to solve as much as possible on my own before re-posting.

Thanks for your suggestion. It was very helpful. I was able to preview a clean project successfully. After that, I downloaded your sample Alive project and I was able to also successfully preview it (however, after several minutes exploring the app, the preview on my computer monitor froze, then eventually the Android preview froze, which happened a few times - a separate issue).

I then tested my project by copying it into a new project, saved to another location. This failed to build. After much experimentation and tinkering, I finally found the problem. It was an invalid character in the name of one of the assets, a French accent. By renaming the file, I have resolved the issue.

One question though - the old version of Fuse saved an icon to my Android, which I could click on to connect via WiFi. This new version doesn’t seem to do that, and I couldn’t find anything about it in the documentation. This means that I have to connect with USB, and once the preview is built and installed on the device, then I can unplug and it will stay connected. But it won’t launch via WiFi. Am I missing something?

Great to hear you managed to find and solve the problem!

As for the question, AFAIK it has always been like that - first build the preview and run it on a USB-connected device, then you can unplug. There simply is no other easy way to get the preview app on the device initially. After the preview build of the app has been installed once, you can just start it from your apps on device, without needing to reconnect via USB.

first build the preview and run it on a USB-connected device, then you can unplug.

Yes, I agree. That’s what it was like before. Sorry if I did not clearly communicate the issue.

After the preview build of the app has been installed once, you can just start it from your apps on device

You are correct! I thought Fuse would auto-generate an icon on my home screen, like a typical install. I had forgotten that I manually dragged the icons from apps to my home screens.

Thanks again!