About building in Android

I have written an app which can run normally in local preview. However, I tried to deploy it into my Android Phone, the app crashed and closed. Any suggestion to solve?

I can’t even get any hints from the message log…

I am using the latest version 3309 and my phone is HTC M8.

If needed, I can post my whole project here.

Big Thsnks.

Hi!

Hard to debug without more information.

If you can post your entire project, that would help.

You can also try the trick I suggested in this thread to get more information: https://www.fusetools.com/developers/forums/bug_reports/cannot_build_application_on_osx

If you do not want to post your project files publicly, you can use this link to upload it directly to us in private. It will only be shared with our internal people in order to help debug your issue:

https://www.dropbox.com/request/Rx1QN3QluvxAJiyGJqrh

You do not need a Dropbox account to upload files, so it’s really easy. :slight_smile:

hi! Thanks for you replies.

Anders Lassen: I tried you method to read the log . cd .build cd Android-Debug log

but it showed -bash: log: command not found…

Bent Stamnes: HI! I have uploaded a project called JP01 which is a multiple choices study project. Preview worked but seems something wrong when running in mobile.

Thanks for help.

Hi there, thanks - got the file now. I’m passing it on to the devs so that they can take a look at it :slight_smile:

HI! I used log to get the crash messages. Could you give me some help from this?

W/art     (16132): Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[14,tid=16154,Native,Thread*=0xb97449d8,peer=0x12cfb080,"Thread-195252"]
E/AndroidRuntime(16132): FATAL EXCEPTION: main
E/AndroidRuntime(16132): Process: com.MainView, PID: 16132
E/AndroidRuntime(16132): java.lang.RuntimeException: Fuse.Scripting.ScriptException: 
E/AndroidRuntime(16132):    at Fuse.Scripting.Duktape.Context.CheckError(int)
E/AndroidRuntime(16132):    at Fuse.Scripting.Duktape.Context.Evaluate(string,string)
E/AndroidRuntime(16132):    at Fuse.Scripting.Context.Evaluate_1(Fuse.Scripting.IModule,string)
E/AndroidRuntime(16132):    at Fuse.Reactive.JavaScript.EvaluateDataContext()
E/AndroidRuntime(16132):    at Fuse.Reactive.ThreadWorker.Run()
E/AndroidRuntime(16132):    at Fuse.Reactive.ThreadWorker.RunWithExceptionHandler()
E/AndroidRuntime(16132):     at com.MainView.ActivityNativeEntryPoints.cppTick(Native Method)
E/AndroidRuntime(16132):     at com.MainView.MainLoop$FrameTicker.doFrame(MainLoop.java:86)
E/AndroidRuntime(16132):     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:790)
E/AndroidRuntime(16132):     at android.view.Choreographer.doCallbacks(Choreographer.java:596)
E/AndroidRuntime(16132):     at android.view.Choreographer.doFrame(Choreographer.java:556)
E/AndroidRuntime(16132):     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:778)
E/AndroidRuntime(16132):     at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime(16132):     at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(16132):     at android.os.Looper.loop(Looper.java:155)
E/AndroidRuntime(16132):     at android.app.ActivityThread.main(ActivityThread.java:5696)
E/AndroidRuntime(16132):     at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(16132):     at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(16132):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1028)
E/AndroidRuntime(16132):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)

