編輯:Android開發教程
錯誤代碼:
12-12 14:28:34.692: E/AndroidRuntime(1524): java.lang.RuntimeException: startPreview failed 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.hardware.Camera.startPreview(Native Method) 12-12 14:28:34.692: E/AndroidRuntime(1524): at com.nmbb.example.sampleexecutejs.CameraDemoActivity.surfaceCreated(CameraDemoActivity.java:85) 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.view.SurfaceView.updateWindow(SurfaceView.java:569) 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.view.SurfaceView.access$000(SurfaceView.java:86) 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:174) 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:680) 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1896) 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:999) 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4470) 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749) 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.view.Choreographer.doCallbacks(Choreographer.java:562) 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.view.Choreographer.doFrame(Choreographer.java:532) 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735) 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.os.Handler.handleCallback(Handler.java:725) 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.os.Handler.dispatchMessage(Handler.java:92) 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.os.Looper.loop(Looper.java:137) 12-12 14:28:34.692: E/AndroidRuntime(1524): at android.app.ActivityThread.main(ActivityThread.java:5068) 12-12 14:28:34.692: E/AndroidRuntime(1524): at java.lang.reflect.Method.invokeNative(Native Method) 12-12 14:28:34.692: E/AndroidRuntime(1524): at java.lang.reflect.Method.invoke(Method.java:511) 12-12 14:28:34.692: E/AndroidRuntime(1524): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 12-12 14:28:34.692: E/AndroidRuntime(1524): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 12-12 14:28:34.692: E/AndroidRuntime(1524): at dalvik.system.NativeStart.main(Native Method)
 
錯誤原因:
只要給Activity設置了android:process屬性,就沒法預覽!!!出現在魅族Flyme OS 3中,Flyme OS 1和Flyme OS 2沒有問題。
解決方法:
暫時沒啥好辦法,只能不用android:process
作者:cnblogs 農民伯伯
這個話題是繼續android安全問題(二) 程序鎖延伸的之前我已經展示了如何制作程序鎖。當打 開指定應用的時候,彈出一個密碼頁面。程序鎖的話題雖然是和安全相關,但是這應該
前言Android Build 系統是 Android 源碼的一部分。關於如何獲取 Android 源碼,請參照 Android Source 官方網站:http://s
cocos2d-x 3.0發布有一段時間了,作為一個初學者,我一直覺得cocos2d-x很坑。每個比較大的版本變動,都會有不一樣的項目創建方式,每次的跨度都挺大&hell
AutoCompleteTextView和EditText很相似,事實上,AutoCompleteTextView就是EditText的子類。使用 AutoComplet