0

I'm working through the tutorial on the Spotify website with Android Studio. I've managed to get to the end and run the app (BUILD SUCCESSFUL).

However, when the app opens on my real device, it crashes right away.

In the Android Monitor the first error is:

Exception when newActivity r=ActivityRecord{2e084abc token=android.os.BinderProxy@

I've googled it and this came up. After reading through the accepted answer and adding the code to my app, I get errors. I don't even know if I'm on the right track given that the Exceptions aren't exactly the same.

My question is: What is it causing this error? and how can I fix it?

Micho
  • 3,929
  • 13
  • 37
  • 40
Joseph
  • 1
  • 4
  • 1
    "I don't even know if I'm on the right track given that the errors aren't exactly the same". If this is the case, post your Logcat. – gsb May 27 '17 at 06:04
  • Could you post the entire stack-trace and the causing `Activity`'s code? – Veneet Reddy May 27 '17 at 06:05

1 Answers1

0

The IDE I'm using is IntelliJ IDEA. When I added the code from the Spotify website, two red errors popped up.

First one was it suggested that I change the class to an abstract class. Changing this back to a normal class solved my problem.

Second one was the onLoginFailed() method. It takes an (int i), however the error 'Cannot resolve symbol i' pops up. I replaced it with an (Error error), It got rid of the error and the app runs fine.

Hope this helps someone.

Joseph
  • 1
  • 4