Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Ask Question
I'm trying to use the OMDB api to make a search app in Android Studio, i was debuging the code to find another error and i don't know why the logd url stopped giving me the right url and started saying:
Accessing hidden method Ldalvik/system/DexPathList;->findResource(Ljava/lang/String;)Ljava/net/URL; (greylist-max-o, linking, denied)
Accessing hidden method Ldalvik/system/DexPathList$Element;->findResource(Ljava/lang/String;)Ljava/net/URL; (greylist-max-o, linking, denied)
To create this Url i have the global string from the api url format:
private String link = "https://www.omdbapi.com/?apikey=XXXXX=";
A global string that is the text entered into my editText passed from the MainActivity into the fragment via Constructor, by debugging i'm sure that this variable is working:
private String movieToSearch;
public ListFragment(String movie) {
// Required empty public constructor
movieToSearch = movie;
A function that adds the text entered in my EditText into the url:
private String generateUrl(){
String url;
url = link += movieToSearch;
return url;
And then i'm calling that function in my DoInBackgroud in the AsyncTask to generate the url to connect:
URL strApiUrl;
String url = generateUrl();
Log.d("url", url);
And i don't think this affects anything because i want to Log the Url as a string before i pass it as a URL variable but just in case i declare the variable one line up from the String url and then after i declare other variables like a context to make some toasts i open a Try and in there i wrote
strApiUrl = new URL(url);
but i don't think that affects my error message. Thanks for your patience and time if you reached here.
–
–
I solved it, I tried making another AsyncTask
to try to solve my first problem, and in my OnCreateView
instead of making a function like this:
private void Task() {
MyAsyncTask miTask = new MyAsyncTask();
miTask.execute();
And then in my main activity calling the Task function I wrote just MyAsynkTask();
on my onCreateView()
.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.