React-native示例应用程序已关闭(Android)

时间:2016-09-16 12:42:05

标签: android react-native-android

我试图从react-native运行android应用程序。我已经尝试过使用" react-native init"带来的标准应用程序。和#34; Hello world"来自react-native github的应用程序,但我在模拟器和设备上都得到了这个错误堆栈:

09-16 14:21:23.334  3441  3486 E AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
09-16 14:21:23.334  3441  3486 E AndroidRuntime: Process: com.deleteme, PID: 3441
09-16 14:21:23.334  3441  3486 E AndroidRuntime: java.lang.IllegalStateException: closed
09-16 14:21:23.334  3441  3486 E AndroidRuntime:    at okhttp3.internal.http.Http1xStream$FixedLengthSource.read(Http1xStream.java:374)
09-16 14:21:23.334  3441  3486 E AndroidRuntime:    at okio.Buffer.writeAll(Buffer.java:993)
09-16 14:21:23.334  3441  3486 E AndroidRuntime:    at okio.RealBufferedSource.readByteArray(RealBufferedSource.java:106)
09-16 14:21:23.334  3441  3486 E AndroidRuntime:    at okhttp3.ResponseBody.bytes(ResponseBody.java:128)
09-16 14:21:23.334  3441  3486 E AndroidRuntime:    at okhttp3.ResponseBody.string(ResponseBody.java:154)
09-16 14:21:23.334  3441  3486 E AndroidRuntime:    at com.facebook.react.devsupport.DevServerHelper$3.onResponse(DevServerHelper.java:301)
09-16 14:21:23.334  3441  3486 E AndroidRuntime:    at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126)
09-16 14:21:23.334  3441  3486 E AndroidRuntime:    at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
09-16 14:21:23.334  3441  3486 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
09-16 14:21:23.334  3441  3486 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
09-16 14:21:23.334  3441  3486 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:818)

在设备本身的应用程序试图启动,但崩溃的消息"不幸的是,deleteme已停止"。根据{{​​3}}帖子,我检查了android / app / build.gradle中的enableProguardInReleaseBuilds,它是" false"默认情况下。我怎样才能使它发挥作用?

0 个答案:

没有答案