Quantcast
Channel: Android Mode - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 941

I can not connect to the internet

$
0
0

Hi. I'm writing a little app to view the online comics. When you attempt to display an image error takes off:

java.lang.SecurityException: Permission denied (missing INTERNET permission?) at java.net.InetAddress.lookupHostByName(InetAddress.java:430) at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236) at java.net.InetAddress.getAllByName(InetAddress.java:214) at libcore.net.http.HttpConnection.<init>(HttpConnection.java:70) at libcore.net.http.HttpConnection.<init>(HttpConnection.java:50) at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:340) at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:87) at libcore.net.http.HttpConnection.connect(HttpConnection.java:128) at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:316) at libcore.net.http.HttpEngine.connect(HttpEngine.java:311) at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:290) at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:240) at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:81) at processing.core.PApplet.createInputRaw(Unknown Source) at processing.core.PApplet.createInput(Unknown Source) at processing.core.PApplet.loadImage(Unknown Source) at processing.test.otladka1.otladka1.setup(otladka1.java:24) at processing.core.PApplet.handleDraw(Unknown Source) at processing.core.PGraphicsAndroid2D.requestDraw(Unknown Source) at processing.core.PApplet.run(Unknown Source) at java.lang.Thread.run(Thread.java:838) Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname) at libcore.io.Posix.getaddrinfo(Native Method) at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java:59) at java.net.InetAddress.lookupHostByName(InetAddress.java:405) ... 20 more Caused by: libcore.io.ErrnoException: getaddrinfo failed: EACCES (Permission denied) ... 23 more

I use Processing 3.1.2 and AndroidMod 4.0. Test program by connecting the mobile phone. In the JAVA mode, everything works fine. And here is the code:

`PImage webImg;

void setup() { fullScreen(); webImg=loadImage("http://xkcd.ru/i/968_v6.png");
}

void draw() { image(webImg, 0, 0); } `


Viewing all articles
Browse latest Browse all 941

Trending Articles