How do I fix this java.lang.NoSuchMethodError? - android

View the FATAL EXCEPTION error message below:
02-23 23:42:41.596 9581-9705/com.example.restapi_user E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.example.restapi_user, PID: 9581
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.NoSuchMethodError: com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient$Builder.setBatchPath
at com.example.echo.dbquery.Dbquery$Builder.setBatchPath(Dbquery.java:586)
at com.example.echo.dbquery.Dbquery$Builder.<init>(Dbquery.java:565)
at com.example.restapi_user.MainActivity$ExecuteApiCall.doInBackground(MainActivity.java:127)
at com.example.restapi_user.MainActivity$ExecuteApiCall.doInBackground(MainActivity.java:116)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
at java.lang.Thread.run(Thread.java:841)
How do I fix this problem? I already tried cleaning and then rebuilding my project.

Related

java.lang.RuntimeException: An error occured while executing doInBackground() Kotlin

I was trying to access my MS Database Locally so i have this DatabaseHelper.kt file which i included the Doinbackground Function, which in turn brings out this error.
CodeSnippet
06-19 15:28:45.082 18819-18819/? E/Zygote: MountEmulatedStorage() 06-19 15:28:45.082 18819-18819/? E/Zygote: v2 06-19 15:28:45.092 18819-18819/? E/SELinux: [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL 06-19 15:28:45.092 18819-18819/? E/art: setrlimit(RLIMIT_CORE) failed for pid 18819: Operation not permitted 06-19 15:28:47.814 18819-18819/com.example.mysqlcon E/RecyclerView: No adapter attached; skipping layout 06-19 15:28:47.924 18819-18819/com.example.mysqlcon E/RecyclerView: No adapter attached; skipping layout 06-19 15:28:47.984 18819-18862/com.example.mysqlcon E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.example.mysqlcon, PID: 18819 java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:304) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) at java.util.concurrent.FutureTask.setException(FutureTask.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/ietf/jgss/GSSManager; at net.sourceforge.jtds.jdbc.TdsCore.createGssToken(TdsCore.java:4400) at net.sourceforge.jtds.jdbc.TdsCore.sendMSLoginPkt(TdsCore.java:1971) at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:617) at net.sourceforge.jtds.jdbc.JtdsConnection.(JtdsConnection.java:371) at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184) at java.sql.DriverManager.getConnection(DriverManager.java:179) at java.sql.DriverManager.getConnection(DriverManager.java:144) at com.example.mysqlcon.ConnectionClass.dbConn(ConnectionClass.kt:26) at com.example.mysqlcon.DatabaseHelper$SyncData.doInBackground(DatabaseHelper.kt:36) at com.example.mysqlcon.DatabaseHelper$SyncData.doInBackground(DatabaseHelper.kt:23) at android.os.AsyncTask$2.call(AsyncTask.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.ietf.jgss.GSSManager" on path: DexPathList[[zip file "/data/app/com.example.mysqlcon-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at net.sourceforge.jtds.jdbc.TdsCore.createGssToken(TdsCore.java:4400) at net.sourceforge.jtds.jdbc.TdsCore.sendMSLoginPkt(TdsCore.java:1971) at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:617) at net.sourceforge.jtds.jdbc.JtdsConnection.(JtdsConnection.java:371) at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184) at java.sql.DriverManager.getConnection(DriverManager.java:179) at java.sql.DriverManager.getConnection(DriverManager.java:144) at com.example.mysqlcon.ConnectionClass.dbConn(ConnectionClass.kt:26) at com.example.mysqlcon.DatabaseHelper$SyncData.doInBackground(DatabaseHelper.kt:36) at com.example.mysqlcon.DatabaseHelper$SyncData.doInBackground(DatabaseHelper.kt:23) at android.os.AsyncTask$2.call(AsyncTask.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Suppressed: java.lang.ClassNotFoundException: org.ietf.jgss.GSSManager at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 17 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available 06-19 15:28:48.064 18819-18819/com.example.mysqlcon E/WindowManager: android.view.WindowLeaked: Activity com.example.mysqlcon.InvoiceActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{11c938 V.E..... R......D 0,0-681,215} that was originally added here at android.view.ViewRootImpl.(ViewRootImpl.java:530) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:287) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91) at android.app.Dialog.show(Dialog.java:325) at android.app.ProgressDialog.show(ProgressDialog.java:151) at android.app.ProgressDialog.show(ProgressDialog.java:134) at com.example.mysqlcon.DatabaseHelper$SyncData.onPreExecute(DatabaseHelper.kt:31) at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:591) at android.os.AsyncTask.execute(AsyncTask.java:539) at com.example.mysqlcon.DatabaseHelper.getinvoices(DatabaseHelper.kt:92) at com.example.mysqlcon.InvoiceActivity.onCreate(InvoiceActivity.kt:21) at android.app.Activity.performCreate(Activity.java:6609) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1134) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3104) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3261) at android.app.ActivityThread.access$1000(ActivityThread.java:219) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1735) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6939) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
You have this:
java.lang.Thread.run(Thread.java:818) Caused by:
java.lang.NoClassDefFoundError: Failed resolution of:
Lorg/ietf/jgss/GSSManager; at
Either you are using an incorrect proguard specification or this class is not available because a dependency is missing.

