我该如何解决这个java.lang.NoSuchMethodError?

时间:2018-02-23 21:55:20

标签: android rest android-studio android-asynctask google-cloud-endpoints

查看下面的致命异常错误消息:

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)

如何解决此问题?我已经尝试过清理,然后重建我的项目。

0 个答案:

没有答案