I've enabled android proguard. After sing in i've run my app on device. its throws below error.
FATAL EXCEPTION: main
java.lang.NumberFormatException: Invalid int: "null"
at java.lang.Integer.invalidInt(Integer.java:138)
at java.lang.Integer.parseInt(Integer.java:355)
at java.lang.Integer.parseInt(Integer.java:332)
at lf.a(Source:481)
at lf.onPostExecute(Source:1)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
What class need to keep in proguard? if disable proguard its working correctly.
Related
I am getting this error in my android app. When I am going for auto suggestion, I got this error. Why I am getting this error. Please Help me.
FATAL EXCEPTION: main
java.lang.NumberFormatException: Invalid long: "name"
at java.lang.Long.invalidLong(Long.java:125)
at java.lang.Long.parse(Long.java:362)
at java.lang.Long.parseLong(Long.java:353)
at java.lang.Long.parseLong(Long.java:319)
at android.database.MatrixCursor.getLong(MatrixCursor.java:255)
at android.widget.CursorAdapter.getItemId(CursorAdapter.java:220)
at android.widget.AutoCompleteTextView.buildImeCompletions(AutoCompleteTextView.java:1123)
at android.widget.AutoCompleteTextView.showDropDown(AutoCompleteTextView.java:1082)
at android.widget.AutoCompleteTextView.updateDropDownForFilter(AutoCompleteTextView.java:971)
at android.widget.AutoCompleteTextView.access$800(AutoCompleteTextView.java:91)
at android.widget.AutoCompleteTextView$PopupDataSetObserver$1.run(AutoCompleteTextView.java:1268)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:5299)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
This will crash since it isn't a long
Long.parseLong("name")
It has to be something like this
Long.parseLong("12345567890")
My app run very good when built test but when build it with keystore and run my app it force close and show error
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException
at tuannt.appweather.f.f.a(Unknown Source)
at tuannt.appweather.e.a.a(Unknown Source)
at tuannt.appweather.e.a.onPostExecute(Unknown Source)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5162)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:744)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
What happened with my apk?
I recently started using proguard in my project.
I created test crash (in App class)
I received next error -
03-23 10:12:26.030 4956-4956/social.game.dating E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException
at social.game.dating.App.App.m(Unknown Source)
at social.game.dating.App.App.l(Unknown Source)
at social.game.dating.App.App$a.a(Unknown Source)
at social.game.dating.App.App$a.onPostExecute(Unknown Source)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
I run script
java -jar retrace.jar -verbose d:/mapping.txt d:/obf.txt > d:/fixed.txt
to obfuskate code, and receive next:
03-23 10:12:26.030 4956-4956/social.game.dating E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException
at social.game.dating.App.App.void initSync()(Unknown Source)
at social.game.dating.App.App.void access$100()(Unknown Source)
at social.game.dating.App.App$InitTask.java.lang.Void doInBackground(java.lang.Void[])(Unknown Source)
void onPostExecute(java.lang.Void)
at social.game.dating.App.App$InitTask.void onPostExecute(java.lang.Object)(Unknown Source)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
So I just received method, in wich exception was caught. I would like to get the line, if it is possible, please help!
PS also, I tried
retrace.bat -verbose d:/mapping.txt d:/obf.txt > d:/out.txt
and received the same result
You need to add next rule to proguard config file:
-keepattributes SourceFile,LineNumberTable
If you want to hide actual source file name add next rule:
-renamesourcefileattribute SomeName
and all file names will be renamed to SomeName.java, but after deobfuscation you will have class name and line number which will allow you to restore actual line of code
I have received this error in my remote app crash reporter:
java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
at android.view.WindowManagerGlobal.closeAll(WindowManagerGlobal.java:325)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3590)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3756)
at android.app.ActivityThread.access$800(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1286)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5279)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Is this a known bug in Android? I have no more information about the crash. Do you have any idea about what can I do to get the cause?
Array index start at 0
you have to subsract 1
I can't find following error in my code. It looks like the problem is in the asynctask onpostexecute.
java.lang.IllegalArgumentException: View not attached to window manager
at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:672)
at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:368)
at android.view.WindowManagerImpl$CompatModeWrapper.removeView(WindowManagerImpl.java:160)
at android.app.Dialog.dismissDialog(Dialog.java:319)
at android.app.Dialog.dismiss(Dialog.java:302)
at www.mobilezar.mn.Advertisements$InitialLoading.onPostExecute(Advertisements.java:216)
at www.mobilezar.mn.Advertisements$InitialLoading.onPostExecute(Advertisements.java:1)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)