Open halfelf11 opened 5 years ago
ㅎㅎ 아무리 해봐도 저도 안되는군요 에러도 보이질 않으니 이거 참....
@kotran88 @halfelf11
에러 보니 DefaultHttpClient 클래스를 찾지 못해서 나는 에러인데
과거 네이버 로그인 라이브러리에서 안드로이드 6 버전 이상에서는 사용하지 못하는
org/apache/http/impl/client/DefaultHttpClient 해당 apache http client 를 사용해서 나는 문제네요
https://developer.android.com/about/versions/pie/android-9.0-changes-28?hl=ko#apache-p
해당 링크 확인하셔서
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
추가해주시면 될 것 같습니다
@kotran88 @halfelf11
에러 보니 DefaultHttpClient 클래스를 찾지 못해서 나는 에러인데
과거 네이버 로그인 라이브러리에서 안드로이드 6 버전 이상에서는 사용하지 못하는
org/apache/http/impl/client/DefaultHttpClient 해당 apache http client 를 사용해서 나는 문제네요
https://developer.android.com/about/versions/pie/android-9.0-changes-28?hl=ko#apache-p
해당 링크 확인하셔서
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
추가해주시면 될 것 같습니다
잘됩니다 감사합니다
@kotran88 네 감사합니다
네이버 아이디로 로그인시 아이디 비번 입력후 개인정보관련 동의를 클릭하면 앱이 종료됩니다.
개발환경
@ionic/cli-utils : 1.19.2 ionic (Ionic CLI) : 3.20.0
global packages:
local packages:
System:
Environment Variables:
Misc:
사용 플러그인 "cordova-plugin-naver": "^1.0.3" "ionic-plugin-naver": "^1.0.3"
app crash 당시 로그캣 내용
--------- beginning of crash 2019-04-30 17:14:24.719 3721-5487/com.tokmom.testapp E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #5 Process: com.tokmom.testapp, PID: 3721 java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:354) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383) at java.util.concurrent.FutureTask.setException(FutureTask.java:252) at java.util.concurrent.FutureTask.run(FutureTask.java:271) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 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) Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/impl/client/DefaultHttpClient; at com.nhn.android.naverlogin.connection.CommonConnection.getDefaultHttpClient(CommonConnection.java:204) at com.nhn.android.naverlogin.connection.CommonConnection.getDefaultHttpClient(CommonConnection.java:190) at com.nhn.android.naverlogin.connection.CommonConnection.getDefaultHttpClient(CommonConnection.java:186) at com.nhn.android.naverlogin.connection.CommonConnection.request(CommonConnection.java:106) at com.nhn.android.naverlogin.connection.CommonConnection.request(CommonConnection.java:53) at com.nhn.android.naverlogin.connection.CommonConnection.request(CommonConnection.java:44) at com.nhn.android.naverlogin.connection.OAuthLoginConnection.request(OAuthLoginConnection.java:52) at com.nhn.android.naverlogin.connection.OAuthLoginConnection.requestAccessToken(OAuthLoginConnection.java:34) at com.nhn.android.naverlogin.ui.OAuthLoginActivity$GetAccessTokenTask.doInBackground(OAuthLoginActivity.java:310) at com.nhn.android.naverlogin.ui.OAuthLoginActivity$GetAccessTokenTask.doInBackground(OAuthLoginActivity.java:1) at android.os.AsyncTask$2.call(AsyncTask.java:333) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 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) Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.impl.client.DefaultHttpClient" on path: DexPathList[[zip file "/data/app/com.tokmom.testapp-wNijitTxo3aADtpWBnHHew==/base.apk"],nativeLibraryDirectories=[/data/app/com.tokmom.testapp-wNijitTxo3aADtpWBnHHew==/lib/arm64, /system/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at com.nhn.android.naverlogin.connection.CommonConnection.getDefaultHttpClient(CommonConnection.java:204) at com.nhn.android.naverlogin.connection.CommonConnection.getDefaultHttpClient(CommonConnection.java:190) at com.nhn.android.naverlogin.connection.CommonConnection.getDefaultHttpClient(CommonConnection.java:186) at com.nhn.android.naverlogin.connection.CommonConnection.request(CommonConnection.java:106) at com.nhn.android.naverlogin.connection.CommonConnection.request(CommonConnection.java:53) at com.nhn.android.naverlogin.connection.CommonConnection.request(CommonConnection.java:44) at com.nhn.android.naverlogin.connection.OAuthLoginConnection.request(OAuthLoginConnection.java:52) at com.nhn.android.naverlogin.connection.OAuthLoginConnection.requestAccessToken(OAuthLoginConnection.java:34) at com.nhn.android.naverlogin.ui.OAuthLoginActivity$GetAccessTokenTask.doInBackground(OAuthLoginActivity.java:310) at com.nhn.android.naverlogin.ui.OAuthLoginActivity$GetAccessTokenTask.doInBackground(OAuthLoginActivity.java:1) at android.os.AsyncTask$2.call(AsyncTask.java:333) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 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)
짐작되는 원인: cordova-plugin-naver 와 현재 안드로이드 버전의 호환성 문제일 가능성도 있을 것 같습니다.