简体   繁体   中英

throwing java.lang.UnsupportedOperationException on some devices

I've found out, that my app, that uses the yandex map kit, on some devices crashes with such an exception. What does this "java.lang.UnsupportedOperationException" exception means???

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

Here is the doInBackground method:

  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;
        }

Thanks in advance for your answers!!

java.lang.UnsupportedOperationException: query: Not supported yet - content://ru.yandex.device.id.maps/device_id

Based on the exception description, I can suggest that the method isn't implemented yet by the framework authors, so you might contact the support team for clarifications.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM