百度地图IllegalBlockSizeException: error:1e00006a:Cipher functions:OPENSSL_internal:DATA_NOT_MULTIPLE_OF

想用下百度地图的地址和经纬度的转换,代码如下:

 GeoCoder geoCoder = GeoCoder.newInstance();
        geoCoder.setOnGetGeoCodeResultListener(new OnGetGeoCoderResultListener() {
            @Override
            public void onGetGeoCodeResult(GeoCodeResult geoCodeResult) {
                if (geoCodeResult != null && geoCodeResult.getLocation() != null) {
                    Log.e(Constants.DEBUG_TAG, "onGetGeoCodeResult" + geoCodeResult.getLocation().latitude + ", " +
                            geoCodeResult.getLocation().longitude);
                } else {
                    Log.e(Constants.DEBUG_TAG, "onGetGeoCodeResult null");
                }
            }

            @Override
            public void onGetReverseGeoCodeResult(ReverseGeoCodeResult reverseGeoCodeResult) {
                if (reverseGeoCodeResult != null) {
                    Log.e(Constants.DEBUG_TAG, "onGetReverseGeoCodeResult " + reverseGeoCodeResult.getAddress() + "," +
                            reverseGeoCodeResult.getAddressDetail()
                            + ", " + reverseGeoCodeResult.getBusinessCircle() + "," + reverseGeoCodeResult.getAdcode() + ", ");
                } else {
                    Log.e(Constants.DEBUG_TAG, "onGetReverseGeoCodeResult null");
                }
            }
        });
        geoCoder.reverseGeoCode(new ReverseGeoCodeOption().location(new LatLng(40.056878, 116.308141)).radius(1000));
        geoCoder.geocode(new GeoCodeOption().city("北京").address("北京上地十街10号"));
        geoCoder.destroy();

然后bug 如下:

2019-08-22 17:02:07.932 18273-18651/xxxxxxxxxxx E/BaseSearch: transform result failed
    javax.crypto.IllegalBlockSizeException: error:1e00006a:Cipher functions:OPENSSL_internal:DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH
        at com.android.org.conscrypt.NativeCrypto.EVP_CipherFinal_ex(Native Method)
        at com.android.org.conscrypt.OpenSSLCipher$EVP_CIPHER.doFinalInternal(OpenSSLCipher.java:596)
        at com.android.org.conscrypt.OpenSSLCipher.engineDoFinal(OpenSSLCipher.java:363)
        at javax.crypto.Cipher.doFinal(Cipher.java:2055)
        at com.baidu.mapsdkplatform.comapi.util.AlgorithmUtil.b(Unknown Source:45)
        at com.baidu.mapsdkplatform.comapi.util.AlgorithmUtil.getUrlNeedInfo(Unknown Source:0)
        at com.baidu.platform.base.a.a(Unknown Source:23)
        at com.baidu.platform.base.a.a(Unknown Source:0)
        at com.baidu.platform.base.b.onSuccess(Unknown Source:8)
        at com.baidu.mapapi.http.HttpClient.request(Unknown Source:141)
        at com.baidu.mapapi.http.a.a(Unknown Source:29)
        at com.baidu.mapapi.http.AsyncHttpClient$a.run(Unknown Source:0)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)
2019-08-22 17:02:07.933 18273-18651/xxxxxxxxxxx E/BaseSearch: Parse json happened exception
    org.json.JSONException: Value faild of type java.lang.String cannot be converted to JSONObject
        at org.json.JSON.typeMismatch(JSON.java:112)
        at org.json.JSONObject.(JSONObject.java:163)
        at org.json.JSONObject.(JSONObject.java:176)
        at com.baidu.platform.base.a.c(Unknown Source:7)
        at com.baidu.platform.base.a.b(Unknown Source:0)
        at com.baidu.platform.base.b.onSuccess(Unknown Source:26)
        at com.baidu.mapapi.http.HttpClient.request(Unknown Source:141)
        at com.baidu.mapapi.http.a.a(Unknown Source:29)
        at com.baidu.mapapi.http.AsyncHttpClient$a.run(Unknown Source:0)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)
2019-08-22 17:02:07.933 18273-18651/xxxxxxxxxx E/BaseSearch: Create JSONObject failed when get response result status

不说废话了,原因就是appliction没有勾上 “Android地图SDK”,现在给我的感觉就是只要用百度,不管什么功能,一定要勾上它。

百度地图IllegalBlockSizeException: error:1e00006a:Cipher functions:OPENSSL_internal:DATA_NOT_MULTIPLE_OF_第1张图片

 

你可能感兴趣的:(android应用,android,bug)