我正在研究我在 Android 2.3.3 中开发的项目。
我想在 Android 4.0.3 上继续开发它,但它不起作用。
当我usesminsdk
从清单文件中删除时,它可以工作。
还有其他方法吗?我的方式健康吗?
06-19 09:19:33.122: E/AndroidRuntime(595): FATAL EXCEPTION: main
06-19 09:19:33.122: E/AndroidRuntime(595): android.os.NetworkOnMainThreadException
06-19 09:19:33.122: E/AndroidRuntime(595): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099)
06-19 09:19:33.122: E/AndroidRuntime(595): at java.net.InetAddress.lookupHostByName(InetAddress.java:391)
06-19 09:19:33.122: E/AndroidRuntime(595): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242)
06-19 09:19:33.122: E/AndroidRuntime(595): at java.net.InetAddress.getAllByName(InetAddress.java:220)
06-19 09:19:33.122: E/AndroidRuntime(595): at libcore.net.http.HttpConnection.<init>(HttpConnection.java:71)
06-19 09:19:33.122: E/AndroidRuntime(595): at libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
06-19 09:19:33.122: E/AndroidRuntime(595): at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:351)
06-19 09:19:33.122: E/AndroidRuntime(595): at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:86)
06-19 09:19:33.122: E/AndroidRuntime(595): at libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
06-19 09:19:33.122: E/AndroidRuntime(595): at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:308)
06-19 09:19:33.122: E/AndroidRuntime(595): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:460)
06-19 09:19:33.122: E/AndroidRuntime(595): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:432)
06-19 09:19:33.122: E/AndroidRuntime(595): at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:282)
06-19 09:19:33.122: E/AndroidRuntime(595): at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:232)
06-19 09:19:33.122: E/AndroidRuntime(595): at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:273)
06-19 09:19:33.122: E/AndroidRuntime(595): at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:168)
06-19 09:19:33.122: E/AndroidRuntime(595): at libcore.net.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:270)
06-19 09:19:33.122: E/AndroidRuntime(595): at com.facebook.android.Util.openUrl(Util.java:215)
06-19 09:19:33.122: E/AndroidRuntime(595): at com.facebook.android.Facebook.request(Facebook.java:751)
06-19 09:19:33.122: E/AndroidRuntime(595): at com.facebook.android.Facebook.request(Facebook.java:688)
06-19 09:19:33.122: E/AndroidRuntime(595): at tr.edu.ege.yanyanayiz.LoginController.getProfileInformation(LoginController.java:116)
06-19 09:19:33.122: E/AndroidRuntime(595): at tr.edu.ege.yanyanayiz.LoginController.startNewIntent(LoginController.java:50)
06-19 09:19:33.122: E/AndroidRuntime(595): at tr.edu.ege.yanyanayiz.LoginController$2.onComplete(LoginController.java:95)
06-19 09:19:33.122: E/AndroidRuntime(595): at com.facebook.android.Facebook$1.onComplete(Facebook.java:354)
06-19 09:19:33.122: E/AndroidRuntime(595): at com.facebook.android.FbDialog$FbWebViewClient.shouldOverrideUrlLoading(FbDialog.java:144)
06-19 09:19:33.122: E/AndroidRuntime(595): at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:224)
06-19 09:19:33.122: E/AndroidRuntime(595): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:324)
06-19 09:19:33.122: E/AndroidRuntime(595): at android.os.Handler.dispatchMessage(Handler.java:99)
06-19 09:19:33.122: E/AndroidRuntime(595): at android.os.Looper.loop(Looper.java:137)
06-19 09:19:33.122: E/AndroidRuntime(595): at android.app.ActivityThread.main(ActivityThread.java:4424)
06-19 09:19:33.122: E/AndroidRuntime(595): at java.lang.reflect.Method.invokeNative(Native Method)
06-19 09:19:33.122: E/AndroidRuntime(595): at java.lang.reflect.Method.invoke(Method.java:511)
06-19 09:19:33.122: E/AndroidRuntime(595): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
06-19 09:19:33.122: E/AndroidRuntime(595): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
06-19 09:19:33.122: E/AndroidRuntime(595): at dalvik.system.NativeStart.main(Native Method)