I started a blank project, meaning MainView.ux only contains <App></App>
I ran fuse install android and let it complete.
I have checked that JDK, Android SDK and Ant are properly installed, and the log does not give me any errors related to them.
I can also preview the app in Fuse Studio, but when selecting Preview on Android or Export for Android I get the following error:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Francisco\Documents\Fuse\FMP\build\Android\Preview\app\build.gradle' line: 4
* What went wrong:
A problem occurred evaluating project ':app'.
> com/android/tools/analytics/UsageTracker
BUILD FAILED
Total time: 3.329 secs
(unknown): E0200: Android build failed
?: Error E0200: Android build failed
(4.0 s)
I have tried googling UsageTracker with no luck, and E0200 errors seem to be caused by whitespaces in paths that I’ve made sure to correct. I’m at a loss here. Any help is appreciated.
It is called FMP.unoproj. I also tried the quickstart and the end-to-end app tutorial to some extent. I can preview on Fuse Studio, but it still fails to compile when doing Preview on Android or Export for Android.
Please paste the output of uno build -t -tandroid -vv, maybe there are some clues hidden behind a greater verbosity level.
Your command returns this error:
ERROR: '-tandroid' is not a valid build target -- see "uno build --help" for a list of targets.
So I ran:
uno build -t android -vv
I forgot to output to a text file the first time, but it showed all the folders being created in the build folder until it failed at the same point. I ran it again and this was the output.
..\..\..\AppData\Local\Fusetools\Packages\Fuse.Controls.Primitives\1.0.2\textcontrols\fallbacktextrenderer\$.uno(166): W4139: Uno.Content.Fonts.CharacterSets is obsolete
..\..\..\AppData\Local\Fusetools\Packages\UnoCore\1.0.11\source\uno\$.uno(95): W4139: 'Uno.Application.set_Window(Uno.Platform.Window)' is obsolete: 'Deprecated on mobile. Please interact with UI through fuselibs'
..\..\..\AppData\Local\Fusetools\Packages\Fuse.Reactive.JavaScript\1.0.2\$.uno(1799): W4139: 'Uno.Application.get_Current()' is obsolete: 'Application.Current class is deprecated on mobile. Please use CoreApp.Current'
..\..\..\AppData\Local\Fusetools\Packages\Fuse.Controls.Primitives\1.0.2\textcontrols\fallbacktextrenderer\$.uno(164): W4139: Uno.Content.Fonts.BitmapFont is obsolete
..\..\..\AppData\Local\Fusetools\Packages\Fuse.Controls.Primitives\1.0.2\textcontrols\fallbacktextrenderer\$.uno(167): W4139: Uno.Content.Fonts.BitmapFont is obsolete
..\..\..\AppData\Local\Fusetools\Packages\Fuse.Controls.Primitives\1.0.2\textcontrols\fallbacktextrenderer\$.uno(65): W4139: Uno.Content.Fonts.BitmapFont is obsolete
..\..\..\AppData\Local\Fusetools\Packages\Fuse.Controls.Primitives\1.0.2\textcontrols\fallbacktextrenderer\$.uno(184): W4139: Uno.Content.Fonts.TextTransform is obsolete
..\..\..\AppData\Local\Fusetools\Packages\Fuse.Android\1.0.2\$.uno(328): W4139: 'Uno.Application.get_Current()' is obsolete: 'Application.Current class is deprecated on mobile. Please use CoreApp.Current'
..\..\..\AppData\Local\Fusetools\Packages\Fuse.Testing\1.0.2\$.uno(127): W4139: 'Uno.Application.get_Window()' is obsolete: 'Deprecated on mobile. Please interact with UI through fuselibs'
..\..\..\AppData\Local\Fusetools\Packages\Fuse.Testing\1.0.2\$.uno(127): W4139: 'Uno.Application.get_Current()' is obsolete: 'Application.Current class is deprecated on mobile. Please use CoreApp.Current'
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Francisco\Documents\Fuse\FMP\build\Android\Debug\app\build.gradle' line: 4
* What went wrong:
A problem occurred evaluating project ':app'.
> com/android/tools/analytics/UsageTracker
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
(unknown): E0200: Android build failed
Hi Francisco,
Android’s build process is known for making really deep folder hierarchies and on Windows this can result in it hitting the windows max filepath length issue. Could you please try the following:
Move the FMP directory to C:\ (I know this is bit extreme, but it’s good for the sake of the test)
Run uno clean in the FMP directory
Run fuse build -tandroid -r to build and run for android.
Hopefully this will now build and then you (sadly) need to find a place to put the project where it doesnt run into this issue. We are aware that this is annoying, and we are doing some experiments to work around this issue with android but this is still in the testing phase.
Haha, yes, max filepath length has given me many headaches (e.g. node_modules), but it does not seem to be the case this time. I placed it on C:\ and ran the command. Same error:
C:\FMP>fuse build -tandroid
Uno 1.0.11 (build 5362) Windows 10 x64 7cd79e2
Configuring (0.3 s)
Compiling syntax tree (1.4 s)
Generating code and data (6.7 s)
Building Android app
2/2: FMP.apk
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\FMP\build\Android\Debug\app\build.gradle' line: 4
* What went wrong:
A problem occurred evaluating project ':app'.
> com/android/tools/analytics/UsageTracker
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
## 2/2: FMP.apk
BUILD FAILED
Total time: 2.718 secs
(unknown): E0200: Android build failed
(3.3 s)
Build completed in 11.75 seconds
1 error
fuse: Errors were encountered while building the project
Sorry for the delay,
Running build.bat was character for character the same? That’s unusual, there’s usually something different. I’m happy to take a look at the project itself if you are ok sending it to our dropbox.
You can find our dropbox here: https://www.dropbox.com/request/ZgndLtJQm5eGzG9cicGK
[edit] sorry I forgot this was the issue occurring with only <App>. I’ll have a think and get back to you
I have de same problem, when a want to preview my work on an android devices, the preview fail with this error message
Fuse 1.0.0 (build 13426)
Configuring (11.6 s)
Compiling syntax tree (6.1 s)
Generating code and data (36.5 s)
Building Android app
2/2: StartApplicationFuse.apk
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> java.lang.NullPointerException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
## 2/2: StartApplicationFuse.apk
BUILD FAILED
Total time: 28.623 secs
(unknown): E0200: Android build failed
?: Error E0200: Android build failed
(33.2 s)
Build completed in 87.73 seconds
1 error
Failed to find NDK.
Failed to find Android Build tools.
Failed to find CMake.
(unknown): F0001: Looks like Android is not installed. Please run 'fuse install android' first.
?: Error F0001: Looks like Android is not installed. Please run 'fuse install android' first.
fuse: Failed to compile project
when i make
fuse install android
the commande install all android needed package but the android preview failed after that again
need your help.
Thanks
Fuse version 1.0.0 (build 13426)
Microsoft Windows [Version 10.0.10586] X64
We have tried a few windows machines here with no luck reproducing. let’s dig again. What is the full result of running uno config?
Result of fuse preview:
C:\FMP>fuse preview -t=Android
Fuse 1.0.0 (build 13426)
Configuring (2.1 s)
Compiling syntax tree (1.3 s)
Generating code and data (11.2 s)
Building Android app
2/2: FMP.apk
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\FMP\build\Android\Preview\app\build.gradle' line: 4
* What went wrong:
A problem occurred evaluating project ':app'.
> com/android/tools/analytics/UsageTracker
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
## 2/2: FMP.apk
BUILD FAILED
Total time: 7.383 secs
(unknown): E0200: Android build failed
?: Error E0200: Android build failed
(8.2 s)
Build completed in 22.82 seconds
1 error
fuse: Failed to compile project
Result of running build.bat:
C:\FMP\build\Android\Debug>build.bat
## 2/2: FMP.apk
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\FMP\build\Android\Debug\app\build.gradle' line: 4
* What went wrong:
A problem occurred evaluating project ':app'.
> com/android/tools/analytics/UsageTracker
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.518 secs
That looks like its using a seperately installed android rather than the old fuse, ships so odds are that is missing some dependencies C:\Android\android-sdk\...