Hirbod Behnam Hirbod Behnam - 5 months ago 59
Android Question

java.lang.VerifyError in api 3

I created an app that the minSdkVersion is 3. I tried to run an empty activity in an emulator; I'm just getting this error:

java.lang.VerifyError: com.android.tools.fd.runtime.BootstrapApplication
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1472)
at android.app.Instrumentation.newApplication(Instrumentation.java:1033)
at android.app.Instrumentation.newApplication(Instrumentation.java:1018)
at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:459)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3613)
at android.app.ActivityThread.access$2500(ActivityThread.java:112)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1729)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3948)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
at dalvik.system.NativeStart.main(Native Method)


In gradle, I've removed app support library and I have
dependencies {classpath 'com.android.tools.build:gradle:2.1.2'}


Other info:

Android Studio Version: 2.1.2

Empty library:
dependencies {}


styles.xml :
<style name="AppTheme" parent="android:Theme.Light"/>


This app is running well on API 9(2.3)

Answer

I've downgraded the Android Studio to version 1.5.1 and it's now fixed. Or you can set classpath 'com.android.tools.build:gradle:X.X.X' to classpath 'com.android.tools.build:gradle:1.5.1'.