Can't run built apps for android

Hello i have big problem with running on the Android platofrm - i am not even able to run built examples:

Versions:

-- Versions - 
E:\fuse\angled-navigation>uno --version
Uno version 0.27.4 (build 2155) Windows 10 x86 5ade541
Copyright (C) 2015-16 Fusetools AS

E:\fuse\angled-navigation>fuse --version
Fuse version 0.12.1 (build 6293)
Copyright (C) 2016 Fusetools

Android check reqs:

fuse install -s android
# Verifying install status of JDK
Checking if C:\Program Files\Java\jdk1.8.0_40 exists.
C:\Program Files\Java\jdk1.8.0_40 was found.
Checking if JDK is corrupt
jdk was found.
# Verifying install status of AndroidSDK
Checking if C:\Users\marian.bencat\AppData\Local\Fusetools\Fuse\Android\AndroidSDK exists.
C:\Users\marian.bencat\AppData\Local\Fusetools\Fuse\Android\AndroidSDK was found.
Checking if C:\Users\marian.bencat\AppData\Local\Fusetools\Fuse\Android\AndroidSDK\tools exists.
C:\Users\marian.bencat\AppData\Local\Fusetools\Fuse\Android\AndroidSDK\tools was found.
Checking if Android SDK is corrupt.
Checking if all required Android components are installed.
androidsdk was found.
# Verifying install status of AndroidNDK
Checking if C:\NDK\ndk-build exists.
C:\NDK\ndk-build was found.
Checking if C:\NDK\toolchains exists.
C:\NDK\toolchains was found.
Checking if C:\NDK\prebuilt exists.
C:\NDK\prebuilt was found.
androidndk was found.
# Verifying install status of Ant
Checking if C:\Users\marian.bencat\AppData\Local\Fusetools\Fuse\Android\Ant exists.
C:\Users\marian.bencat\AppData\Local\Fusetools\Fuse\Android\Ant was found.
Checking if Ant is corrupt
ant was found.
android is installed.

AND FINALLY - MY ERROR - the same for every example…

E:\fuse\angled-navigation>fuse build -t=android -r
Uno 0.27.4 (build 2155) Windows 10 x86 5ade541

Configuring (3.34s)
Compiling syntax tree (7.94s)
Generating code and data (19.34s)
Building Android app
1/2: libanglednavigation.so
In file included from include/duktape.h:126:0,
                 from duk_internal.h:26:
include/duk_config.h:1321:0: warning: "DUK_F_32BIT_PTRS" redefined
 #define DUK_F_32BIT_PTRS
 ^
<command-line>:0:0: note: this is the location of the previous definition
In file included from include/duktape.h:126:0,
                 from include/duktape_helpers.h:2,
                 from jni/Fuse.Scripting.Duktape.g.cpp:4:
include/duk_config.h:1321:0: warning: "DUK_F_32BIT_PTRS" redefined
 #define DUK_F_32BIT_PTRS
 ^