android chromium resourceExtractor error

Suddenly my app in production phase started to get Chromium ResourceExtractor errors in api 7 even though I had not changed anything in the app.
Is there any solution or update for this error?
Fatal Exception: java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:318)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:762)
Caused by java.lang.RuntimeException
at org.chromium.base.ResourceExtractor$ExtractTask.doInBackground$51DKOQJ1EPGIUR31DPJIULJFD5I3MAACD9GNCO9FDHGMSPPFAPNMIP1R0(ResourceExtractor.java:24)
at org.chromium.base.ResourceExtractor$ExtractTask.doInBackground(ResourceExtractor.java:78)
at android.os.AsyncTask$2.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:762)
Fatal Exception: java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:318)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:762)
Caused by java.lang.RuntimeException: java.io.IOException
at org.chromium.base.ResourceExtractor$ExtractTask.doInBackground$51DKOQJ1EPGIUR31DPJIULJFD5I3MAACD9GNCO9FDHGMSPPFAPNMIP1R0(ResourceExtractor.java:52)
at org.chromium.base.ResourceExtractor$ExtractTask.doInBackground(ResourceExtractor.java:78)
at android.os.AsyncTask$2.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:762)
Caused by java.io.IOException
at org.chromium.base.ResourceExtractor$ExtractTask.extractResourceHelper(ResourceExtractor.java:15)
at org.chromium.base.ResourceExtractor$ExtractTask.doInBackground$51DKOQJ1EPGIUR31DPJIULJFD5I3MAACD9GNCO9FDHGMSPPFAPNMIP1R0(ResourceExtractor.java:47)
at org.chromium.base.ResourceExtractor$ExtractTask.doInBackground(ResourceExtractor.java:78)
at android.os.AsyncTask$2.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:762)

How to understand this type of SQLException

My app crashes with next exception without any explanation:
java.lang.RuntimeException:
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.database.sqlite.SQLiteException:
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method:0)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1093)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:670)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:59)
at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1607)
at android.database.sqlite.SQLiteDatabase.insertOrThrow(SQLiteDatabase.java:1505)
How to fix it?
I found reason, that's because onUpgrade not called from SQLiteOpenHelper, I'm forget to change DATABASE_VERSION in new release

java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapSerializationEnvelope with SDK 19 in android studio

hello i m using android studio this error generate and crash application in only sdk version 19. i did not found the reason .i search so many things but not found proper way to resolve this.
Log Show as below
FATAL EXCEPTION: AsyncTask #2
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapSerializationEnvelope
at com.Wsdl2Code.WebServices.User_Setup_Service.User_Setup_Service.ReadMultiple(User_Setup_Service.java:241)
at com.Wsdl2Code.WebServices.User_Setup_Service.User_Setup_Service$3.doInBackground(User_Setup_Service.java:223)
at com.Wsdl2Code.WebServices.User_Setup_Service.User_Setup_Service$3.doInBackground(User_Setup_Service.java:216)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
and org.ksoap2.serialization.SoapSerializationEnvelope belong from external library folder

Exception while integration OKHTTP2.5

I Just integrate OKHTTP2.5 in my Android application but after integration i am getting following exception in the application.
FATAL EXCEPTION: AsyncTask #3
Process: com.testpoint, PID: 16397
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:304)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NoSuchMethodError: No virtual method setTransports(Ljava/util/List;)Lcom/squareup/okhttp/OkHttpClient; in class Lcom/squareup/okhttp/OkHttpClient; or its super classes (declaration of 'com.squareup.okhttp.OkHttpClient' appears in /data/data/com.testpoint/files/instant-run/dex/slice-okhttp-2.5.0_f7c3855e345b00f0c70af04a10c2a1ce2468221a-classes.dex)
at com.squareup.okhttp.internal.HttpsHandler.newOkHttpClient(HttpsHandler.java:39)
at com.squareup.okhttp.internal.HttpHandler.openConnection(HttpHandler.java:30)
at java.net.URL.openConnection(URL.java:479)
at com.testpoint.client.AsyncHttpRequest.doInBackground(AsyncHttpRequest.java:190)
at com.testpoint.client.AsyncHttpRequest.doInBackground(AsyncHttpRequest.java:1)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

Categories

Resources