Java.lang.NoSuchMethodException:当我尝试在另一台设备上使用apk启动我的应用程序时

时间:2017-03-29 22:01:48

标签: java android apk

我在Android中使用Firebase编写应用程序,一切正常,0错误,0警告。 一切正常,直到我没有生成签名的apk。 当我这样做,并尝试将应用程序发送给我的老板时,应用程序一旦安装崩溃。 Firebase崩溃报告称错误是:

Exception java.lang.RuntimeException: Unable to create application com.archimedia.moveng.Bambooz: java.lang.RuntimeException: Something went wrong, please report to [REDACTED_EMAIL_ADDRESS]
android.app.ActivityThread.handleBindApplication (ActivityThread.java:4861)
android.app.ActivityThread.access$1500 (ActivityThread.java:178)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1531)
android.os.Handler.dispatchMessage (Handler.java:111)
android.os.Looper.loop (Looper.java:194)
android.app.ActivityThread.main (ActivityThread.java:5637)
java.lang.reflect.Method.invoke (Method.java)
java.lang.reflect.Method.invoke (Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:960)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:755)
arrow_drop_down


Caused by java.lang.RuntimeException: Something went wrong, please report to [REDACTED_EMAIL_ADDRESS]
com.a.a.c.a.a ()
com.a.a.a.a ()
com.archimedia.moveng.Bambooz.onCreate ()
android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1017)
android.app.ActivityThread.handleBindApplication (ActivityThread.java:4858)
android.app.ActivityThread.access$1500 (ActivityThread.java:178)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1531)
android.os.Handler.dispatchMessage (Handler.java:111)
android.os.Looper.loop (Looper.java:194)
android.app.ActivityThread.main (ActivityThread.java:5637)
java.lang.reflect.Method.invoke (Method.java)
java.lang.reflect.Method.invoke (Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:960)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:755)
arrow_drop_down



Caused by java.lang.NoSuchMethodException: <init> [class android.content.Context]
java.lang.Class.getConstructor (Class.java:531)
java.lang.Class.getConstructor (Class.java:495)
com.a.a.c.a.a ()
com.a.a.a.a ()
com.archimedia.moveng.Bambooz.onCreate ()
android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1017)
android.app.ActivityThread.handleBindApplication (ActivityThread.java:4858)
android.app.ActivityThread.access$1500 (ActivityThread.java:178)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1531)
android.os.Handler.dispatchMessage (Handler.java:111)
android.os.Looper.loop (Looper.java:194)
android.app.ActivityThread.main (ActivityThread.java:5637)
java.lang.reflect.Method.invoke (Method.java)
java.lang.reflect.Method.invoke (Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:960)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:755)

我的Bambooz.java就是这样:

public class Bambooz extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        Firebase.setAndroidContext(this);
    }
}

0 个答案:

没有答案