Java.net. socketexception: Permission denied

Source: Internet
Author: User
Java.net. socketexception: Permission denied

05-18 01:34:48. 549: Warn/system. Err (406 ):Java.net. socketexception: Permission denied
05-18 01:34:48. 558: Warn/system. Err (406): At org. Apache. Harmony. luni. Platform. osnetworksystem. socket (native method)
05-18 01:34:48. 558: Warn/system. Err (406): At Dalvik. system. blockguard $ wrappednetworksystem. socket (blockguard. Java: 335)
05-18 01:34:48. 568: Warn/system. Err (406): At org.apache.harmony.luni.net. plainsocketimpl. Create (plainsocketimpl. Java: 216)
05-18 01:34:48. 568: Warn/system. Err (406): At java.net. Socket. checkopenandcreate (socket. Java: 802)
05-18 01:34:48. 568: Warn/system. Err (406): At java.net. Socket. Connect (socket. Java: 948)
05-18 01:34:48. 578: Warn/system. Err (406): At org. Apache. http. Conn. scheme. plainsocketfactory. connectsocket (plainsocketfactory. Java: 119)
05-18 01:34:48. 578: Warn/system. Err (406): At org. Apache. http. impl. Conn. defaultclientconnectionoperator. openconnection (defaultclientconnectionoperator. Java: 143)
05-18 01:34:48. 578: Warn/system. Err (406): At org. Apache. http. impl. Conn. abstractpoolentry. Open (abstractpoolentry. Java: 164)
05-18 01:34:48. 588: Warn/system. Err (406): At org. Apache. http. impl. Conn. abstractpooledconnadapter. Open (abstractpooledconnadapter. Java: 119)
05-18 01:34:48. 588: Warn/system. Err (406): At org.apache.http.impl.client.defaultrequestdirector.exe cute (defaultrequestdire. Java: 348)
05-18 01:34:48. 588: Warn/system. Err (406): At org.apache.http.impl.client.?acthttpclient.exe cute (abstracthttpclient. Java: 555)
05-18 01:34:48. 588: Warn/system. Err (406): At org.apache.http.impl.client.?acthttpclient.exe cute (abstracthttpclient. Java: 487)
05-18 01:34:48. 588: Warn/system. Err (406): At org.apache.http.impl.client.?acthttpclient.exe cute (abstracthttpclient. Java: 465)
05-18 01:34:48. 599: Warn/system. Err (406): At com. yjc. downloadplatform. Client. mainactivity. getpdaserverdata (mainactivity. Java: 36)
05-18 01:34:48. 599: Warn/system. Err (406): At com. yjc. downloadplatform. Client. mainactivity. oncreate (mainactivity. Java: 28)
05-18 01:34:48. 609: Warn/system. Err (406): at Android. App. instrumentation. callactivityoncreate (instrumentation. Java: 1047)
05-18 01:34:48. 609: Warn/system. Err (406): at Android. App. activitythread. initialize mlaunchactivity (activitythread. Java: 1586)
05-18 01:34:48. 609: Warn/system. Err (406): at Android. App. activitythread. handlelaunchactivity (activitythread. Java: 1638)
05-18 01:34:48. 609: Warn/system. Err (406): at Android. App. activitythread. Access $1500 (activitythread. Java: 117)
05-18 01:34:48. 619: Warn/system. Err (406): at Android. App. activitythread $ H. handlemessage (activitythread. Java: 928)
05-18 01:34:48. 630: Warn/system. Err (406): at Android. OS. handler. dispatchmessage (handler. Java: 99)
05-18 01:34:48. 630: Warn/system. Err (406): at Android. OS. low.loop (low.java: 123)
05-18 01:34:48. 630: Warn/system. Err (406): at Android. App. activitythread. Main (activitythread. Java: 3647)
05-18 01:34:48. 638: Warn/system. Err (406): At java. Lang. Reflect. method. invokenative (native method)
05-18 01:34:48. 638: Warn/system. Err (406): At java. Lang. Reflect. method. Invoke (method. Java: 507)
05-18 01:34:48. 638: Warn/system. Err (406): At com. Android. Internal. OS. zygoteinit $ methodandargscaller. Run (zygoteinit. Java: 839)
05-18 01:34:48. 649: Warn/system. Err (406): At com. Android. Internal. OS. zygoteinit. Main (zygoteinit. Java: 597)
05-18 01:34:48. 660: Warn/system. Err (406): At Dalvik. system. nativestart. Main (native method)

Error message: the socket with no operation permission cannot be connected to the outside world, and the error is not reported. The exception can be seen in logcat and the above exception is thrown. If your program wants to connect to the Internet, it will throw this exception and eventually fail to connect to the Internet. The reason is: You must have the permission to access the network. Solution: In androidmanifest. <uses-Permission Android: Name = "android. permission. internet "/> (note that the location is the next level of the <manifest> node). Therefore, permission verification is strict for Android, and permission configuration is required for many operations ..

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.