Communication between Android Studio and Arduino

Asked

Viewed 540 times

0

Good afternoon!

I’m making an application in Android Studio and trying to communicate with Arduino through the Apache library, such as "org.apache.http.Httpresponse" and I’m not succeeding.

All the time my Android Studio informs that it cannot open the library.

Some of you could help me.

Thanks in advance.

  • Help us by placing code examples and/or error logs.

  • I import in Android Studio the libraries below:

  • import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;

  • however when running the program, it gives me the following errors below at build time: 1) Error:(11, 23) error: package org.apache.http does not exist; 2) Error:(12, 30) error: package org.apache.http.client does not exist; 3) Error:(14, 38) error: package org.apache.http.client.methods does not exist e 4) Error:(15, 35) error: package org.apache.http.impl.client does not exist.

  • Detail: just reinforcing that libraries are in Main Activity and appear to me in red when I’m building, but when I press Alt+Enter, the program prompts the web search, finds, installs, ceases to turn red on the screen, but does not work, presenting the above errors.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.