一部のデバイスでは、yandex マップ キットを使用するアプリがこのような例外でクラッシュすることがわかりました。この「java.lang.UnsupportedOperationException」例外はどういう意味ですか???
06-26 16:25:06.301: ERROR DeviceIdProvider(3174): UNKNOWN ID QUERY content://ru.yandex.device.id.maps/device_id id -1
06-26 16:25:06.301: ERROR/DatabaseUtils(3174): Writing exception to parcel
java.lang.UnsupportedOperationException: query: Not supported yet - content://ru.yandex.device.id.maps/device_id
at ru.yandex.core.device.id.DeviceIdProvider.query(SourceFile:80)
at android.content.ContentProvider$Transport.query(ContentProvider.java:178)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)
at android.os.Binder.execTransact(Binder.java:338)
at dalvik.system.NativeStart.run(Native Method)
06-26 16:25:06.511: ERROR/dalvikvm(533): GC_FOR_ALLOC freed 2221K, 41% free 9496K/16035K, paused 7ms+22ms
06-26 16:25:06.781: ERROR/AndroidRuntime(3690): FATAL EXCEPTION: AsyncTask #3
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:278)
at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.NullPointerException
at com.shop.pagerFragments.TorgCentrMapFragment$SetRightMapDisplayAddress.doInBackground(TorgCentrMapFragment.java:419)
at com.shop.pagerFragments.TorgCentrMapFragment$SetRightMapDisplayAddress.doInBackground(TorgCentrMapFragment.java:401)
at android.os.AsyncTask$2.call(AsyncTask.java:264)
at java.util.
concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
... 4 more
doInBackground メソッドは次のとおりです。
private class SetRightMapDisplayAddress extends AsyncTask<String, Void, List<Address>> {
@Override
protected List<Address> doInBackground(String... params) {
Log.d(TAG, "doinbackground SetRightMapDisplayAddress started");
long startTime= System.currentTimeMillis();
long threadId = Thread.currentThread().getId();
Log.d(TAG, String.format("The thread id is: %d", threadId));
context = getActivity();
String placeName = params[0];
Geocoder geocoder = new Geocoder(context);
List<Address> addressList = null;
try {
addressList = geocoder.getFromLocationName(placeName, 3);
} catch (IOException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
int returnedAddresses = addressList.size();
Log.d(TAG, String.valueOf(returnedAddresses));
long endTime = System.currentTimeMillis();
Log.d(TAG, String.valueOf(startTime-endTime));
Log.d(TAG, "doinbackground SetRightMapDisplayAddress ended");
return addressList;
}
ご回答ありがとうございます。