It is currently 3 March 2024, 15:34 Advanced search

App Mobile: una bella schermata bianca

Domande e risposte su come utilizzare Instant Developer Foundation al meglio

App Mobile: una bella schermata bianca

Postby r.bennati » 30 June 2017, 14:30

Ciao a tutti,
grazie all'aiuto di alcuni di voi mi sono cimentato nella generazione della mia prima app Android.

Ho scaricato Android Studio 2.3.3. Ho seguito la procedura di generare il package, importare il progetto Eclipse, e di creare l'Apk.
Fin qui tutto bene, ma quando ho installato l'App sul dispositivo e l'o avviata, è apparsa una bella schermata completamente BIANCA.

Lo stesso package zip genrato dal mio progetto, compilato nell'ambiente Studio 2.2.3 di chi mi ha seguito, invece, genera una app perfettamente funzionante.
L'unica differenza evidente è la versione di Android Studio: 2.3.3 Vs. 2.2.3. Vi risulta ci siano di questi problemi ?
A qualcuno viene in mente qualche suggerimento?
User avatar
r.bennati
 
Posts: 487
Joined: 29 April 2013, 12:38
Location: Novi Ligure (AL)

Re: App Mobile: una bella schermata bianca

Postby d.pierangeli » 30 June 2017, 14:43

Che versione di Inde usi?

Dalla 16.0 il pacchetto generato è quello di Android Studio, quindi non lo devi più importare ma solo aprire.

L'applicazione è online o offline?

Non penso sia la versione di Android studio, io ho la 2.3.3 e mi funziona correttamente.

I log di Android Studio dicono qualcosa?
User avatar
d.pierangeli
Pro Gamma
Pro Gamma
 
Posts: 7698
Joined: 30 September 2010, 15:35

Re: App Mobile: una bella schermata bianca

Postby d.pierangeli » 30 June 2017, 14:53

Ho appena aggiornato e riprovato, ti confermo che con Android Studio 2.3.3 non ci sono problemi.
User avatar
d.pierangeli
Pro Gamma
Pro Gamma
 
Posts: 7698
Joined: 30 September 2010, 15:35

Re: App Mobile: una bella schermata bianca

Postby r.bennati » 30 June 2017, 14:55

d.pierangeli wrote:Che versione di Inde usi?

Dalla 16.0 il pacchetto generato è quello di Android Studio, quindi non lo devi più importare ma solo aprire.

L'applicazione è online o offline?

Non penso sia la versione di Android studio, io ho la 2.3.3 e mi funziona correttamente.

I log di Android Studio dicono qualcosa?


Uso la 16. In effetti ho visto che se riapro Studio lui mi propone direttamente di aprirlo.
L'app è una cosa banale online: bottone [scan] e textbox che mostra la stringa barcode letta.
Il log di quando genero l'apk non segnala nulla di che:
30/06/2017
16:50 Gradle sync started
16:50 Gradle sync completed
16:50 Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]
16:50 Gradle build finished in 2s 392ms
16:51 Executing tasks: [:app:assembleDebug]
16:51 Gradle build finished in 1s 756ms
16:51 Build APK
APK(s) generated successfully.
Show in Explorer

Ci sono altri log che posso guardare ?

L'app in esecuzione non sembra bloccata, semplicemente appare vuota, tutta bianca.

P.S. MI chiede l'upgrade di gradle a 3.3.3, che sto rifiutando...
User avatar
r.bennati
 
Posts: 487
Joined: 29 April 2013, 12:38
Location: Novi Ligure (AL)

Re: App Mobile: una bella schermata bianca

Postby d.pierangeli » 30 June 2017, 15:01

Sembra che non riesca a contattare il server, puoi provare a metterla offline?
User avatar
d.pierangeli
Pro Gamma
Pro Gamma
 
Posts: 7698
Joined: 30 September 2010, 15:35

Re: App Mobile: una bella schermata bianca

Postby r.bennati » 30 June 2017, 15:05

Non è che dovevo installare Android Studio a 32bit invece che a 64bit?
User avatar
r.bennati
 
Posts: 487
Joined: 29 April 2013, 12:38
Location: Novi Ligure (AL)

Re: App Mobile: una bella schermata bianca

Postby r.bennati » 30 June 2017, 15:09

d.pierangeli wrote:Sembra che non riesca a contattare il server, puoi provare a metterla offline?


