I created an App for Android and it is running on android market successfully. Now I am trying to get it live on Amazon App store so I submitted my app to amazon and they start reviewing it. And after some time they said that your app is crashing at a specific point 5 out of 5 times.

Here is the crash report:

11-16 17:47:49.460: E/AndroidRuntime(9627): FATAL EXCEPTION: main
11-16 17:47:49.460: E/AndroidRuntime(9627): java.lang.VerifyError: [package_name].manager.DestinationViewManger
11-16 17:47:49.460: E/AndroidRuntime(9627):  at [package_name].activity.SearchScreenActivity.performClickFunctionality(SearchScreenActivity.java)
11-16 17:47:49.460: E/AndroidRuntime(9627):  at [package_name].activity.SearchScreenActivity.access$0(SearchScreenActivity.java)
11-16 17:47:49.460: E/AndroidRuntime(9627):  at [package_name].activity.SearchScreenActivity$1.onClick(SearchScreenActivity.java)
11-16 17:47:49.460: E/AndroidRuntime(9627):  at android.view.View.performClick(View.java:2532)
11-16 17:47:49.460: E/AndroidRuntime(9627):  at android.view.View$PerformClick.run(View.java:9277)
11-16 17:47:49.460: E/AndroidRuntime(9627):  at android.os.Handler.handleCallback(Handler.java:587)
11-16 17:47:49.460: E/AndroidRuntime(9627):  at android.os.Handler.dispatchMessage(Handler.java:92)
11-16 17:47:49.460: E/AndroidRuntime(9627):  at android.os.Looper.loop(Looper.java:143)
11-16 17:47:49.460: E/AndroidRuntime(9627):  at android.app.ActivityThread.main(ActivityThread.java:4196)
11-16 17:47:49.460: E/AndroidRuntime(9627):  at java.lang.reflect.Method.invokeNative(Native Method)
11-16 17:47:49.460: E/AndroidRuntime(9627):  at java.lang.reflect.Method.invoke(Method.java:507)
11-16 17:47:49.460: E/AndroidRuntime(9627):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
11-16 17:47:49.460: E/AndroidRuntime(9627):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
11-16 17:47:49.460: E/AndroidRuntime(9627):  at dalvik.system.NativeStart.main(Native Method)
11-16 17:47:49.470: W/ActivityManager(1419):   Force finishing activity [package_name]/.activity.HomeScreenRepairActivity

From this crash log I am sure there will be a problem with DestinationViewManger class and unable to solve that crash.

This is code written in the DestinationViewManager class:

public class DestinationViewManger {

    private static DestinationViewManger instance = null;
    private Boolean flag;

    private DestinationViewManger(){

    }

    public static DestinationViewManger getInstance() {
        if (instance == null) {
            instance = new DestinationViewManger();
        }
        return instance;
    }

    public Boolean getFlag() {
        return flag;
    }

    public void setFlag(Boolean flag) {
        this.flag = flag;
    }

}

Please help me, I am unable to resolve the crash. Any help is appreciated.

//Edited Earlier the crash was not coming at my end but finally I found the crash on the binary that is given by the amazon-appstore team. Actually there is a 3 step process at amazon-appstore to upload the .apk file(I hope anybody know about this). These steps are: (1) upload unsigned binary then, (2) download the processed binary from amazon and then, (3) upload the signed binary.

Now when I install the signed .apk file, that i uploaded in (3) step, on my phone it crashes. And if I sign binary that I uploaded in (1) step then it does not crashes. Its crazy but it is happening.

Is there anyone knows why is this crash coming?? Is this crash occurring due to the processing of binary done by amazon-appstore??

Please Help me...

有帮助吗?

解决方案 2

I had removed crash by changing the package name its crazy but it worked for me. Earlier the package name was [application_package_name].manager and i think amazon people also doing something with the same package name. So when i just randomly doing something to remove the crash and accidently changed the package name from manager to [application_package_name].searchmanager and it start working. And i was yepeeee....

其他提示

public class DestinationViewManger {

    private static final DestinationViewManger instance = new DestinationViewManger();
    public Boolean flag=false;

 // Private constructor prevents instantiation from other classes
    private DestinationViewManger(){   }

    public static DestinationViewManger getInstance() {
        return instance;
    } 
}

//try this singleton class once. no need for getter and setter method

DestinationViewManger dstv;

dstv=DestinationViewManger.getInstance();

dstv.flag=true; //set the value for your flag

boolean whatFlagboo=dstv.flag; //get your flag wherever you want
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top