測試我的應用程序在物理設備的Android 2.3工作室「調試顯示連接和斷開連接線,但沒有在兩者之間」我
在調試運行
Console
$ adb push C:\Users\arjun\AndroidStudioProjects\Scol\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.example.arjun.scol
$ adb shell pm install -r "/data/local/tmp/com.example.arjun.scol"
pkg: /data/local/tmp/com.example.arjun.scol
Success
$ adb shell am start -n "com.example.arjun.scol/com.example.arjun.scol.login.Login" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.example.arjun.scol | com.example.arjun.scol.test
Waiting for application to come online: com.example.arjun.scol | com.example.arjun.scol.test
Connecting to com.example.arjun.scol
Connected to the target VM, address: 'localhost:8600', transport: 'socket'
Disconnected from the target VM, address: 'localhost:8600', transport: 'socket'
由於錯誤我的應用程序崩潰,但沒有顯示在debug console
...這件事發生後updating android studio to 2.3
..
但是當我通過Android Monitor
滾動,我發現了錯誤信息
03-05 12:50:40.380 6608-6608/com.example.arjun.scol E/AndroidRuntime: FATAL EXCEPTION: main
android.database.sqlite.SQLiteException: near ".": syntax error (code 1): , while compiling: CREATE TABLE IF NOT EXISTS teacer_homework(s.no. INTEGER AUTO INCREMENT, subject1 TEXT, subject2 TEXT, subject3 TEXT, subject4 TEXT, subject5 TEXT, subject6 TEXT, subject7 TEXT, date TEXT);
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1108)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:681)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:589)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1769)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1700)
at com.example.arjun.scol.database.MyDBHandler.classhomework(MyDBHandler.java:246)
at com.example.arjun.scol.SubjectSelection$2.onClick(SubjectSelection.java:59)
at android.view.View.performClick(View.java:4261)
at android.view.View$PerformClick.run(View.java:17420)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:177)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
0
我已經修改了其運行的配置太...但沒有幫助...
我應該降級的Android工作室?
查看'Android Monitor'部分。有什麼嗎? –
@Luca Nicoletti yes..I在那裏看到那些條目...如何在調試控制檯中顯示它? – arjun
而在調試控制檯上,你什麼都看不到?沒有錯誤?你在用哪種設備?它是否有自定義ROM? –