Ehm.... Non so cosa devo fare per metterla offline ... :-(

Ho visto che, usato dallo stesso device, Caravel chiama correttamente l'app via web su http://194.1.1.20:1308/Appmag/Appmag.aspx
e funziona anche in shell nativa su 194.1.1.20.Appmag
quindi lo smartphone si parla col server senza problemi.

Usando Cassini per i test, nel codice sorgente della ViewController vado a mettere:
mainSvc.URL = (mainSvc.Type == 4 ? "http://194.1.1.20:1308/Appmag/Appmag.aspx" : "");
al posto di http://0.0.0.0/Appmag.aspx
è corretto, no ? Non serve IIS per forza, giusto ?
User avatar
r.bennati
 
Posts: 487
Joined: 29 April 2013, 12:38
Location: Novi Ligure (AL)

Re: App Mobile: una bella schermata bianca

Postby d.pierangeli » 30 June 2017, 15:24

Mi sembra a posto, per il 32/64 non so cosa dirti, io ce l'ho a 64.

Se colleghi il device al compure via USB i log dicono solo quello?
User avatar
d.pierangeli
Pro Gamma
Pro Gamma
 
Posts: 7698
Joined: 30 September 2010, 15:35

Re: App Mobile: una bella schermata bianca

Postby r.bennati » 30 June 2017, 15:36

d.pierangeli wrote:Mi sembra a posto, per il 32/64 non so cosa dirti, io ce l'ho a 64.

Ok, quindi va bene a 64.

Se colleghi il device al compure via USB i log dicono solo quello?

Purtroppo non l'ho mai fatto un debug così, non sono capace.
User avatar
r.bennati
 
Posts: 487
Joined: 29 April 2013, 12:38
Location: Novi Ligure (AL)

Re: App Mobile: una bella schermata bianca

Postby r.bennati » 30 June 2017, 15:55

Ok ho appena capito come avviare il debug ... Forse è per questo errore ?

06-30 17:49:09.926 10930-10930/com.Appmag W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 10930
06-30 17:49:09.946 10930-11003/com.Appmag E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
06-30 17:49:09.986 10930-11000/com.Appmag I/OpenGLRenderer: Initialized EGL, version 1.4
06-30 17:49:09.996 10930-11000/com.Appmag W/OpenGLRenderer: load: so=/system/lib/libhwuibp.so
dlopen failed: library "/system/lib/libhwuibp.so" not found
06-30 17:49:09.996 10930-11000/com.Appmag W/OpenGLRenderer: Initialize Binary Program Cache: Load Failed
Uso un HUAWEI RIO_L01 (G8 Lite) Android 6.0.1

Questo è tutto il log che esce eseguendo l'app in debug:
06-30 17:52:40.006 13924-13924/? D/Zygote: CtrlSocket libc.so ctrl_sockets_set_addr pfunc is not exist!
06-30 17:52:40.006 13924-13924/? I/art: Late-enabling -Xcheck:jni
06-30 17:52:40.036 13924-13924/com.Appmag D/ActivityThread: ActivityThread,attachApplication
06-30 17:52:40.066 13924-13924/com.Appmag D/HwCust: Create obj success use class android.content.res.HwCustHwResourcesImpl
06-30 17:52:40.066 13924-13924/com.Appmag W/ActivityThread: Application com.Appmag is waiting for the debugger on port 8100...
06-30 17:52:40.066 13924-13924/com.Appmag I/System.out: Sending WAIT chunk
06-30 17:52:40.246 13924-13930/com.Appmag I/art: Debugger is active
06-30 17:52:40.276 13924-13924/com.Appmag I/System.out: Debugger has connected
06-30 17:52:40.276 13924-13924/com.Appmag I/System.out: waiting for debugger to settle...
06-30 17:52:40.466 13924-13924/com.Appmag I/System.out: waiting for debugger to settle...
06-30 17:52:40.676 13924-13924/com.Appmag I/System.out: waiting for debugger to settle...
06-30 17:52:40.876 13924-13924/com.Appmag I/System.out: waiting for debugger to settle...
06-30 17:52:41.076 13924-13924/com.Appmag I/System.out: waiting for debugger to settle...
06-30 17:52:41.266 13924-13924/com.Appmag I/System.out: waiting for debugger to settle...
06-30 17:52:41.476 13924-13924/com.Appmag I/System.out: waiting for debugger to settle...
06-30 17:52:41.676 13924-13924/com.Appmag I/System.out: waiting for debugger to settle...
06-30 17:52:41.866 13924-13924/com.Appmag I/System.out: debugger has settled (1499)
06-30 17:52:41.956 13924-13924/com.Appmag W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.Appmag-1/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.Appmag-1@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status
06-30 17:52:42.206 13924-13924/com.Appmag W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.Appmag-1/split_lib_slice_0_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.Appmag-1@split_lib_slice_0_apk.apk@classes.dex) because non-0 exit status
06-30 17:52:42.286 13924-13924/com.Appmag W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.Appmag-1/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.Appmag-1@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status
06-30 17:52:42.376 13924-13924/com.Appmag W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.Appmag-1/split_lib_slice_2_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.Appmag-1@split_lib_slice_2_apk.apk@classes.dex) because non-0 exit status
06-30 17:52:42.456 13924-13924/com.Appmag W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.Appmag-1/split_lib_slice_3_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.Appmag-1@split_lib_slice_3_apk.apk@classes.dex) because non-0 exit status
06-30 17:52:42.576 13924-13924/com.Appmag W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.Appmag-1/split_lib_slice_4_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.Appmag-1@split_lib_slice_4_apk.apk@classes.dex) because non-0 exit status
06-30 17:52:42.646 13924-13924/com.Appmag W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.Appmag-1/split_lib_slice_5_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.Appmag-1@split_lib_slice_5_apk.apk@classes.dex) because non-0 exit status
06-30 17:52:42.736 13924-13924/com.Appmag W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.Appmag-1/split_lib_slice_6_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.Appmag-1@split_lib_slice_6_apk.apk@classes.dex) because non-0 exit status
06-30 17:52:42.816 13924-13924/com.Appmag W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.Appmag-1/split_lib_slice_7_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.Appmag-1@split_lib_slice_7_apk.apk@classes.dex) because non-0 exit status
06-30 17:52:42.896 13924-13924/com.Appmag W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.Appmag-1/split_lib_slice_8_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.Appmag-1@split_lib_slice_8_apk.apk@classes.dex) because non-0 exit status
06-30 17:52:42.986 13924-13924/com.Appmag W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.Appmag-1/split_lib_slice_9_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.Appmag-1@split_lib_slice_9_apk.apk@classes.dex) because non-0 exit status
06-30 17:52:42.996 13924-13924/com.Appmag I/InstantRun: starting instant run server: is main process
06-30 17:52:43.046 13924-13924/com.Appmag V/HwPolicyFactory: : success to get AllImpl object and return....
06-30 17:52:43.046 13924-13924/com.Appmag V/HwWidgetFactory: : successes to get AllImpl object and return....
06-30 17:52:43.056 13924-13924/com.Appmag V/ActivityThread: ActivityThread,callActivityOnCreate
06-30 17:52:43.106 13924-13924/com.Appmag I/WebViewFactory: Loading com.google.android.webview version 59.0.3071.125 (code 307112550)
06-30 17:52:43.136 13924-13924/com.Appmag D/HwCust: Create obj success use class android.content.res.HwCustHwResourcesImpl
06-30 17:52:43.156 13924-13924/com.Appmag I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
06-30 17:52:43.156 13924-13924/com.Appmag I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
06-30 17:52:43.166 13924-13924/com.Appmag I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
06-30 17:52:43.176 13924-13924/com.Appmag I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
06-30 17:52:43.176 13924-13924/com.Appmag I/cr_LibraryLoader: Time to load native libraries: 2 ms (timestamps 3955-3957)
06-30 17:52:43.206 13924-13924/com.Appmag I/chromium: [INFO:library_loader_hooks.cc(144)] Chromium logging enabled: level = 0, default verbosity = 0
06-30 17:52:43.206 13924-13924/com.Appmag I/cr_LibraryLoader: Expected native library version number "59.0.3071.125", actual native library version number "59.0.3071.125"
06-30 17:52:43.236 13924-13924/com.Appmag I/cr_BrowserStartup: Initializing chromium process, singleProcess=true
06-30 17:52:43.266 13924-13924/com.Appmag I/Adreno: QUALCOMM build : d28da0e, Iec24cdb30f
Build Date : 03/10/16
OpenGL ES Shader Compiler Version: XE031.06.00.05
Local Branch :
Remote Branch : refs/tags/AU_LINUX_ANDROID_LA.BR.1.2.6_RB1.06.00.01.179.013
Remote Branch : NONE
Reconstruct Branch : NOTHING
06-30 17:52:43.336 13924-14040/com.Appmag W/ResourceType: Failure getting entry for 0x7f06002f (t=5 e=47) (error -2147483647)
06-30 17:52:43.336 13924-14040/com.Appmag E/GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
06-30 17:52:43.476 13924-13924/com.Appmag D/Appmag: [Main::loadAndStartService] PATH = /data/user/0/com.Appmag/files/Res/
06-30 17:52:43.636 13924-14034/com.Appmag W/cr_BindingManager: Cannot setInForeground() - never saw a connection for the pid: 13924
06-30 17:52:43.636 13924-14047/com.Appmag D/ConnectivityManager.CallbackHandler: CM callback handler got msg 524290
06-30 17:52:43.696 13924-14038/com.Appmag V/AudioManager: isWiredHeadsetOn...
06-30 17:52:43.696 13924-14038/com.Appmag W/cr_media: Requires BLUETOOTH permission
06-30 17:52:43.706 13924-13924/com.Appmag I/HwSecImmHelper: mSecurityInputMethodService is null
06-30 17:52:43.736 13924-13924/com.Appmag E/GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
06-30 17:52:43.756 13924-14056/com.Appmag D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
06-30 17:52:43.796 13924-14047/com.Appmag D/ConnectivityManager.CallbackHandler: CM callback handler got msg 524290
06-30 17:52:43.806 13924-13924/com.Appmag W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 13924
06-30 17:52:43.816 13924-14059/com.Appmag E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
06-30 17:52:43.846 13924-14056/com.Appmag I/OpenGLRenderer: Initialized EGL, version 1.4
06-30 17:52:43.856 13924-14056/com.Appmag W/OpenGLRenderer: load: so=/system/lib/libhwuibp.so
dlopen failed: library "/system/lib/libhwuibp.so" not found
06-30 17:52:43.856 13924-14056/com.Appmag W/OpenGLRenderer: Initialize Binary Program Cache: Load Failed
06-30 17:52:43.866 13924-14059/com.Appmag W/AudioCapabilities: Unsupported mime audio/evrc
06-30 17:52:43.866 13924-14059/com.Appmag W/AudioCapabilities: Unsupported mime audio/qcelp
06-30 17:52:43.866 13924-14059/com.Appmag W/VideoCapabilities: Unrecognized profile 2130706433 for video/avc
06-30 17:52:43.876 13924-14059/com.Appmag W/AudioCapabilities: Unsupported mime audio/qcelp
06-30 17:52:43.886 13924-14059/com.Appmag W/AudioCapabilities: Unsupported mime audio/evrc
06-30 17:52:43.886 13924-14059/com.Appmag W/VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
06-30 17:52:43.886 13924-14059/com.Appmag W/VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
06-30 17:52:43.896 13924-14059/com.Appmag W/VideoCapabilities: Unsupported mime video/x-ms-wmv
06-30 17:52:43.896 13924-14055/com.Appmag D/Appmag: [Main::registerForRemoteNotification] Device Token: APA91bHHcXwm27wN8RB3vjdvLazjVtS_bkvyICxHsPDHClrqXv7YGLLKxfGjC3GbnHwAsLYugjyR-AUxUozL2-BRm8gr3aVd5D73rXWWWuqRKJzaK1Isb1Y
06-30 17:52:43.896 13924-14055/com.Appmag D/Appmag: [Main::registerForRemoteNotification] HEX Token = 41504139316248486358776d3237774e38524233766a64764c617a6a5674535f626b76794943784873504448436c727158763759474c4c4b7866476a433347626e487741734c5975676a79522d415578556f7a4c322d42526d386772336156643544373372585757577571524b4a7a614b314973623159
06-30 17:52:43.906 13924-14059/com.Appmag W/VideoCapabilities: Unsupported mime video/divx
06-30 17:52:43.906 13924-14059/com.Appmag W/VideoCapabilities: Unsupported mime video/divx311
06-30 17:52:43.906 13924-14059/com.Appmag W/VideoCapabilities: Unsupported mime video/divx4
06-30 17:52:43.906 13924-14059/com.Appmag W/VideoCapabilities: Unrecognized profile/level 0/0 for video/mpeg2
06-30 17:52:43.906 13924-14059/com.Appmag W/VideoCapabilities: Unrecognized profile/level 0/2 for video/mpeg2
06-30 17:52:43.906 13924-14059/com.Appmag W/VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
06-30 17:52:43.926 13924-14059/com.Appmag I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
06-30 17:52:43.996 13924-13924/com.Appmag D/Appmag: [IDWebView::onConsoleMessage] ERROR; Uncaught ReferenceError: DesktopManager is not defined -- From line 1 of
User avatar
r.bennati
 
Posts: 487
Joined: 29 April 2013, 12:38
Location: Novi Ligure (AL)

Next

Return to Tips & Tricks - Foundation

Who is online

Users browsing this forum: No registered users and 25 guests