Can not build or preview Android

Local preview works fine, but Android preview or build don’t work at all. Here’s the log from build command

> fuse build --target=Android --run -v

....
....

Building Android app
1/2: libfuseintro.so
_root.fuseintro_bundle.cpp
_root.fuseintro_FuseElementsElement_UnoUXSize_Height_Property.cpp
_root.g.cpp
_root.MainView.cpp
Android.android.animation.g.cpp
Android.android.app.g.cpp
Android.android.content.g.cpp
Android.android.content.res.g.cpp
Android.android.graphics.drawable.g.cpp
Android.android.graphics.drawable.shapes.g.cpp
Android.android.graphics.g.cpp
Android.android.location.g.cpp
Android.android.net.g.cpp
Android.android.os.g.cpp
Android.android.test.mock.g.cpp
Android.android.text.g.cpp
Android.android.util.g.cpp
Android.android.view.g.cpp
Android.android.view.inputmethod.g.cpp
Android.android.webkit.g.cpp
Android.android.widget.g.cpp
Android.Base.g.cpp
Android.Base.Primitives.g.cpp
Android.Base.Types.g.cpp
Android.Base.Wrappers.g.cpp
Android.com.fuse.ExperimentalHttp.g.cpp
Android.com.fuse.Native.g.cpp
Android.Fallbacks.g.cpp
Android.g.cpp
Android.java.io.g.cpp
Android.java.lang.g.cpp
Android.java.lang.reflect.g.cpp
Android.java.net.g.cpp
Android.java.util.g.cpp
Android.Runtime.g.cpp
BootstrapperImpl_Android.cpp
duktape.c
Experimental.Cache.g.cpp
Experimental.Http.g.cpp
Experimental.Http.Internal.g.cpp
Experimental.Physics.g.cpp
Experimental.TextureLoader.g.cpp
Fuse.Android.Controls.g.cpp
Fuse.Android.g.cpp
Fuse.Android.Internal.g.cpp
Fuse.Android.NativeViews.g.cpp
Fuse.Animations.g.cpp
Fuse.BasicTheme.g.cpp
Fuse.Camera.g.cpp
Fuse.Controls.FallbackTextEdit.g.cpp
Fuse.Controls.g.cpp
Fuse.Controls.Graphics.g.cpp
Fuse.Controls.Internal.g.cpp
Fuse.Drawing.g.cpp
Fuse.Drawing.Internal.g.cpp
Fuse.Drawing.Primitives.g.cpp
Fuse.Drawing.Tesselation.Collections.g.cpp
Fuse.Drawing.Tesselation.g.cpp
Fuse.Effects.g.cpp
Fuse.Elements.g.cpp
Fuse.Elements.Internal.g.cpp
Fuse.Entities.g.cpp
Fuse.g.cpp
Fuse.GeoLocation.g.cpp
Fuse.Gestures.g.cpp
Fuse.Gestures.Internal.g.cpp
Fuse.Input.g.cpp
Fuse.Internal.Drawing.g.cpp
Fuse.Internal.g.cpp
Fuse.iOS.Controls.g.cpp
Fuse.Layouts.g.cpp
Fuse.Navigation.g.cpp
Fuse.Preview.g.cpp
Fuse.Reactive.FuseJS.g.cpp
Fuse.Reactive.g.cpp
Fuse.Resources.g.cpp
Fuse.Scripting.Duktape.g.cpp
Fuse.Scripting.g.cpp
Fuse.Scripting.V8.g.cpp
In file included from /usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/V8Simple.h:2:0,
                 from include/Fuse.Scripting.V8.Simple.ArrayImpl.h:5,
                 from include/Fuse.Scripting.V8.Simple.Array.h:5,
                 from jni/Fuse.Scripting.V8.g.cpp:14:
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/v8.h:338:1: error: expected unqualified-id before 'using'
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/v8.h:471:1: error: expected unqualified-id before 'using'
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/v8.h:865:1: error: expected unqualified-id before 'using'
In file included from include/Fuse.Scripting.V8.Simple.ArrayImpl.h:5:0,
                 from include/Fuse.Scripting.V8.Simple.Array.h:5,
                 from jni/Fuse.Scripting.V8.g.cpp:14:
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/V8Simple.h:73:30: error: expected ';' at end of member declaration
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/V8Simple.h:73:36: error: 'override' does not name a type
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/V8Simple.h:92:30: error: expected ';' at end of member declaration
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/V8Simple.h:92:36: error: 'override' does not name a type
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/V8Simple.h:123:30: error: expected ';' at end of member declaration
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/V8Simple.h:123:36: error: 'override' does not name a type
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/V8Simple.h:145:30: error: expected ';' at end of member declaration
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/V8Simple.h:145:36: error: 'override' does not name a type
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/V8Simple.h:162:30: error: expected ';' at end of member declaration
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/V8Simple.h:162:36: error: 'override' does not name a type
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/V8Simple.h:177:30: error: expected ';' at end of member declaration
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/V8Simple.h:177:36: error: 'override' does not name a type
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/V8Simple.h:179:22: error: expected ';' at end of member declaration
/usr/local/share/uno/Packages/Fuse.Scripting.V8/0.26.10/include/V8Simple.h:179:24: error: 'override' does not name a type
make:  [.uno/Fuse.Scripting.V8.g.cpp.o] Error 1
make:  Waiting for unfinished jobs....
(unknown): E0200: Android build failed -- rerun with '-v' for more information
(89,639.24 ms)

Build completed in 151.46 seconds.
    0 Warning(s)
    1 Error(s)

Error Summary
-------------

(unknown): E0200: Android build failed -- rerun with '-v' for more information
FATAL ERROR: Build failed.

Thanks for reporting this. Our crew will look into it tomorrow.

Hey!

Those errors indicate that the app is somehow being built with an out-of-date C++ compiler (the source lines use C++11 features). Try running fuse install android in a terminal, and let us know if that helps!

Cheers!

Hello Olle,

Running `fuse install androidz doesn’t do anything for me, because I’ve already done that and provided paths to Adnroid SDK and NDK installed with Xamarin a while back. I’m using the current Fuse Tools 0.11. I’ve been constantly installing Android Platform SDK up to Android 6.0 (API Level 23) and I have most the following API Level SDKs installed: 23, 22, 21, 19, 16. I’m continuously developing a Cordova app and they build fine. I have NDK version r8b and the current is r11b. Isn’t the C++ compiler part of the NDK? I’ll try upgrading the NDK and see if it helps.

Cheers, Maks

Hey again Maks,

Yeah, the C++ compiler comes with the NDK. What directories do you have that match $YOUR_NDK_DIR/toolchains/arm-linux-androideabi-*? It looks like Fuse will use GCC 4.9, 4.8, or 4.6 (in that order), but it’s possible that we don’t actually still support e.g. GCC 4.6.

Hi Olle,

According to your instructions NDK r8b uses GCC 4.6. I deleted the old NDK I had, downloaded the new one which uses GCC 4.9 and ran fuse install android again. I used the path where I extracted the new NDK and now everything works fine :slight_smile:

I think this requires updating the guide Export for Android a bit to inform that you need to specify a minimum NDK version when choosing an existing installation.

Thanks for your help.

Best, Maks

That’s great news! I’ve also created an internal issue to investigate more in depth what went wrong there. Thanks for your report!