質問が繰り返されることが多いことは知っていますが、よく検索しても解決策が見つかりませんでした 問題は、エラーがどこにあるのかわからず、それを修正するために可能なすべての方法を試しましたが、できませんでした
私がwampserverを使用し、IPが127.0.0.1であるデータベースへの接続に問題があると思います
私を助けてください
これはlogcatです:
03-30 22:23:48.596: E/Trace(1176): error opening trace file: No such file or directory
(2)
03-30 22:23:49.847: D/gralloc_goldfish(1176): Emulator without GPU emulation detected.
03-30 22:24:27.137: D/dalvikvm(1176): GC_CONCURRENT freed 63K, 7% free 2722K/2908K, paused 82ms+57ms, total 667ms
03-30 22:24:27.916: I/Choreographer(1176): Skipped 94 frames! The application may be doing too much work on its main thread.
03-30 22:24:35.865: I/Choreographer(1176): Skipped 33 frames! The application may be doing too much work on its main thread.
03-30 22:24:45.716: D/dalvikvm(1176): GC_FOR_ALLOC freed 65K, 7% free 2904K/3092K, paused 64ms, total 76ms
03-30 22:24:45.726: I/dalvikvm-heap(1176): Grow heap (frag case) to 3.560MB for 635812-byte allocation
03-30 22:24:45.846: D/dalvikvm(1176): GC_FOR_ALLOC freed 1K, 6% free 3523K/3716K, paused 111ms, total 111ms
03-30 22:24:45.976: D/dalvikvm(1176): GC_CONCURRENT freed 7K, 5% free 3531K/3716K, paused 8ms+22ms, total 133ms
03-30 22:24:46.266: I/Choreographer(1176): Skipped 42 frames! The application may be doing too much work on its main thread.
03-30 22:24:46.936: I/Choreographer(1176): Skipped 87 frames! The application may be doing too much work on its main thread.
03-30 22:24:47.556: I/Choreographer(1176): Skipped 33 frames! The application may be doing too much work on its main thread.
03-30 22:24:48.806: I/Choreographer(1176): Skipped 36 frames! The application may be doing too much work on its main thread.
03-30 22:24:50.526: W/System.err(1176): org.apache.http.conn.HttpHostConnectException: Connection to http://127.0.0.1 refused
03-30 22:24:50.576: W/System.err(1176): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:183)
03-30 22:24:50.646: I/Choreographer(1176): Skipped 42 frames! The application may be doing too much work on its main thread.
03-30 22:24:50.726: W/System.err(1176): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
03-30 22:24:51.066: W/System.err(1176): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
03-30 22:24:51.107: W/System.err(1176): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
03-30 22:24:51.186: W/System.err(1176): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
03-30 22:24:51.236: W/System.err(1176): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
03-30 22:24:51.359: W/System.err(1176): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
03-30 22:24:51.398: I/Choreographer(1176): Skipped 30 frames! The application may be doing too much work on its main thread.
03-30 22:24:51.446: W/System.err(1176): at com.example.androidhive.JSONParser.makeHttpRequest(JSONParser.java:51)
03-30 22:24:51.456: W/System.err(1176): at com.example.androidhive.NewProductActivity$CreateNewProduct.doInBackground(NewProductActivity.java:93)
03-30 22:24:51.456: W/System.err(1176): at com.example.androidhive.NewProductActivity$CreateNewProduct.doInBackground(NewProductActivity.java:1)
03-30 22:24:51.466: W/System.err(1176): at android.os.AsyncTask$2.call(AsyncTask.java:287)
03-30 22:24:51.616: W/System.err(1176): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
03-30 22:24:51.616: W/System.err(1176): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
03-30 22:24:51.706: W/System.err(1176): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
03-30 22:24:51.796: W/System.err(1176): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
03-30 22:24:51.876: W/System.err(1176): at java.lang.Thread.run(Thread.java:856)
03-30 22:24:51.876: W/System.err(1176): Caused by: java.net.ConnectException: failed to connect to /127.0.0.1 (port 80): connect failed: ECONNREFUSED (Connection refused)
03-30 22:24:51.957: I/Choreographer(1176): Skipped 30 frames! The application may be doing too much work on its main thread.
03-30 22:24:52.046: W/System.err(1176): at libcore.io.IoBridge.connect(IoBridge.java:114)
03-30 22:24:52.046: W/System.err(1176): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
03-30 22:24:52.046: W/System.err(1176): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
03-30 22:24:52.086: W/System.err(1176): at java.net.Socket.connect(Socket.java:842)
03-30 22:24:52.118: I/Choreographer(1176): Skipped 37 frames! The application may be doing too much work on its main thread.
03-30 22:24:52.136: W/System.err(1176): at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)
03-30 22:24:52.146: W/System.err(1176): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)
03-30 22:24:52.146: W/System.err(1176): ... 15 more
03-30 22:24:52.146: W/System.err(1176): Caused by: libcore.io.ErrnoException: connect failed: ECONNREFUSED (Connection refused)
03-30 22:24:52.236: W/System.err(1176): at libcore.io.Posix.connect(Native Method)
03-30 22:24:52.236: W/System.err(1176): at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85)
03-30 22:24:52.236: W/System.err(1176): at libcore.io.IoBridge.connectErrno(IoBridge.java:127)
03-30 22:24:52.366: W/System.err(1176): at libcore.io.IoBridge.connect(IoBridge.java:112)
03-30 22:24:52.396: W/System.err(1176): ... 20 more
03-30 22:24:52.457: I/Choreographer(1176): Skipped 47 frames! The application may be doing too much work on its main thread.
03-30 22:24:52.616: I/Choreographer(1176): Skipped 37 frames! The application may be doing too much work on its main thread.
03-30 22:24:52.736: E/Buffer Error(1176): Error converting result java.lang.NullPointerException: lock == null
03-30 22:24:52.836: E/JSON Parser(1176): Error parsing data org.json.JSONException: End of input at character 0 of
03-30 22:24:52.959: I/Choreographer(1176): Skipped 56 frames! The application may be doing too much work on its main thread.
03-30 22:24:53.016: W/dalvikvm(1176): threadid=14: thread exiting with uncaught exception (group=0x40a71930)
03-30 22:24:53.136: I/Choreographer(1176): Skipped 33 frames! The application may be doing too much work on its main thread.
03-30 22:24:55.267: E/AndroidRuntime(1176): FATAL EXCEPTION: AsyncTask #4
03-30 22:24:55.267: E/AndroidRuntime(1176): java.lang.RuntimeException: An error occured while executing doInBackground()
03-30 22:24:55.267: E/AndroidRuntime(1176): at android.os.AsyncTask$3.done(AsyncTask.java:299)
03-30 22:24:55.267: E/AndroidRuntime(1176): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
03-30 22:24:55.267: E/AndroidRuntime(1176): at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
03-30 22:24:55.267: E/AndroidRuntime(1176): at java.util.concurrent.FutureTask.run(FutureTask.java:239)
03-30 22:24:55.267: E/AndroidRuntime(1176): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
03-30 22:24:55.267: E/AndroidRuntime(1176): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
03-30 22:24:55.267: E/AndroidRuntime(1176): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
03-30 22:24:55.267: E/AndroidRuntime(1176): at java.lang.Thread.run(Thread.java:856)
03-30 22:24:55.267: E/AndroidRuntime(1176): Caused by: java.lang.NullPointerException
03-30 22:24:55.267: E/AndroidRuntime(1176): at com.example.androidhive.NewProductActivity$CreateNewProduct.doInBackground(NewProductActivity.java:97)
03-30 22:24:55.267: E/AndroidRuntime(1176): at com.example.androidhive.NewProductActivity$CreateNewProduct.doInBackground(NewProductActivity.java:1)
03-30 22:24:55.267: E/AndroidRuntime(1176): at android.os.AsyncTask$2.call(AsyncTask.java:287)
03-30 22:24:55.267: E/AndroidRuntime(1176): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
03-30 22:24:55.267: E/AndroidRuntime(1176): ... 4 more
03-30 22:24:56.126: I/Choreographer(1176): Skipped 42 frames! The application may be doing too much work on its main thread.
03-30 22:24:56.466: I/Choreographer(1176): Skipped 86 frames! The application may be doing too much work on its main thread.
03-30 22:24:56.747: I/Choreographer(1176): Skipped 51 frames! The application may be doing too much work on its main thread.
03-30 22:24:57.496: I/Choreographer(1176): Skipped 193 frames! The application may be doing too much work on its main thread.
03-30 22:24:58.366: E/WindowManager(1176): Activity com.example.androidhive.NewProductActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{40d53958 V.E..... R.....ID 0,0-456,144} that was originally added here
03-30 22:24:58.366: E/WindowManager(1176): android.view.WindowLeaked: Activity com.example.androidhive.NewProductActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{40d53958 V.E..... R.....ID 0,0-456,144} that was originally added here
03-30 22:24:58.366: E/WindowManager(1176): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:354)
03-30 22:24:58.366: E/WindowManager(1176): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:216)
03-30 22:24:58.366: E/WindowManager(1176): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
03-30 22:24:58.366: E/WindowManager(1176): at android.app.Dialog.show(Dialog.java:281)
03-30 22:24:58.366: E/WindowManager(1176): at com.example.androidhive.NewProductActivity$CreateNewProduct.onPreExecute(NewProductActivity.java:74)
03-30 22:24:58.366: E/WindowManager(1176): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586)
03-30 22:24:58.366: E/WindowManager(1176): at android.os.AsyncTask.execute(AsyncTask.java:534)
03-30 22:24:58.366: E/WindowManager(1176): at com.example.androidhive.NewProductActivity$1.onClick(NewProductActivity.java:56)
03-30 22:24:58.366: E/WindowManager(1176): at android.view.View.performClick(View.java:4204)
03-30 22:24:58.366: E/WindowManager(1176): at android.view.View$PerformClick.run(View.java:17355)
03-30 22:24:58.366: E/WindowManager(1176): at android.os.Handler.handleCallback(Handler.java:725)
03-30 22:24:58.366: E/WindowManager(1176): at android.os.Handler.dispatchMessage(Handler.java:92)
03-30 22:24:58.366: E/WindowManager(1176): at android.os.Looper.loop(Looper.java:137)
03-30 22:24:58.366: E/WindowManager(1176): at android.app.ActivityThread.main(ActivityThread.java:5041)
03-30 22:24:58.366: E/WindowManager(1176): at java.lang.reflect.Method.invokeNative(Native Method)
03-30 22:24:58.366: E/WindowManager(1176): at java.lang.reflect.Method.invoke(Method.java:511)
03-30 22:24:58.366: E/WindowManager(1176): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
03-30 22:24:58.366: E/WindowManager(1176): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
03-30 22:24:58.366: E/WindowManager(1176): at dalvik.system.NativeStart.main(Native Method)
03-30 22:24:58.411: I/Choreographer(1176): Skipped 57 frames! The application may be doing too much work on its main thread.
これは私のマニフェストファイルです
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.androidhive"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17"/>
<application
android:configChanges="keyboardHidden|orientation"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:allowBackup="True">
<activity
android:name=".MainScreenActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- All Product Activity -->
<activity
android:name=".AllProductsActivity"
android:label="All Products" >
</activity>
<!-- Add Product Activity -->
<activity
android:name=".NewProductActivity"
android:label="Add New Product" >
</activity>
<!-- Edit Product Activity -->
<activity
android:name=".EditProductActivity"
android:label="Edit Product" >
</activity>
</application>
</manifest>
本当に助けてください