Reputation: 83
I updated an Android project to Android 5.0 and everything is fine when running directly from Eclipse in Genymotion Simulator. But when I create a signed APK and upload that, it crashes. The signed APK works on Android 4.0 Simulator, but not on 5.0. The AppCompat Library is linked with the project in Android > Library.
In the AndroidManifest.xml I have declared:
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="21" />
My base activity extends android.support.v7.app.ActionBarActivity. And this is the error I see in logcat when running on 5.0:
FATAL EXCEPTION: main
Process: com.myapp.mypackage, PID: 1414
java.lang.AbstractMethodError: abstract method "android.support.v7.app.ActionBar ol.a()"
at ol.b(SourceFile:123)
at android.support.v7.app.ActionBarActivity.getSupportActionBar(SourceFile:73)
at com.myapp.mypackage.StartActivity.onCreate(SourceFile:91)
at android.app.Activity.performCreate(Activity.java:5933)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
What could cause this or what is the difference between running directly and installing, except the signing?
Thank you very much, your help is appreciated!
Upvotes: 2
Views: 761
Reputation: 5598
Android Studio
. ADT plugin is no longer supported by Google.v7 appcompat library
(current latest is 22.2.0)AppCompatActivity
Upvotes: 1
Reputation: 91
This is an issue with Samsung's custom android and zipalign. While using zipalign, remove the -z parameter. This apk should work.
Upvotes: 0