<command-line>:0:0: note: this is the location of the previous definition
2/2: angled-navigation.apk
    [javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
    [javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
    [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
(119.43s)

Build completed in 150.07 seconds.
    0 Warning(s)
    0 Error(s)

---
Installing APK on 1 device(s)
Launching actitity 'anglednavigation'
D/dalvikvm( 2715): Late-enabling CheckJNI
I/ActivityManager(  471): Start proc com.anglednavigation for activity com.anglednavigation/.anglednavigation: pid=2715 uid=10063 gids={50063, 3003, 1028, 1015}
D/anglednavigation( 2715): SUT: false  CML: false  SDK: 19
E/AndroidRuntime( 2715): java.lang.UnsatisfiedLinkError: Couldn't load anglednavigation from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.anglednavigation-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.anglednavigation-1, F/anglednavigation( 2715): Failed to load JNI libraries: stlport_shared, V8Simple
/system/lib]]]: findLibrary returned null
W/dalvikvm( 2715): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/anglednavigation/anglednavigation;
W/dalvikvm( 2715): Class init failed in newInstance call (Lcom/anglednavigation/anglednavigation;)
D/AndroidRuntime( 2715): Shutting down VM
W/dalvikvm( 2715): threadid=1: thread exiting with uncaught exception (group=0xacd06b20)
E/AndroidRuntime( 2715): FATAL EXCEPTION: main
E/AndroidRuntime( 2715): Process: com.anglednavigation, PID: 2715
E/AndroidRuntime( 2715):        at java.lang.Runtime.loadLibrary(Runtime.java:358)
E/AndroidRuntime( 2715):        at java.lang.System.loadLibrary(System.java:526)
E/AndroidRuntime( 2715):        at com.anglednavigation.CppManager.LoadLibraries(CppManager.java:32)
E/AndroidRuntime( 2715):        at com.anglednavigation.anglednavigation.<clinit>(anglednavigation.java:59)
E/AndroidRuntime( 2715):        at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 2715):        at java.lang.Class.newInstance(Class.java:1208)
E/AndroidRuntime( 2715):        at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
E/AndroidRuntime( 2715):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2101)
E/AndroidRuntime( 2715):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
E/AndroidRuntime( 2715):        at android.app.ActivityThread.access$800(ActivityThread.java:135)
E/AndroidRuntime( 2715):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
E/AndroidRuntime( 2715):        at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 2715):        at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 2715):        at android.app.ActivityThread.main(ActivityThread.java:5001)
E/AndroidRuntime( 2715):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2715):        at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 2715):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime( 2715):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/AndroidRuntime( 2715):        at dalvik.system.NativeStart.main(Native Method)
I/Process ( 2715): Sending signal. PID: 2715 SIG: 9
I/ActivityManager(  471): Process com.anglednavigation (pid 2715) has died.
Process com.anglednavigation terminated.
Process com.anglednavigation terminated.

Process com.anglednavigation terminated.

ERROR: One or more errors occurred.

ERROR: Android run failed
fuse: Errors were encountered while building the project

I have already tried to remove entire /build folder but without any success…

Thanks for your help

Have you tried to do uno clean from the command line inside the project directory? You may need one of those after updating from a previous version of Fuse.

Also, v0.12.2 is out now so it’d be great if you could check if the problem is still present with that version.

Unfortunately it didnt help me…

E:\fuse\angled-navigation>fuse --version
Fuse version 0.12.2 (build 6312)
Copyright (C) 2016 Fusetools

E:\fuse\angled-navigation>uno clean
Clean completed.

E:\fuse\angled-navigation>fuse build --target=Android -r
Uno 0.27.19 (build 2295) Windows 10 x86 b6a53ec

Configuring (3.44s)
Installing dependencies
0: get https://az664292.vo.msecnd.net/files/L3b4uCLHkWfSEJRy-uno-base-0.8.609-android.zip
(5.44s)

Compiling syntax tree (8.18s)
In file included from include/duktape.h:126:0,
Generating code and data (23.33s)
                 from duk_internal.h:26:
include/duk_config.h:1321:0: warning: "DUK_F_32BIT_PTRS" redefined
Building Android app
 #define DUK_F_32BIT_PTRS
1/2: libanglednavigation.so
 ^
2/2: angled-navigation.apk
<command-line>:0:0: note: this is the location of the previous definition
(115.22s)
In file included from include/duktape.h:126:0,
                 from include/duktape_helpers.h:2,

Build completed in 155.62 seconds.
                 from jni/Fuse.Scripting.Duktape.g.cpp:4:
    0 Warning(s)
include/duk_config.h:1321:0: warning: "DUK_F_32BIT_PTRS" redefined
    0 Error(s)
 #define DUK_F_32BIT_PTRS

 ^
