Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android deployed App unable to instantiate application

I have this strange error I do not know how to resolve. I test my App deployed straight to my phone and it's working ok. But now testing downloading from Play Store the app crash as startup and the error is this one:

java.lang.RuntimeException: Unable to instantiate application com.bookit.android.BookItApp: java.lang.ClassNotFoundException: com.bookit.android.BookItApp

I have this class:

package com.bookit.android;

public class BookItApp extends Application {...}

My manifest I think it's ok defining the App class:

< application android:name="BookItApp"

Or Maybe should I define:

android:name = "com.bookit.android.BookItApp"

UPDATE: this is my proguard-project.txt

I don't know if it's ok.

-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}

-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}

-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}

-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
like image 654
Tekno Avatar asked Feb 27 '26 07:02

Tekno


1 Answers

Exactly like you said, you should define it like this

<application 
           android:name="com.bookit.android.BookItApp"
           ...
           ...
           >
like image 128
Marcel Krivek Avatar answered Mar 01 '26 21:03

Marcel Krivek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!