我想創建一個應用程序與MySQL的Android連接。但該應用突然停止。我不明白是什麼導致了這個問題。我在之前的問題中詢問過同樣的問題。請幫助。我很絕望。這是對我的學術項目我想用mysql的android連接創建一個應用程序。但該應用程序突然停止
誤差
04-28 15:43:29.918: D/dalvikvm(8036): Late-enabling CheckJNI
04-28 15:43:30.278: D/dalvikvm(8036): GC_FOR_ALLOC freed 78K, 12% free 9560K/10759K, paused 33ms, total 33ms
04-28 15:43:30.288: I/dalvikvm-heap(8036): Grow heap (frag case) to 10.705MB for 437672-byte allocation
04-28 15:43:30.358: D/dalvikvm(8036): GC_CONCURRENT freed <1K, 11% free 9986K/11207K, paused 13ms+7ms, total 70ms
04-28 15:43:30.358: D/dalvikvm(8036): WAIT_FOR_CONCURRENT_GC blocked 55ms
04-28 15:43:30.449: D/dalvikvm(8036): GC_FOR_ALLOC freed 2K, 11% free 10211K/11463K, paused 56ms, total 57ms
04-28 15:43:30.649: D/libEGL(8036): loaded /system/lib/egl/libEGL_mali.so
04-28 15:43:30.759: D/libEGL(8036): loaded /system/lib/egl/libGLESv1_CM_mali.so
04-28 15:43:30.789: D/libEGL(8036): loaded /system/lib/egl/libGLESv2_mali.so
04-28 15:43:30.879: D/OpenGLRenderer(8036): Enabling debug mode 0
04-28 15:43:32.130: D/dalvikvm(8036): GC_CONCURRENT freed 11K, 9% free 10906K/11975K, paused 4ms+6ms, total 56ms
04-28 15:43:32.130: D/dalvikvm(8036): WAIT_FOR_CONCURRENT_GC blocked 31ms
04-28 15:43:32.200: D/dalvikvm(8036): GC_FOR_ALLOC freed <1K, 10% free 11335K/12487K, paused 47ms, total 47ms
04-28 15:43:32.290: D/dalvikvm(8036): GC_CONCURRENT freed 3K, 8% free 11992K/12999K, paused 3ms+13ms, total 71ms
04-28 15:43:32.681: E/SpannableStringBuilder(8036): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
04-28 15:43:32.681: E/SpannableStringBuilder(8036): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
04-28 15:43:34.422: E/SpannableStringBuilder(8036): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
04-28 15:43:34.422: E/SpannableStringBuilder(8036): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
04-28 15:43:35.994: D/ProgressBar(8036): setProgress = 0
04-28 15:43:35.994: D/ProgressBar(8036): setProgress = 0, fromUser = false
04-28 15:43:35.994: D/ProgressBar(8036): mProgress = 0mIndeterminate = false, mMin = 0, mMax = 10000
04-28 15:43:36.124: W/ResourceType(8036): Failure getting entry for 0x010802c8 (t=7 e=712) in package 0 (error -75)
04-28 15:43:36.474: D/AndroidRuntime(8036): Shutting down VM
04-28 15:43:36.474: W/dalvikvm(8036): threadid=1: thread exiting with uncaught exception (group=0x41a162a0)
04-28 15:43:36.534: E/AndroidRuntime(8036): FATAL EXCEPTION: main
04-28 15:43:36.534: E/AndroidRuntime(8036): android.os.NetworkOnMainThreadException
04-28 15:43:36.534: E/AndroidRuntime(8036): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1118)
04-28 15:43:36.534: E/AndroidRuntime(8036): at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
04-28 15:43:36.534: E/AndroidRuntime(8036): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
04-28 15:43:36.534: E/AndroidRuntime(8036): at java.net.InetAddress.getAllByName(InetAddress.java:214)
04-28 15:43:36.534: E/AndroidRuntime(8036): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
04-28 15:43:36.534: E/AndroidRuntime(8036): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
04-28 15:43:36.534: E/AndroidRuntime(8036): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
04-28 15:43:36.534: E/AndroidRuntime(8036): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
04-28 15:43:36.534: E/AndroidRuntime(8036): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
04-28 15:43:36.534: E/AndroidRuntime(8036): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
04-28 15:43:36.534: E/AndroidRuntime(8036): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
04-28 15:43:36.534: E/AndroidRuntime(8036): at com.mahavega.qcdemo.JSONParser.makeHttpRequest(JSONParser.java:62)
04-28 15:43:36.534: E/AndroidRuntime(8036): at com.mahavega.qcdemo.MainActivity$GetEventDetails$1.run(MainActivity.java:198)
04-28 15:43:36.534: E/AndroidRuntime(8036): at android.os.Handler.handleCallback(Handler.java:615)
04-28 15:43:36.534: E/AndroidRuntime(8036): at android.os.Handler.dispatchMessage(Handler.java:92)
04-28 15:43:36.534: E/AndroidRuntime(8036): at android.os.Looper.loop(Looper.java:137)
04-28 15:43:36.534: E/AndroidRuntime(8036): at android.app.ActivityThread.main(ActivityThread.java:4856)
04-28 15:43:36.534: E/AndroidRuntime(8036): at java.lang.reflect.Method.invokeNative(Native Method)
04-28 15:43:36.534: E/AndroidRuntime(8036): at java.lang.reflect.Method.invoke(Method.java:511)
04-28 15:43:36.534: E/AndroidRuntime(8036): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
04-28 15:43:36.534: E/AndroidRuntime(8036): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
04-28 15:43:36.534: E/AndroidRuntime(8036): at dalvik.system.NativeStart.main(Native Method)
請提供源代碼。 – MDMalik 2013-04-28 10:29:00
你在你的模擬器和項目中使用哪個android版本? – ACengiz 2013-04-28 10:29:52
http://stackoverflow.com/questions/16259430/connecting-android-to-mysql-database-application-ends – 2013-04-28 16:41:27