Today I am faced with a massive error that doesn\'t let me run a sample project on my phone.
When Android Studio is building the project, it first shows the followin
Because it is reporting: bad class file magic (cafebabe) or version (0034.0000)
you should check if you are compiling with the same java version that you are trying to use at runtime.
If you are using gradle you should use the following or similar entries in your build.gradle file:
apply plugin: 'java'
sourceCompatibility = 1.7
targetCompatibility = 1.7
Use this link for more gradle details.
In Android Studio, from File -> Project Structure -> SDK Location -> JDK Location
you should use the jdk 1.7 and not relay on the Project level
setting. See this link for a similar Android Studio question.