3

When I create my app and lauch it from my IDE (android studio) app is working great, but when I build APK, it's crashing, but I can't figure out why? There is error log. I see that there is segmentation error (SIGSEGV), but how to figure out what is wrong?

10-21 10:14:00.323  29764-29764/? I/Vitamio﹕ LIB ROOT: /data/data/com.iptviq.mobile.android.skynettv/libs/
10-21 10:14:00.323  29764-29764/? D/dalvikvm﹕ Trying to load lib /data/data/com.iptviq.mobile.android.skynettv/libs/libstlport_shared.so 0x418308b0
10-21 10:14:00.323  29764-29764/? D/dalvikvm﹕ Added shared lib /data/data/com.iptviq.mobile.android.skynettv/libs/libstlport_shared.so 0x418308b0
10-21 10:14:00.323  29764-29764/? D/dalvikvm﹕ No JNI_OnLoad found in /data/data/com.iptviq.mobile.android.skynettv/libs/libstlport_shared.so 0x418308b0, skipping init
10-21 10:14:00.323  29764-29764/? D/dalvikvm﹕ Trying to load lib /data/data/com.iptviq.mobile.android.skynettv/libs/libvplayer.so 0x418308b0
10-21 10:14:00.323  29764-29764/? D/dalvikvm﹕ Added shared lib /data/data/com.iptviq.mobile.android.skynettv/libs/libvplayer.so 0x418308b0
10-21 10:14:00.323  29764-29764/? W/dalvikvm﹕ Exception thrown (Ljava/lang/NoSuchMethodError;) while throwing internal exception (Ljava/lang/NoSuchMethodError;)
10-21 10:14:00.323  29764-29764/? W/dalvikvm﹕ Exception thrown (Ljava/lang/NoSuchMethodError;) while throwing internal exception (Ljava/lang/NoSuchMethodError;)
10-21 10:14:00.323  29764-29764/? A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x0000002c (code=1), thread 29764 (ndroid.skynettv)

My proguard:

-dontwarn org.xmlpull.**
-keep class org.acra.ReportingInteractionMode { *; }

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
-keep public class * implements java.io.Serializable
-keep public class * extends android.support.v4.app.Fragment
-keep public class * extends android.support.v4.app.ListFragment

-dontobfuscate
-dontoptimize


-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose

-keep public class org.spongycastle.** {
  <fields>;
  <methods>;
}

-keep public class org.apache.** {
  <fields>;
  <methods>;
}

-ignorewarnings

-keepclasseswithmembernames class * {
    native <methods>;
}

-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers class * extends android.app.Activity {
   public void *(android.view.View);
}


-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

-keepclassmembers class * implements java.io.Serializable {
    static final long serialVersionUID;
    private static final java.io.ObjectStreamField[] serialPersistentFields;
    private void writeObject(java.io.ObjectOutputStream);
    private void readObject(java.io.ObjectInputStream);
    java.lang.Object writeReplace();
    java.lang.Object readResolve();
}

ProGuard warnings:

ProGuard: [SkynetMobile] Note: there were 4 duplicate class definitions.
ProGuard: [SkynetMobile]       You should check if you need to specify additional program jars.
ProGuard: [SkynetMobile] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [vitamio.jar:META-INF/MANIFEST.MF])
ProGuard: [SkynetMobile] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [gson-2.2.2.jar:META-INF/MANIFEST.MF])
ProGuard: [SkynetMobile] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [nineoldandroids-2.4.0.jar:META-INF/MANIFEST.MF])
ProGuard: [SkynetMobile] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [libGoogleAnalyticsServices.jar:META-INF/MANIFEST.MF])
ProGuard: [SkynetMobile] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [android-support-v4.jar:META-INF/MANIFEST.MF])
ProGuard: [SkynetMobile] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [ksoap2-android-assembly-3.0.0-jar-with-dependencies.jar:META-INF/MANIFEST.MF])

2 Answers 2

2

right click on your project, goto properties and then select the android from left panel. then check what Library is used for your project? for these Libraries use like this in your proguard.cfg:

-keepclassmembers class * extends com.actionbarsherlock.ActionBarSherlock {
<init>(android.app.Activity, int);
}

for java library files that you are using in your project use like this command in your proguard.cfg:

-libraryjars /libs/libmessaging.jar
1
  • 1
    Thanks, you helped me to find out solution. I saw that vitamio was bugy, so added vitamio starting package name ( -keep class io.** { *; } ) to proguard config file and it worked!
    – Ragaisis
    Commented Oct 21, 2013 at 8:55
0

add this to your proguard.cfg:

-ignorewarnings 

maybe this can help you

4
  • nope. same situation :/ Actually program is starting, but on video loading it crashes.. But if I run from android studio (through usb) it works fine
    – Ragaisis
    Commented Oct 21, 2013 at 7:53
  • I think proguard encode some of library that you are using in your app. so you must found it and prevent the proguard to encode it. Commented Oct 21, 2013 at 7:56
  • @Ragaisis Are you using jar library or Android Project Library? Commented Oct 21, 2013 at 8:01
  • Ye, actually i tried remove proGuard check box, then apk is build fine. Oh.. Hard way to try googling what is wrong. Hm.. I'm new on this project. There are lot of libraries -actionbarSherlock, sliding menu, gson, vtamio... How can I recognise Android project library?
    – Ragaisis
    Commented Oct 21, 2013 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.