I/ActivityManager(  890): Start proc com.MainView for activity com.MainView/.MainView: pid=27440 uid=10357 gids={50357, 9997, 3003, 1028, 1015} abi=armeabi-v7a
I/Launcher( 1530): updateWallpaperVisibility: true
D/StatusBarManagerService(  890): setSystemUiVisibility(0x0)
D/StatusBarManagerService(  890): manageDisableList userId=0 what=0x0 pkg=WindowManager.LayoutParams
D/StatusBarManagerService(  890): hiding MENU key
I/TrimMemoryManager( 1530): [trimMemory] 20
D/MainView(27440): SUT: false  CML: false  SDK: 21
D/MainView(27440): Resurrecting
D/MainView(27440): Start Main Loop
I/Adreno-EGL(27440): <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.BF.1.1_RB1.05.00.00.002.030_msm8974_refs/tags/AU_LINUX_ANDROID_LA.BF.1.1_RB1.05.00.00.002.030release_AU ()
I/Adreno-EGL(27440): OpenGL ES Shader Compiler Version: E031.25.03.00
I/Adreno-EGL(27440): Build Date: 12/11/14 Thu
I/Adreno-EGL(27440): Local Branch: 
I/Adreno-EGL(27440): Remote Branch: refs/tags/AU_LINUX_ANDROID_LA.BF.1.1_RB1.05.00.00.002.030
I/Adreno-EGL(27440): Local Patches: NONE
I/Adreno-EGL(27440): Reconstruct Branch: NOTHING
D/MainView(27440): Call OnCreate
I/MainView(27440): Loading: bg01-2a7f7d4d.jpg
I/MainView(27440): Loading: fuse-logo-b87afae6.png
I/MainView(27440): Loading: icon-star-121d31f5.png
I/MainView(27440): Loading: icon-square-506a6d40.png
I/MainView(27440): Loading: icon-triangle-3c0576ab.png
I/MainView(27440): Loading: es6-promise-13e7503f.js
D/MainView(27440): Called OnCreate
D/MainView(27440): Call OnStart
D/MainView(27440): Called OnStart
D/MainView(27440): Call OnResume
D/MainView(27440): Called OnResume
D/Atlas   (27440): Validating map...
I/Choreographer(27440): Skipped 37 frames!  The application may be doing too much work on its main thread.
I/MainView(27440): Loading: xmlhttprequest-88746b12.js
I/MainView(27440): Loading: file-bd9c2026.js
I/MainView(27440): Loading: subscriberproxy-39cd8346.js
I/MainView(27440): Loading: observable-2f186abf.js
I/MainView(27440): Loading: verbtohiragana-94de6560.js
D/PMS     (  890): releaseHCC(36272f8e): CPU_MIN_NUM PrismLaunchActivity_4 0x8000 null
D/PMS     (  890): releaseHCC(1500b3af): CPU_MIN_FREQ PrismLaunchActivity_4 0x2000 null
D/MainView(27440): Call OnFocusChanged:true
D/MainView(27440): Called OnFocusChanged:true
I/ActivityManager(  890): Displayed com.MainView/.MainView: +1s238ms
I/InputMethodManagerService(  890): Disable input method client, pid=1530
D/StatusBarManagerService(  890): swetImeWindowStatus vis=0 backDisposition=0
I/InputMethodManagerService(  890): Enable input method client, pid=27440
D/PMS     (  890): releaseWL(276d9fa8): PARTIAL_WAKE_LOCK  ActivityManager-Launch 0x1 null
D/HtcWifiControlRoamOffload: (  890): Receive mPhoneStateListener
D/HtcWifiControlRoamOffload: (  890): Receive mPhoneStateListener, getGsmSignalStrength99
D/TelephonyCallback( 1211): SignalStrength: 2
D/SIGNAL_ICON( 1211): level=2/5
D/StatusBar.NetworkController( 1211): dumpIcon[stat_sys_data_connected_4g stat_sys_5signal_2|null (gone) (gone) F]
D/PMS     (  890): releaseHCC(106603bc): CPU_MIN_NUM ActivityManager-MultiCore-Num 0x8000 null
D/PMS     (  890): releaseHCC(2ffb0f45): CPU_MIN_FREQ ActivityManager-MultiCore-Freq 0x2000 null
E/MP-Decision( 2149): Update arg 1
F/libc    (27440): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xdeadcab1 in tid 27462 (Thread-18782)
W/libc    (27440): Security Level: (1), Debug inforamtion is controlled by the DUMPABLE flag.
I/DEBUG   (  460):                
I/DEBUG   (  460): Build fingerprint: 'htc/htc_asia_hk/htc_m8:5.0.1/LRX22C/454154.12:user/release-keys'
I/DEBUG   (  460): Revision: '0'
I/DEBUG   (  460): ABI: 'arm'
I/DEBUG   (  460): pid: 27440, tid: 27462, name: Thread-18782  >>> com.MainView <<<
I/DEBUG   (  460): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xdeadcab1
I/DEBUG   (  460):     r0 b3d6e5bd  r1 b3d6e5bd  r2 00000000  r3 deadcab1
I/DEBUG   (  460):     r4 b926cc58  r5 b926cc90  r6 98b39000  r7 474e5543
I/DEBUG   (  460):     r8 a13bf194  r9 a13bf1f0  sl b6e8ef65  fp a13bfdd0
I/DEBUG   (  460):     ip b3d79fb8  sp a13bf120  lr b3d6e5d7  pc b3d6e5c8  cpsr 600f0030
I/DEBUG   (  460): 
I/DEBUG   (  460): backtrace:
I/DEBUG   (  460):     #00 pc 000155c8  /data/app/com.MainView-1/lib/arm/libXli.so
I/DEBUG   (  460):     #01 pc 000155d5  /data/app/com.MainView-1/lib/arm/libXli.so
I/DEBUG   (  460):     #02 pc 00015627  /data/app/com.MainView-1/lib/arm/libXli.so
I/DEBUG   (  460):     #03 pc 00014e3f  /data/app/com.MainView-1/lib/arm/libXli.so
I/DEBUG   (  460):     #04 pc 0001481d  /data/app/com.MainView-1/lib/arm/libXli.so
I/DEBUG   (  460):     #05 pc 000148e3  /data/app/com.MainView-1/lib/arm/libXli.so
I/DEBUG   (  460):     #06 pc 00013935  /data/app/com.MainView-1/lib/arm/libXli.so (Xli::Unicode::Utf16To8(unsigned short const, int, int)+532)
I/DEBUG   (  460):     #07 pc 0045b3ab  /data/app/com.MainView-1/lib/arm/libMainView.so (uStringToXliString(uString)+34)
I/DEBUG   (  460):     #08 pc 00421775  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Uno::Runtime::Implementation::DebugImplLog(uStatic, uString, int)+20)
I/DEBUG   (  460):     #09 pc 00409e6d  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Uno::Diagnostics::DebugEmitLog(uStatic, uString, int)+48)
I/DEBUG   (  460):     #10 pc 00409e91  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Uno::Diagnostics::DebugLog(uStatic, uString, int, uString, int)+20)
I/DEBUG   (  460):     #11 pc 0032da3f  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Fuse::Reactive::DebugLogLog(uStatic, uArray)+122)
I/DEBUG   (  460):     #12 pc 0037ac11  /data/app/com.MainView-1/lib/arm/libMainView.so (uObject uDelegate::Invoke<uObject, uArray>(uArray)+84)
I/DEBUG   (  460):     #13 pc 003778d7  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Fuse::Scripting::Duktape::CallbackClosureProxy(app::Fuse::Scripting::Duktape::CallbackClosure, uArray)+38)
I/DEBUG   (  460):     #14 pc 0037ac11  /data/app/com.MainView-1/lib/arm/libMainView.so (uObject uDelegate::Invoke<uObject, uArray>(uArray)+84)
I/DEBUG   (  460):     #15 pc 003787bf  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Fuse::Scripting::Duktape::ContextProxyCallback(app::Fuse::Scripting::Duktape::Context, void)+242)
I/DEBUG   (  460):     #16 pc 0037ab51  /data/app/com.MainView-1/lib/arm/libMainView.so (void uDelegate::InvokeVoid<void>(void)+84)
I/DEBUG   (  460):     #17 pc 00377735  /data/app/com.MainView-1/lib/arm/libMainView.so (callback_proxy(void)+76)
I/DEBUG   (  460):     #18 pc 0036286b  /data/app/com.MainView-1/lib/arm/libMainView.so
I/DEBUG   (  460):     #19 pc 0036d2a1  /data/app/com.MainView-1/lib/arm/libMainView.so
I/DEBUG   (  460):     #20 pc 0036293b  /data/app/com.MainView-1/lib/arm/libMainView.so
I/DEBUG   (  460):     #21 pc 00345ef9  /data/app/com.MainView-1/lib/arm/libMainView.so (duk_pcall+116)
I/DEBUG   (  460):     #22 pc 0037910b  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Fuse::Scripting::Duktape::duktapeduk_pcall(uStatic, void, int)+14)
I/DEBUG   (  460):     #23 pc 00378bf9  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Fuse::Scripting::Duktape::ContextSafeCall(app::Fuse::Scripting::Duktape::Context, int)+20)
I/DEBUG   (  460):     #24 pc 00344bc1  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Fuse::Scripting::Duktape::Context::SafeCall(int)+12)
I/DEBUG   (  460):     #25 pc 00379eab  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Fuse::Scripting::Duktape::JSFunctionCall(app::Fuse::Scripting::Duktape::JSFunction, uArray)+174)
I/DEBUG   (  460):     #26 pc 0032ae9b  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Fuse::Scripting::Function::Call(uArray)+18)
I/DEBUG   (  460):     #27 pc 00335cad  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Fuse::Reactive::TimerVisit(app::Fuse::Reactive::Timer)+116)
I/DEBUG   (  460):     #28 pc 0032ad9d  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Fuse::Reactive::Timer::Visit()+8)
I/DEBUG   (  460):     #29 pc 00334f89  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Fuse::Reactive::ThreadWorkerProcessTimers(app::Fuse::Reactive::ThreadWorker)+56)
I/DEBUG   (  460):     #30 pc 0032ad05  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Fuse::Reactive::ThreadWorker::ProcessTimers()+8)
I/DEBUG   (  460):     #31 pc 00335285  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Fuse::Reactive::ThreadWorkerRun(app::Fuse::Reactive::ThreadWorker)+548)
I/DEBUG   (  460):     #32 pc 0032ad39  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Fuse::Reactive::ThreadWorker::Run()+8)
I/DEBUG   (  460):     #33 pc 003353fd  /data/app/com.MainView-1/lib/arm/libMainView.so (app::Fuse::Reactive::ThreadWorkerRunWithExceptionHandler(app::Fuse::Reactive::ThreadWorker)+12)
I/DEBUG   (  460):     #34 pc 0025ac9f  /data/app/com.MainView-1/lib/arm/libMainView.so (uDelegate::InvokeVoid()+78)
I/DEBUG   (  460):     #35 pc 0042d505  /data/app/com.MainView-1/lib/arm/libMainView.so (invoke_delegate(void)+20)
I/DEBUG   (  460):     #36 pc 00012f83  /system/lib/libc.so (pthread_start(void)+30)
I/DEBUG   (  460):     #37 pc 00011047  /system/lib/libc.so (start_thread+6)
E/ActivityManager(  890): App crashed! Process: com.MainView
W/ActivityManager(  890):   Force finishing activity com.MainView/.MainView
E/SharedPreferencesImpl(  890): Couldn't create directory for SharedPreferences file shared_prefs/log_files.xml
I/BootReceiver(  890): Copying /data/tombstones/tombstone_09 to DropBox (SYSTEM_TOMBSTONE)
W/DropBoxManagerService(  890): Dropping: SYSTEM_TOMBSTONE (10 > 0 bytes)
W/DropBoxManagerService(  890): Dropping: data_app_native_crash (10 > 0 bytes)
I/ActivityManager(  890): Recipient 27440
W/InputDispatcher(  890): channel '317eb484 com.MainView.MainView (s)' ~ Consumer closed input channel or an error occurred.  events=0x9
E/InputDispatcher(  890): channel '317eb484 com.MainView.MainView (s)' ~ Channel is unrecoverably broken and will be disposed!
E/InputEventReceiver(24339): Looper::removeFd(80) is failed, result(0), input channel 'ClientState{169eb933 uid 10357 pid 27440} (c)'
W/InputDispatcher(  890): Attempted to unregister already unregistered input channel '317eb484 com.MainView.MainView (s)'
I/WindowState(  890): WIN DEATH: Window{317eb484 u0 com.MainView/com.MainView.MainView}

Thanks for the trace! We’ll have a look