---
<command-line>:0:0: note: this is the location of the previous definition
Installing APK on 1 device(s)
    [javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
    [javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
Launching actitity 'anglednavigation'
    [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
D/dalvikvm( 5225): Late-enabling CheckJNI
E/AndroidRuntime( 5225): java.lang.UnsatisfiedLinkError: Couldn't load anglednavigation from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.anglednavigation-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.anglednavigation-1, /system/lib]]]: findLibrary returned null
I/ActivityManager(  464): Start proc com.anglednavigation for activity com.anglednavigation/.anglednavigation: pid=5225 uid=10064 gids={50064, 3003, 1028, 1015}

D/anglednavigation( 5225): SUT: false  CML: false  SDK: 19
F/anglednavigation( 5225): Failed to load JNI libraries: stlport_shared, V8Simple
W/dalvikvm( 5225): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/anglednavigation/anglednavigation;
W/dalvikvm( 5225): Class init failed in newInstance call (Lcom/anglednavigation/anglednavigation;)
D/AndroidRuntime( 5225): Shutting down VM
W/dalvikvm( 5225): threadid=1: thread exiting with uncaught exception (group=0xa8d10b20)
E/AndroidRuntime( 5225): FATAL EXCEPTION: main
E/AndroidRuntime( 5225): Process: com.anglednavigation, PID: 5225
E/AndroidRuntime( 5225):        at java.lang.Runtime.loadLibrary(Runtime.java:358)
E/AndroidRuntime( 5225):        at java.lang.System.loadLibrary(System.java:526)
E/AndroidRuntime( 5225):        at com.anglednavigation.CppManager.LoadLibraries(CppManager.java:32)
E/AndroidRuntime( 5225):        at com.anglednavigation.anglednavigation.<clinit>(anglednavigation.java:59)
E/AndroidRuntime( 5225):        at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 5225):        at java.lang.Class.newInstance(Class.java:1208)
E/AndroidRuntime( 5225):        at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
E/AndroidRuntime( 5225):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2101)
E/AndroidRuntime( 5225):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
E/AndroidRuntime( 5225):        at android.app.ActivityThread.access$800(ActivityThread.java:135)
E/AndroidRuntime( 5225):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
E/AndroidRuntime( 5225):        at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 5225):        at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 5225):        at android.app.ActivityThread.main(ActivityThread.java:5001)
E/AndroidRuntime( 5225):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 5225):        at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 5225):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime( 5225):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/AndroidRuntime( 5225):        at dalvik.system.NativeStart.main(Native Method)
I/Process ( 5225): Sending signal. PID: 5225 SIG: 9
I/ActivityManager(  464): Process com.anglednavigation (pid 5225) has died.
Process com.anglednavigation terminated.

Hi there Marian, first off thanks again for reporting the issue. We are knocking our heads against it here to see what we find but it would help a lot to know what device your using including it’s model and OS version.

Cheers

Hello guys, thank you ver much.

I’ve tried it on 3 different emulators (Android Emulator for Visual Studio, original Google Android emulator, genymotion).

3 different devices - 10.1 Tablet XHDPI Tablet API Level 23 Marshmallow (6.0.)

                - 7 Tablet XHDPI Tablet API level 21 Lollipop (5.0)
                - 5 Phone XXHDPI Phone API Level 19 KitKat (4.4)

All of them have 864+ MB RAM and enough disc space.

I was connected to each emulator with adb connect ip and my Xamarin / Apache Cordova apps work like a charm, so i think there isnt problem that i am using emulator?

I have successfully built my solution for local preview and ios preview (when i copied the solution to my MAC). But i am not able to run my application on android.

Maybe i can send you (upload somewhere) my generated built folder after build proccess? You may be able to see missing activity files or something…?

Thanks in Advice. Marian

We don’t officially support emulators right now. The human speak version of this is that last time we checked the emulators either required compiling for x86 or sucked at doing GL. The android emulator scene has broadened since then and this will be worth a revisit.

However for today we recommend using our desktop live preview and live preview on a real device.

Thanks for providing this info and hope the rest of your Fuse’ing goes well :slight_smile:

p.s. The iOS emulators have tended to be a lot better at emulating the actual device behaviour so though we dont say we support them there is less chance of issues there.

I had this same problem but an armeabi-v7a based emulator worked (created in Android SDK Manager). It also supports GPU when “Use host GPU” is selected.

GPU-usage in emulators remain sketchy at best, so the general advice is still to avoid them as they’re not officially supported. Use the Fuse desktop preview combined with real-time previewing on actual devices.

Yes, I don’t recommend this method either but I use it as a workaround for testing API level 15 (I know it’s not supported but seems to work).