imobile-maio / maio-Android-SDK

5 stars 3 forks source link

v1.1.5でもApache HttpClientが使われており、Android 9で利用できない #18

Closed S64 closed 6 years ago

S64 commented 6 years ago

どういう問題が発生するか

v1.1.5のchangelogに HttpClientを使わないように変更 と記載されているが、未だ内部で利用されている箇所が存在しており、Android 9+ かつ targetSdkVersion 28+ の環境で利用することができない。 依然として org.apache.http.legacy に関する記述が必要。

以下はLogcatに表示された内容です:

2018-10-15 14:00:54.053 12743-12765/jp.maio.sdk.android.sample I/.android.sampl: Rejecting re-init on previously-failed class java.lang.Class<jp.maio.sdk.android.bj$1>: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/client/ResponseHandler;
2018-10-15 14:00:54.053 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.bj.a(android.content.Context) ((null):-1)
2018-10-15 14:00:54.053 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.a(android.app.Activity, jp.maio.sdk.android.MaioAdsListenerInterface, java.lang.String) ((null):-1)
2018-10-15 14:00:54.053 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.b(android.app.Activity, java.lang.String, jp.maio.sdk.android.MaioAdsListenerInterface) ((null):-1)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.a(jp.maio.sdk.android.MaioAds, android.app.Activity, java.lang.String, jp.maio.sdk.android.MaioAdsListenerInterface) ((null):-1)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds$1.run() ((null):-1)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1167)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:641)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void java.lang.Thread.run() (Thread.java:764)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl: Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.client.ResponseHandler" on path: DexPathList[[zip file "/data/app/jp.maio.sdk.android.sample-g2uk9_ptG4RAW-nnT0oj_w==/base.apk"],nativeLibraryDirectories=[/data/app/jp.maio.sdk.android.sample-g2uk9_ptG4RAW-nnT0oj_w==/lib/x86_64, /system/lib64]]
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:134)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.bj.a(android.content.Context) ((null):-1)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.a(android.app.Activity, jp.maio.sdk.android.MaioAdsListenerInterface, java.lang.String) ((null):-1)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.b(android.app.Activity, java.lang.String, jp.maio.sdk.android.MaioAdsListenerInterface) ((null):-1)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.a(jp.maio.sdk.android.MaioAds, android.app.Activity, java.lang.String, jp.maio.sdk.android.MaioAdsListenerInterface) ((null):-1)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds$1.run() ((null):-1)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1167)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:641)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void java.lang.Thread.run() (Thread.java:764)
2018-10-15 14:00:54.054 12743-12765/jp.maio.sdk.android.sample I/.android.sampl: Rejecting re-init on previously-failed class java.lang.Class<jp.maio.sdk.android.bj$1>: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/client/ResponseHandler;
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.bj.a(android.content.Context) ((null):-1)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.a(android.app.Activity, jp.maio.sdk.android.MaioAdsListenerInterface, java.lang.String) ((null):-1)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.b(android.app.Activity, java.lang.String, jp.maio.sdk.android.MaioAdsListenerInterface) ((null):-1)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.a(jp.maio.sdk.android.MaioAds, android.app.Activity, java.lang.String, jp.maio.sdk.android.MaioAdsListenerInterface) ((null):-1)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds$1.run() ((null):-1)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1167)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:641)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void java.lang.Thread.run() (Thread.java:764)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl: Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.client.ResponseHandler" on path: DexPathList[[zip file "/data/app/jp.maio.sdk.android.sample-g2uk9_ptG4RAW-nnT0oj_w==/base.apk"],nativeLibraryDirectories=[/data/app/jp.maio.sdk.android.sample-g2uk9_ptG4RAW-nnT0oj_w==/lib/x86_64, /system/lib64]]
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:134)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.bj.a(android.content.Context) ((null):-1)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.a(android.app.Activity, jp.maio.sdk.android.MaioAdsListenerInterface, java.lang.String) ((null):-1)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.b(android.app.Activity, java.lang.String, jp.maio.sdk.android.MaioAdsListenerInterface) ((null):-1)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.a(jp.maio.sdk.android.MaioAds, android.app.Activity, java.lang.String, jp.maio.sdk.android.MaioAdsListenerInterface) ((null):-1)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds$1.run() ((null):-1)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1167)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:641)
2018-10-15 14:00:54.055 12743-12765/jp.maio.sdk.android.sample I/.android.sampl:     at void java.lang.Thread.run() (Thread.java:764)
2018-10-15 14:00:54.061 1705-1731/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
2018-10-15 14:00:54.076 12743-12768/jp.maio.sdk.android.sample I/.android.sampl: Rejecting re-init on previously-failed class java.lang.Class<jp.maio.sdk.android.bj$1>: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/client/ResponseHandler;
2018-10-15 14:00:54.076 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.bj.a(android.content.Context) ((null):-1)
2018-10-15 14:00:54.076 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.a(android.app.Activity, jp.maio.sdk.android.MaioAdsListenerInterface, java.lang.String) ((null):-1)
2018-10-15 14:00:54.076 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.b(android.app.Activity, java.lang.String, jp.maio.sdk.android.MaioAdsListenerInterface) ((null):-1)
2018-10-15 14:00:54.076 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.a(jp.maio.sdk.android.MaioAds, android.app.Activity, java.lang.String, jp.maio.sdk.android.MaioAdsListenerInterface) ((null):-1)
2018-10-15 14:00:54.076 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds$1.run() ((null):-1)
2018-10-15 14:00:54.076 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1167)
2018-10-15 14:00:54.077 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:641)
2018-10-15 14:00:54.077 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void java.lang.Thread.run() (Thread.java:764)
2018-10-15 14:00:54.077 12743-12768/jp.maio.sdk.android.sample I/.android.sampl: Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.client.ResponseHandler" on path: DexPathList[[zip file "/data/app/jp.maio.sdk.android.sample-g2uk9_ptG4RAW-nnT0oj_w==/base.apk"],nativeLibraryDirectories=[/data/app/jp.maio.sdk.android.sample-g2uk9_ptG4RAW-nnT0oj_w==/lib/x86_64, /system/lib64]]
2018-10-15 14:00:54.077 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:134)
2018-10-15 14:00:54.078 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
2018-10-15 14:00:54.078 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
2018-10-15 14:00:54.078 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.bj.a(android.content.Context) ((null):-1)
2018-10-15 14:00:54.078 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.a(android.app.Activity, jp.maio.sdk.android.MaioAdsListenerInterface, java.lang.String) ((null):-1)
2018-10-15 14:00:54.078 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.b(android.app.Activity, java.lang.String, jp.maio.sdk.android.MaioAdsListenerInterface) ((null):-1)
2018-10-15 14:00:54.078 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds.a(jp.maio.sdk.android.MaioAds, android.app.Activity, java.lang.String, jp.maio.sdk.android.MaioAdsListenerInterface) ((null):-1)
2018-10-15 14:00:54.078 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void jp.maio.sdk.android.MaioAds$1.run() ((null):-1)
2018-10-15 14:00:54.078 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1167)
2018-10-15 14:00:54.078 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:641)
2018-10-15 14:00:54.078 12743-12768/jp.maio.sdk.android.sample I/.android.sampl:     at void java.lang.Thread.run() (Thread.java:764)

現象の再現手順

具体的な変更箇所はこちらを御確認ください:

環境情報

maio Android SDK Version

v1.1.5

Android Version

9 Pie

Device

Android Emulator

im-ade commented 6 years ago

@S64 Extremely sorry for the inconvenience. We had a problem with our release flow and the jar didnt update fully. I have re-updated the binaries on github and re-updated our maven to include the httpclient release.

S64 commented 6 years ago

@im-ade I've checked to work successfully. Close this issue (& #19) because resolved. Thanks!