Closed gitdaemon closed 8 years ago
I see the error: Caused by: java.lang.SecurityException: ConnectivityService: Neither user 10091 nor current process has android.permission.ACCESS_NETWORK_STATE.
Make sure your manifest has the following:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
Hi
Thanks for the demo project, however i am getting following error at runtime. Any idea?
02-02 10:52:37.938: E/AndroidRuntime(6861): FATAL EXCEPTION: main 02-02 10:52:37.938: E/AndroidRuntime(6861): Process: com.example, PID: 6861 02-02 10:52:37.938: E/AndroidRuntime(6861): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example/com.example.CrosswalkActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class org.xwalk.core.XWalkView 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2215) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2265) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.app.ActivityThread.access$800(ActivityThread.java:145) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.os.Handler.dispatchMessage(Handler.java:102) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.os.Looper.loop(Looper.java:136) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.app.ActivityThread.main(ActivityThread.java:5081) 02-02 10:52:37.938: E/AndroidRuntime(6861): at java.lang.reflect.Method.invokeNative(Native Method) 02-02 10:52:37.938: E/AndroidRuntime(6861): at java.lang.reflect.Method.invoke(Method.java:515) 02-02 10:52:37.938: E/AndroidRuntime(6861): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:781) 02-02 10:52:37.938: E/AndroidRuntime(6861): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 02-02 10:52:37.938: E/AndroidRuntime(6861): at dalvik.system.NativeStart.main(Native Method) 02-02 10:52:37.938: E/AndroidRuntime(6861): Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class org.xwalk.core.XWalkView 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.view.LayoutInflater.createView(LayoutInflater.java:620) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 02-02 10:52:37.938: E/AndroidRuntime(6861): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:343) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.app.Activity.setContentView(Activity.java:1929) 02-02 10:52:37.938: E/AndroidRuntime(6861): at com.example.CrosswalkActivity.onCreate(CrosswalkActivity.java:22) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.app.Activity.performCreate(Activity.java:5231) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169) 02-02 10:52:37.938: E/AndroidRuntime(6861): ... 11 more 02-02 10:52:37.938: E/AndroidRuntime(6861): Caused by: java.lang.reflect.InvocationTargetException 02-02 10:52:37.938: E/AndroidRuntime(6861): at java.lang.reflect.Constructor.constructNative(Native Method) 02-02 10:52:37.938: E/AndroidRuntime(6861): at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 02-02 10:52:37.938: E/AndroidRuntime(6861): at android.view.LayoutInflater.createView(LayoutInflater.java:594) 02-02 10:52:37.938: E/AndroidRuntime(6861): ... 23 more 02-02 10:52:37.938: E/AndroidRuntime(6861): Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException 02-02 10:52:37.938: E/AndroidRuntime(6861): at org.xwalk.core.ReflectionHelper.handleException(ReflectionHelper.java:233) 02-02 10:52:37.938: E/AndroidRuntime(6861): at org.xwalk.core.ReflectionHelper.createInstance(ReflectionHelper.java:260) 02-02 10:52:37.938: E/AndroidRuntime(6861): at org.xwalk.core.XWalkView.(XWalkView.java:168)
02-02 10:52:37.938: E/AndroidRuntime(6861): ... 26 more
02-02 10:52:37.938: E/AndroidRuntime(6861): Caused by: java.lang.reflect.InvocationTargetException
02-02 10:52:37.938: E/AndroidRuntime(6861): at java.lang.reflect.Constructor.constructNative(Native Method)
02-02 10:52:37.938: E/AndroidRuntime(6861): at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
02-02 10:52:37.938: E/AndroidRuntime(6861): at org.xwalk.core.ReflectionHelper.createInstance(ReflectionHelper.java:252)
02-02 10:52:37.938: E/AndroidRuntime(6861): ... 27 more
02-02 10:52:37.938: E/AndroidRuntime(6861): Caused by: java.lang.RuntimeException: java.lang.SecurityException: ConnectivityService: Neither user 10091 nor current process has android.permission.ACCESS_NETWORK_STATE.
02-02 10:52:37.938: E/AndroidRuntime(6861): at org.xwalk.core.internal.XWalkViewInternal.init(XWalkViewInternal.java:286)
02-02 10:52:37.938: E/AndroidRuntime(6861): at org.xwalk.core.internal.XWalkViewInternal.(XWalkViewInternal.java:197)
02-02 10:52:37.938: E/AndroidRuntime(6861): at org.xwalk.core.internal.XWalkViewBridge.(XWalkViewBridge.java:45)
02-02 10:52:37.938: E/AndroidRuntime(6861): ... 30 more
02-02 10:52:37.938: E/AndroidRuntime(6861): Caused by: java.lang.SecurityException: ConnectivityService: Neither user 10091 nor current process has android.permission.ACCESS_NETWORK_STATE.
02-02 10:52:37.938: E/AndroidRuntime(6861): at android.os.Parcel.readException(Parcel.java:1465)
02-02 10:52:37.938: E/AndroidRuntime(6861): at android.os.Parcel.readException(Parcel.java:1419)
02-02 10:52:37.938: E/AndroidRuntime(6861): at android.net.IConnectivityManager$Stub$Proxy.getActiveNetworkInfo(IConnectivityManager.java:813)
02-02 10:52:37.938: E/AndroidRuntime(6861): at android.net.ConnectivityManager.getActiveNetworkInfo(ConnectivityManager.java:560)
02-02 10:52:37.938: E/AndroidRuntime(6861): at org.chromium.net.NetworkChangeNotifierAutoDetect$ConnectivityManagerDelegate.activeNetworkExists(NetworkChangeNotifierAutoDetect.java:44)
02-02 10:52:37.938: E/AndroidRuntime(6861): at org.chromium.net.NetworkChangeNotifierAutoDetect.getCurrentConnectionType(NetworkChangeNotifierAutoDetect.java:154)