Problem with running VKSdk.login. Everything seems to be going fine, the login window opens, I click on Allow and that's it. Instead of my application, a black screen opens and after a while a window appears with a proposal to close the non-responding application.

MainActivity code snippet:

@Override protected void onCreate(Bundle savedInstanceState) { Log.d(LOG_TAG, "ONCREATE"); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); VKSdk.wakeUpSession(this, new VKCallback<VKSdk.LoginState>() { @Override public void onResult(VKSdk.LoginState res) { switch (res) { case LoggedOut: VKSdk.login(MainActivity.this, VKScope.AUDIO); break; case LoggedIn: break; case Pending: break; case Unknown: break; } } @Override public void onError(VKError error) { } }); 
  • If you add a drop log, it will be just super! - miha_dev
  • @miha_dev and there is no log. The app just hangs. It is not a mistake that crashes, but hangs. Well, more precisely, there is a Log, but there are no errors in it - Dima Rodionov
  • you do VKSdk.initialize (Context applicationContext); in class Application? - miha_dev
  • If the application crashes, there is always an error stack. Are you looking for a log in logcat? - miha_dev
  • @miha_dev yes, I initialized KFOR. There is nothing in the log. After clicking enable nothing appears in the log. - Dima Rodionov

0