2016-03-16 83 views
0

我嘗試在Windows中使用cordova來創建一個簡單的android應用程序。我創建一個使用我添加了Android平臺的第一個項目命令cordova create hello com.example.hello HelloWorldCordova 6.0.0不幸的是,HelloWorld已停止

,我嘗試建立和建設的成功,但是當我仿真程序不啓動,並收到在屏幕上的錯誤:

Unfortunaly ,HelloWorld已停止。

的logcat:

03-16 16:44:19.073 2442-2442/com.example.hello W/System﹕ ClassLoader referenced unknown path: /data/app/com.example.hello-1/lib/x86 
03-16 16:44:19.266 2442-2442/com.example.hello I/WebViewFactory﹕ Loading com.android.webview version 44.0.2403.119 (code 246011910) 
03-16 16:44:19.310 2442-2442/com.example.hello W/System﹕ ClassLoader referenced unknown path: /system/app/webview/lib/x86 
03-16 16:44:19.377 2442-2442/com.example.hello I/LibraryLoader﹕ Time to load native libraries: 62 ms (timestamps 9389-9451) 
03-16 16:44:19.377 2442-2442/com.example.hello I/LibraryLoader﹕ Expected native library version number "",actual native library version number "" 
03-16 16:44:19.392 2442-2442/com.example.hello I/LibraryLoader﹕ Expected native library version number "",actual native library version number "" 
03-16 16:44:19.392 2442-2442/com.example.hello I/chromium﹕ [INFO:library_loader_hooks.cc(120)] Chromium logging enabled: level = 0, default verbosity = 0 
03-16 16:44:19.483 2442-2442/com.example.hello I/BrowserStartupController﹕ Initializing chromium process, singleProcess=true 
03-16 16:44:19.484 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread 
03-16 16:44:19.486 2442-2442/com.example.hello E/SysUtils﹕ ApplicationContext is null in ApplicationStatus 
03-16 16:44:19.568 2442-2442/com.example.hello W/chromium﹕ [WARNING:resource_bundle.cc(285)] locale_file_path.empty() 
03-16 16:44:19.571 2442-2442/com.example.hello E/libEGL﹕ validate_display:255 error 3008 (EGL_BAD_DISPLAY) 
03-16 16:44:19.571 2442-2442/com.example.hello E/libEGL﹕ validate_display:255 error 3008 (EGL_BAD_DISPLAY) 
03-16 16:44:19.571 2442-2442/com.example.hello E/chromium﹕ [ERROR:gl_surface_egl.cc(327)] No suitable EGL configs found. 
03-16 16:44:19.571 2442-2442/com.example.hello E/chromium﹕ [ERROR:gl_surface_android.cc(23)] GLSurfaceEGL::InitializeOneOff failed. 
03-16 16:44:19.571 2442-2442/com.example.hello E/chromium﹕ [ERROR:browser_main_loop.cc(698)] GLSurface::InitializeOneOff failed 
03-16 16:44:19.628 2442-2468/com.example.hello W/AudioManagerAndroid﹕ Requires BLUETOOTH permission 
03-16 16:44:19.667 2442-2442/com.example.hello E/DataReductionProxySettingListener﹕ No DRP key due to exception:java.lang.ClassNotFoundException: com.android.webview.chromium.Drp 
03-16 16:44:19.757 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread 
03-16 16:44:19.762 2442-2442/com.example.hello W/AwContents﹕ onDetachedFromWindow called when already detached. Ignoring 
03-16 16:44:20.182 2442-2442/com.example.hello D/SystemWebViewEngine﹕ CordovaWebView is running on device made by: unknown 
03-16 16:44:20.188 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread 
03-16 16:44:20.188 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread 
03-16 16:44:20.246 2442-2452/com.example.hello I/art﹕ Background sticky concurrent mark sweep GC freed 7609(505KB) AllocSpace objects, 3(60KB) LOS objects, 64% free, 861KB/2MB, paused 1.373ms total 448.240ms 
03-16 16:44:20.310 2442-2466/com.example.hello W/chromium﹕ [WARNING:data_reduction_proxy_config.cc(423)] SPDY proxy OFF at startup 
03-16 16:44:20.368 2442-2442/com.example.hello D/gralloc_goldfish﹕ Emulator without host-side GPU emulation detected. 
03-16 16:44:20.376 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread 
03-16 16:44:20.410 2442-2442/com.example.hello W/art﹕ Attempt to remove non-JNI local reference, dumping thread 
03-16 16:44:20.586 2442-2452/com.example.hello I/art﹕ Background partial concurrent mark sweep GC freed 1447(97KB) AllocSpace objects, 2(2MB) LOS objects, 35% free, 926KB/1438KB, paused 2.668ms total 209.255ms 
03-16 16:44:20.587 2442-2480/com.example.hello A/chromium﹕ [FATAL:gl_surface_android.cc(58)] Check failed: kGLImplementationNone != GetGLImplementation() (0 vs. 0) 
03-16 16:44:20.587 2442-2480/com.example.hello A/libc﹕ Fatal signal 6 (SIGABRT), code -6 in tid 2480 (GpuThread) 

回答

0

這是幾乎完全同樣的錯誤Error in Android Programming while connecting to Phonegap。這似乎與this bug from ionic有關。

據他們說,「從快照切換到主機GPU解決了這個問題。」

這是有道理的,因爲最後三個錯誤與opengl有關。

對各種版主的說明:我試圖關閉一個作爲另一個的副本,但由於沒有答案,因此無法完成。試圖尋找'重複未答覆'的元,但他們只是說不這樣做。我想我會發佈一個可能的答案,如果任何一個被接受,我會關閉另一個作爲dup。