• Register
0 votes
479 views

Problem :

I am getting bellow in Android Studio

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

6 5 3
6,930 points

Please log in or register to answer this question.

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

9 7 4
38,600 points

Related questions

0 votes
1 answer 282 views
282 views
Problem: I was trying to start the ionic 3 but if I try to run the command 'ionic cordova run android' then I was facing below error. I tried many ways to fix this problem but I was unable to fix it: > cordova run android [13:30:46]  lint finished ... are my System details: Node       : v6.11.0 OS         : Windows 7 Xcode      : not installed ios-deploy : not installed ios-sim    : not installed
asked Aug 15, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 947 views
947 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 145 views
145 views
Cannot create controller in thread that did not call Looper.prepare () What does the following exception mean? How can I fix it? Here is the code: Toast toast = Toast.makeText (mContext, "Something", Toast.LENGTH_SHORT); This is the exception: Java.lang.RuntimeException: Cannot ... :121)      on Android.widget.Toast. <init> (Toast.Java:68)      on Android.widget.Toast.makeText (Toast.Java:231)
asked Aug 17, 2020 game 4.6k points
0 votes
1 answer 70 views
70 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 200 views
200 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
1 answer 683 views
683 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, 2020 mphil 2.3k points
0 votes
2 answers 247 views
247 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, 2020 mphil 2.3k points