我一直在尝试在我的 Android 应用程序中更新 7digital SDK,但遇到了困难。我的电话search
给了我以下崩溃:
04-09 16:03:42.238 8533-9744/com.myapp.debug E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #2
Process: com.myapp.debug, PID: 8533
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.NoSuchMethodError: No virtual method setShouldCache(Z)Lcom/android/volley/Request; in class Luk/co/sevendigital/android/sdk/util/VolleyUtil$CacheEntryRequest; or its super classes (declaration of 'uk.co.sevendigital.android.sdk.util.VolleyUtil$CacheEntryRequest' appears in /data/app/com.myapp.debug-1/base.apk)
at uk.co.sevendigital.android.sdk.util.VolleyUtil$CacheEntryRequest.<init>(VolleyUtil.java:159)
at uk.co.sevendigital.android.sdk.util.VolleyUtil$StringRequest.<init>(VolleyUtil.java:89)
at uk.co.sevendigital.android.sdk.util.VolleyUtil.executeStringRequest(VolleyUtil.java:49)
at uk.co.sevendigital.android.sdk.api.request.track.SDITrackSearchRequest.execute(SDITrackSearchRequest.java:177)
at uk.co.sevendigital.android.sdk.api.request.track.SDITrackSearchRequest.execute(SDITrackSearchRequest.java:60)
at uk.co.sevendigital.android.sdk.api.SDIApi$Track.search(SDIApi.java:454)
at com.myapp.utils.SDSearchTask.doInBackground(SDSearchTask.java:36)
at com.myapp.utils.SDSearchTask.doInBackground(SDSearchTask.java:20)
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)
我用来调用的代码search
是:
SDIApi myApi = MyApplication.getSDIApi();
SDIApi.Track myTrack = myApi.track();
final SDITrackSearchRequest.Result searchResults = myTrack.search(artist.mName + " " + track.mTrackName);
...当我尝试越过这search
条线时,会出现崩溃和堆栈跟踪。有谁知道这里可能会发生什么?自从使用旧版本的库以来,我没有更改我的非库代码(并且没有错误)。