lihak / KakaoTalkCordovaPlugin

A plugman compatible Cordova plugin for the KakaoTalk
MIT License
8 stars 10 forks source link

Kakao SDK error #1

Closed awadeyar closed 8 years ago

awadeyar commented 8 years ago

inside the kakao plugin java class. I am getting KAKASDK not found error and import com.kakao.Auth errors.

awadeyar commented 8 years ago

Error "Error:(17, 22) package com.kakao.auth does not exist Error:(18, 22) package com.kakao.auth does not exist Error:(19, 22) package com.kakao.auth does not exist Error:(20, 22) package com.kakao.auth does not exist Error:(21, 22) package com.kakao.auth does not exist Error:(22, 22) package com.kakao.auth does not exist Error:(23, 22) package com.kakao.auth does not exist Error:(24, 22) package com.kakao.auth does not exist Error:(25, 22) package com.kakao.auth does not exist Error:(26, 26) package com.kakao.usermgmt does not exist Error:(27, 35) package com.kakao.usermgmt.callback does not exist Error:(28, 35) package com.kakao.usermgmt.callback does not exist Error:(29, 41) package com.kakao.usermgmt.response.model does not exist Error:(30, 35) package com.kakao.usermgmt.callback does not exist Error:(31, 32) package com.kakao.util.exception does not exist Error:(148, 46) cannot find symbol class ISessionCallback Error:(129, 37) cannot find symbol class UserProfile Error:(184, 41) cannot find symbol class KakaoException Error:(211, 50) cannot find symbol class KakaoAdapter Error:(214, 16) cannot find symbol class ISessionConfig Error:(239, 16) cannot find symbol class IApplicationConfig Error:(49, 9) cannot find symbol variable KakaoSDK Error:(63, 9) cannot find symbol variable Session Error:(85, 50) cannot find symbol variable AuthType Error:(85, 17) cannot find symbol variable Session Error:(99, 50) cannot find symbol class LogoutResponseCallback Error:(99, 17) cannot find symbol variable UserManagement Error:(119, 13) cannot find symbol variable Session Error:(159, 42) cannot find symbol class MeResponseCallback Error:(159, 13) cannot find symbol variable UserManagement Error:(156, 9) method does not override or implement a method from a supertype Error:(183, 9) method does not override or implement a method from a supertype Error:(215, 24) cannot find symbol class ISessionConfig Error:(213, 9) method does not override or implement a method from a supertype Error:(240, 24) cannot find symbol class IApplicationConfig Error:(238, 9) method does not override or implement a method from a supertype Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 100 warnings Error:Execution failed for task ':compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details."

lihak commented 8 years ago

Did you run the following command?

  1. cordova plugin add https://github.com/lihak/KakaoTalkCordovaPlugin --variable KAKAO_APP_KEY=%KAKAO_APP_KEY%
  2. cordova build android

Check your Explorer github_1

github_2

awadeyar commented 8 years ago

Thanks for the reply.

I followed the both steps. But it didn't create the com.kakao.sdk in builds----> intermediates---->exploded.aar Check the screenshot attached. ![screen shot 2016-01-13 at 5 57 39 pm]

(https://cloud.githubusercontent.com/assets/12082080/12294299/372e0bce-ba1f-11e5-96e0-fefd6405eff5.png)

Regards, awadeyar

lihak commented 8 years ago

Please tell me the results after the next step:

  1. cd .. // Safety First ;-)
  2. cordova create TestApp
  3. cd TestApp
  4. cordova platform add android
  5. cordova plugin add https://github.com/lihak/KakaoTalkCordovaPlugin --variable KAKAO_APP_KEY=%KAKAO_APP_KEY%
  6. cordova build android

Good luck!

awadeyar commented 8 years ago

Hi Lihak,

Tried the above steps but still the problem persists. Can we add the kakao sdk manually to the project? Please refer the screenshot for errors screen shot 2016-01-14 at 10 47 41 am

I tried adding Kakaosdk as module and I was successful adding sdk. But after that same error.

lihak commented 8 years ago

Hi Awadeyar,

Look at the file 'kakao.gradle' (https://github.com/lihak/KakaoTalkCordovaPlugin/blob/master/src/android/kakao.gradle) The maven url is what you want. But i recommend that you move the file 'kakao.gradle' to 'platforms/android/' folder first, and rename it to 'build-extras.gradle'.

I hope you will now be able to get the kakao-sdk. cordova build android

awadeyar commented 8 years ago

Hi Lihak,

Getting this error

E/kakao.sdk: WebViewAuthHandler is failed java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() at android.os.Handler.(Handler.java:200) at android.os.Handler.(Handler.java:114) at android.app.Dialog.(Dialog.java:113) at android.app.Dialog.(Dialog.java:155) at com.kakao.auth.authorization.authcode.KakaoWebViewDialog.(KakaoWebViewDialog.java:84) at com.kakao.auth.authorization.authcode.GetterAuthCode.requestWebviewAuth(GetterAuthCode.java:197) at com.kakao.auth.authorization.authcode.GetterAuthCode.request(GetterAuthCode.java:165) at com.kakao.auth.authorization.authcode.GetterAuthCode.start(GetterAuthCode.java:96) at com.kakao.auth.Session.requestAuthCode(Session.java:537) at com.kakao.auth.Session.internalOpen(Session.java:509) at com.kakao.auth.Session.open(Session.java:139) at com.lihak.plugin.kakao.KakaoTalk$1.run(KakaoTalk.java:83) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)

lihak commented 8 years ago

Hi awadeyar,

Thanks for the error report. I have changed the thread of "KakaoTalk" class. Look at https://github.com/lihak/KakaoTalkCordovaPlugin/commit/297f7d04dc404394e2c543bce5b77b4c8a395764

awadeyar commented 8 years ago

Thanks lihak. But still I have the problem with login. It will popup the login dialog and I can login. But the login function is not returning any thing. It just closes the login dialog. Getting this error. screen shot 2016-01-21 at 6 23 17 pm

Thanks, awadeyar

lihak commented 8 years ago

https://developers.kakao.com/

  1. Check 'Native app key' of your application.
  2. Android app must register key hash(https://developers.kakao.com/docs/android#getting-started-launch-sample-app) : keytool -exportcert -alias androiddebugkey -keystore debug_keystore_path -storepass android -keypass android | openssl sha1 -binary | openssl base64
  3. Look at LogCat

Regards, Lihak