• Register
search
Log In
0 votes
223 views

Problem :

I am getting bellow in Android Studio

java.lang.runtimeexception: an error occurred while executing doinbackground()

6.9k points

1 Answer

0 votes

Solution:

1.I think you must be running the AsyncTask as bellow which is not correct:

new MyAsyncTask().execute(); 

2.which clearly suggests that you are not passing any argument to it.

3.And in  doInBackground method you must be trying to get a value as bellow

 String newstr=args[0];

but args array has length 0.

So you are facing issue.

4. You need to start the AsycTask as bellow to resolve your issue:

new MyAsyncTask().execute(yqlURL);

Further Readings:

https://github.com/evernote/android-job/issues/255

36.1k points
edited by

Related questions

0 votes
1 answer 485 views
485 views
Problem : I want to print the list of values in ListView from the webpage. I have the following two permission <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> But I am troubled ... : No Network Security Config specified, using platform default I do not know what it means and how can I fix it.
asked Dec 9, 2019 alecxe 7.5k points
0 votes
1 answer 65 views
65 views
Problem : I am getting bellow error while trying to run my android code. java.lang.runtimeexception: unable to start activity componentinfo
asked Nov 2, 2019 peterlaw 6.9k points
0 votes
2 answers 98 views
98 views
Problem : I was trying to run a sample code While launching the application in the android 1.5 emulator , I got bellow errors.... Any one have any hint ? java.lang.runtimeexception: unable to instantiate activity componentinfo
asked Oct 23, 2019 peterlaw 6.9k points
0 votes
2 answers 54 views
54 views
Problem : Currently I am working on my app for Android but I am getting following error while working with the SharedPreferences. I am very new to Android App Programming. I am trying to debug it from past 2 days but unable to find the solution ... " android:inputType="number" android:key="capitalownership" android:title="@string/capitalownership" /> Can somebody help me in resolving this error?
asked Feb 17 mphil 2.3k points
0 votes
1 answer 150 views
150 views
Problem : I am new to laravel. I recently installed laravel homestead and it was running using the powershell. But now it has stopped working completely. I had suspended the vagrant and turned off my box. Now it is only showing me below error: ... (extended info not available) VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp
asked Feb 24 mphil 2.3k points