Android app fails to start. (Unfortunaltely has stopped). Any idea how to debug this issue?
Android: 4.4.2
Fusetools: 0.34.0
Windows: Windows 10
Android app fails to start. (Unfortunaltely has stopped). Any idea how to debug this issue?
Android: 4.4.2
Fusetools: 0.34.0
Windows: Windows 10
There’s typically something useful in the android logs. If you’ve installed and started the app from fuse (for instance with fuse build -tandroid -r
) then that log should be visible in your terminal window.
No log is visible in the terminal.
Uno 0.45.1 (build 4817) Windows 8 x64 a4caf29
Configuring
Target is up-to-date – stopping build (pass --force to override)
Build completed in 0.30 seconds
Installing APK on 1 device(s)
Launching activity ‘barapp’
Running logcat on 3233CB50C42E00EC
Process com.apps.barapp terminated.
Which device does it crash on? And do you have a chance to test on additional devices as well?
It’s really strange that nothing else shows up in the logs though. Could perhaps be that the relevant stuff is filtered out. Doing a regular logcat dump from the adb shell might provide more info.
If you haven’t dealt with adb before then the easiest approach is probably to do:
uno adb logcat -c
uno adb logcat
and then start the app. After it’s crashed you can control+C to break the log and check for more relevant info.
If that doesn’t yield anything new then you can upload your project to https://www.dropbox.com/request/ZgndLtJQm5eGzG9cicGK and we’ll take a look at it. (Files uploaded there are only accessible to Fuse employees).
uno adb logcat -c
uno adb logcat
<< Unable to open log device ‘/dev/log/main’: No such file or directory
I downloaded “Interactive infographic” example and it did not run on Android as well. I can upload the project and build folder if you think that can help? By the way, I testet to build with Xamarin Forms on Android, and that works ok.
Which device does the crash happen on?
And have you tested on other devices as well?
I only have one device. Android device Samsung I9000.
And which ROMs are you running with that? (I don’t think it has official support for 4.4.2)
That is true. (Slimkat) Slim-4.4.2. build.5-official-4079.
It’s not unlikely that a 6.5 years old phone with a custom ROM is outside of our scope, but I’ll see if we can do a bit of testing just in case it’s something very easily fixable.
Thanks. By the way, Ionic, Xamarin Forms and ReactNative works fine on this phone. I think Fusetools have worked in the past as well.
If you can provide any info on when it worked (e.g. which Fuse version) then that would be of great help!
Sorry, I deleted the app yesterday so I do not know. I think it was about a year ago. Not 100% certain that it worked though.
So, I’ve now reproduced your setup (I9000 + Slim-4.4.2. build.5-official-4079) and everything works just fine here.
I’ve tested the Interactive Infographic example (in both preview and regular export) as well as a couple of other things and it all works.
Note: the reason you didn’t get anything sensible out of logcat is because logging apparently is disabled by default with that ROM. I had to install “Semaphore Manager” ( and give it root access ) to be able to enable logging (also required a reboot after enabling it).
Well done
I have now enabled logging. The exception that I am receiving is this:
Installing APK on 1 device(s)
Launching activity 'barapp'
Running logcat on 3233CB50C42E00EC
V/Zygote ( 3137): Switching descriptor 32 to /dev/null
V/Zygote ( 3137): Switching descriptor 9 to /dev/null
I/ActivityManager( 566): Start proc com.app for activity com.app/.barapp: pid=3137 uid=10119 gids={50119, 1028, 1015, 1023, 3003}
D/dalvikvm( 3137): Late-enabling CheckJNI
D/barapp ( 3137): SDK: 19
D/dalvikvm( 3137): No JNI_OnLoad found in /system/lib/liblog.so 0x41c7adf8, skipping init
D/dalvikvm( 3137): Trying to load lib /data/app-lib/com.app-1/libstlport_shared.so 0x41c7adf8
D/dalvikvm( 3137): Added shared lib /data/app-lib/com.app-1/libstlport_shared.so 0x41c7adf8
D/dalvikvm( 3137): No JNI_OnLoad found in /data/app-lib/com.app-1/libstlport_shared.so 0x41c7adf8, skipping init
D/dalvikvm( 3137): Trying to load lib /data/app-lib/com.app-1/libV8Simple.so 0x41c7adf8
D/dalvikvm( 3137): Added shared lib /data/app-lib/com.app-1/libV8Simple.so 0x41c7adf8
D/dalvikvm( 3137): No JNI_OnLoad found in /data/app-lib/com.app-1/libV8Simple.so 0x41c7adf8, skipping init
D/dalvikvm( 3137): Trying to load lib /data/app-lib/com.app-1/libbarapp.so 0x41c7adf8
D/dalvikvm( 3137): Added shared lib /data/app-lib/com.app-1/libbarapp.so 0x41c7adf8
W/dalvikvm( 3137): dvmFindClassByName rejecting 'com/uno/UnoObject'
W/dalvikvm( 3137): dvmFindClassByName rejecting 'com/uno/BoolArray'
W/dalvikvm( 3137): dvmFindClassByName rejecting 'com/uno/ByteArray'
W/dalvikvm( 3137): dvmFindClassByName rejecting 'com/uno/ShortArray'
W/dalvikvm( 3137): dvmFindClassByName rejecting 'com/uno/IntArray'
W/dalvikvm( 3137): dvmFindClassByName rejecting 'com/uno/LongArray'
W/dalvikvm( 3137): dvmFindClassByName rejecting 'com/uno/FloatArray'
W/dalvikvm( 3137): dvmFindClassByName rejecting 'com/uno/DoubleArray'
W/dalvikvm( 3137): dvmFindClassByName rejecting 'com/uno/StringArray'
W/dalvikvm( 3137): dvmFindClassByName rejecting 'com/uno/ObjectArray'
W/ResourceType( 3137): Too many attribute references, stopped at: 0x01010099
W/ResourceType( 3137): Too many attribute references, stopped at: 0x0101009a
W/ResourceType( 3137): Too many attribute references, stopped at: 0x0101009b
W/System.err( 3137): android.view.InflateException: Binary XML file line #37: Error inflating class com.android.internal.widget.ActionBarView
W/System.err( 3137): at android.view.LayoutInflater.createView(LayoutInflater.java:621)
W/System.err( 3137): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)
W/System.err( 3137): at android.view.LayoutInflater.rInflate(LayoutInflater.java:756)
W/System.err( 3137): at android.view.LayoutInflater.rInflate(LayoutInflater.java:759)
W/System.err( 3137): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
W/System.err( 3137): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
W/System.err( 3137): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
W/System.err( 3137): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:3295)
W/System.err( 3137): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3358)
W/System.err( 3137): at com.android.internal.policy.impl.PhoneWindow.getDecorView(PhoneWindow.java:1731)
W/System.err( 3137): at android.app.Activity.initActionBar(Activity.java:1909)
W/System.err( 3137): at android.app.Activity.getActionBar(Activity.java:1896)
W/System.err( 3137): at com.foreign.Fuse.Platform.SystemUI.HideActionBar88(SystemUI.java:186)
W/System.err( 3137): at com.foreign.Fuse.Platform.SystemUI.OnCreate104(SystemUI.java:257)
W/System.err( 3137): at com.Bindings.ExternedBlockHost.OnCreate104(ExternedBlockHost.java:505)
W/System.err( 3137): at com.fuse.ActivityNativeEntryPoints.cppOnCreate(Native Method)
W/System.err( 3137): at com.fuse.App.onCreate(App.java:86)
W/System.err( 3137): at com.app.barapp.onCreate(barapp.java:57)
W/System.err( 3137): at android.app.Activity.performCreate(Activity.java:5241)
W/System.err( 3137): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
W/System.err( 3137): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
W/System.err( 3137): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2248)
W/System.err( 3137): at android.app.ActivityThread.access$800(ActivityThread.java:138)
W/System.err( 3137): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1199)
W/System.err( 3137): at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err( 3137): at android.os.Looper.loop(Looper.java:136)
W/System.err( 3137): at android.app.ActivityThread.main(ActivityThread.java:5050)
W/System.err( 3137): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 3137): at java.lang.reflect.Method.invoke(Method.java:515)
W/System.err( 3137): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
W/System.err( 3137): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
W/System.err( 3137): at dalvik.system.NativeStart.main(Native Method)
W/System.err( 3137): Caused by: java.lang.reflect.InvocationTargetException
W/System.err( 3137): at java.lang.reflect.Constructor.constructNative(Native Method)
W/System.err( 3137): at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
W/System.err( 3137): at android.view.LayoutInflater.createView(LayoutInflater.java:595)
W/System.err( 3137): ... 31 more
W/System.err( 3137): Caused by: android.view.InflateException: Binary XML file line #23: Error inflating class android.widget.TextView
W/System.err( 3137): at android.view.LayoutInflater.createView(LayoutInflater.java:621)
W/System.err( 3137): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
W/System.err( 3137): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:670)
W/System.err( 3137): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:695)
W/System.err( 3137): at android.view.LayoutInflater.rInflate(LayoutInflater.java:756)
W/System.err( 3137): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
W/System.err( 3137): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
W/System.err( 3137): at com.android.internal.widget.ActionBarView.initTitle(ActionBarView.java:826)
W/System.err( 3137): at com.android.internal.widget.ActionBarView.setDisplayOptions(ActionBarView.java:644)
W/System.err( 3137): at com.android.internal.widget.ActionBarView.<init>(ActionBarView.java:224)
W/System.err( 3137): ... 34 more
W/System.err( 3137): Caused by: java.lang.reflect.InvocationTargetException
W/System.err( 3137): at java.lang.reflect.Constructor.constructNative(Native Method)
W/System.err( 3137): at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
W/System.err( 3137): at android.view.LayoutInflater.createView(LayoutInflater.java:595)
W/System.err( 3137): ... 43 more
W/System.err( 3137): Caused by: java.lang.UnsupportedOperationException: Can't convert to color: type=0x2
W/System.err( 3137): at android.content.res.TypedArray.getColor(TypedArray.java:327)
W/System.err( 3137): at android.widget.TextView.<init>(TextView.java:677)
W/System.err( 3137): at android.widget.TextView.<init>(TextView.java:618)
W/System.err( 3137): ... 46 more
F/libc ( 3137): Fatal signal 11 (SIGSEGV) at 0xdeadcab1 (code=1), thread 3137 (com.app)
I/DEBUG ( 196): pid: 3137, tid: 3137, name: com.app >>> com.app <<<
D/Zygote ( 198): Process 3137 terminated by signal (11)
I/ActivityManager( 566): Process com.app (pid 3137) has died.
Process com.app terminated.
Thank you for the log!
This seems very similar to an issue we’re already investigating internally. I’ll link this thread to the ticket and then we’ll get back to you when we know more.
I’m facing the same issue. I tried doing this in the .unoproj file:
"Theme": "Holo"
}```
Then the builds started failing. So I removed it, but now I get a crash on startup. I have done `uno clean` but it doesn't help..
I have new information. This happens to me whenever I build any android app (even those that used to work, which have no code changes). It has to do with the update to Fuse 0.34.
The following exceptions are seen in the build log:
W/System.err( 2793): android.view.InflateException: Binary XML file line #37: Error inflating class com.android.internal.widget.ActionBarView
W/System.err( 2793): Caused by: android.view.InflateException: Binary XML file line #23: Error inflating class android.widget.TextView
W/System.err( 2793): Caused by: java.lang.UnsupportedOperationException: Can't convert to color: type=0x2
The device I have is a Samsung Galaxy S5; Android Version 4.4.2 (no fancy customizations or anything).
So, I think I know what’s going on. Fuse 0.34 now uses Material by default, which debuted in Android 5.0.1 (I think). My phone is on Android 4.4.2, and I don’t think Material Design works on it.
Now, Android 5.0 was released in 2014 and currently ‘unsupported’, but I am unable to update this phone for some reason.
Fuse team can let me know if there is some compatible way; and I’m going to test with an Android 5.0 device.
@mitesh: Could you try setting "Android": { "Theme": "Theme.AppCompat.Light" }
instead? This should be the Material Design theme, but with backwards compatibility for older devices… In the next release, we’re planning on switching to this theme by default for compatibility reasons anyway.