throwing java.lang.UnsupportedOperationException on some devices

不想你离开。 提交于 2020-01-03 02:23:01

问题


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!!


回答1:


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.



来源:https://stackoverflow.com/questions/17312247/throwing-java-lang-unsupportedoperationexception-on-some-devices

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!