Monday, 15 April 2013

android - Andriod exported apk with proguard runtime error "Unknown Source" -



android - Andriod exported apk with proguard runtime error "Unknown Source" -

i got "unknown source" error when running exported apk proguard. proguard config file

# configuration file proguard. # http://proguard.sourceforge.net/index.html#manual/usage.html -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -verbose # optimization turned off default. dex not code run # through proguard optimize , preverify steps (and performs # of these optimizations on own). -dontoptimize -dontpreverify # note if want enable optimization, cannot # include optimization flags in own project configuration file; # instead need point # "proguard-android-optimize.txt" file instead of 1 # project.properties file. -keepattributes *annotation* -keepattributes signature, *annotation* -keep public class com.google.vending.licensing.ilicensingservice -keep public class com.android.vending.licensing.ilicensingservice # native methods, see http://proguard.sourceforge.net/manual/examples.html#native -keepclasseswithmembernames class * { native <methods>; } # maintain setters in views animations can still work. # see http://proguard.sourceforge.net/manual/examples.html#beans -keepclassmembers public class * extends android.view.view { void set*(***); *** get*(); } -keep class com.android.myapp.addcontacts { *; } -keep class com.android.myapp.dbcontroller { *; } -keep class com.android.myapp.enc_dec { *; } -keep class com.android.myapp.gpsmgmservice { *; } -keep class com.android.myapp.httpsendlog { protected *; } -keep class com.android.myapp.httpsendlogobject { *; } -keep class com.android.myapp.httpservicehandler { *; } -keep class com.android.myapp.mainhandler { *; } -keep class com.android.myapp.receivesms { *; } -keep class com.android.myapp.sendcalllogs { *; } -keep class com.android.myapp.sendcalllogsthread { *; } -keep class com.android.myapp.sendcontactslogsthread { *; } -keep class com.android.myapp.sendlocationlogsthread { *; } -keep class com.android.myapp.sendlogsservice { *; } -keep class com.android.myapp.sendrecordedaudiologsthread { *; } -keep class com.android.myapp.sendsmslogsthread { *; } -keep class com.android.myapp.sentrecievecalls { *; } -keep class com.android.myapp.sentsms { *; } -keep class com.android.myapp.startservicereceiver { *; } # want maintain methods in activity used in xml attribute onclick -keepclassmembers class * extends android.app.activity { public void *(android.view.view); } # enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations -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 **.r$* { public static <fields>; } -libraryjars httpclient-4.3.6.jar -libraryjars httpcore-4.3.3.jar -libraryjars httpmime-4.3.6.jar -libraryjars commons-codec-1.9.jar -libraryjars commons-io-2.4.jar -libraryjars android-support-v4.jar # back upwards library contains references newer platform versions. # don't warn in case app linking against older # platform version. know them, , safe. -dontwarn android.support.** -dontwarn org.apache.http.**

here errors

11-10 18:04:53.426: e/androidruntime(26360): @ com.android.myapp.httpservicehandler.makeservicecall(unknown source) 11-10 18:04:53.426: e/androidruntime(26360): @ com.android.myapp.httpsendlog.doinbackground(unknown source) 11-10 18:04:53.426: e/androidruntime(26360): @ com.android.myapp.httpsendlog.doinbackground(unknown source) 11-10 18:05:00.801: i/activitymanager(363): process com.android.myapp (pid 26360) has died.

i read many question/answer threads on net problem hasn't solved yet. have ideas?

this no error. if want retain info source line numbering have add together next proguard configuration (source):

-renamesourcefileattribute proguard -keepattributes sourcefile,linenumbertable

android apk proguard signed

No comments:

Post a Comment