-6

i am getting java.lang.NoClassDefFoundError error for Constant_Country class, that is exist inside com.mi.uVite.model package.

Class is exist still it says NoClassDefFoundError. How can i overcome this issue?

java.lang.NoClassDefFoundError: com.mi.uVite.model.Constant_Country
        at com.mi.uVite.db.MIDatabaseHandler.createCountryTable(MIDatabaseHandler.java:911)
        at com.mi.uVite.db.MIDatabaseHandler.onCreate(MIDatabaseHandler.java:632)
        at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:252)
        at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:188)
        at com.mi.uVite.db.MIDatabaseHandler.rowCount(MIDatabaseHandler.java:570)
        at com.mi.uvite.BackGroundIntentService$1.onResponse(BackGroundIntentService.java:110)
        at com.mi.uvite.BackGroundIntentService$1.onResponse(BackGroundIntentService.java:67)
        at com.android.volley.toolbox.StringRequest.deliverResponse(StringRequest.java:60)
        at com.android.volley.toolbox.StringRequest.deliverResponse(StringRequest.java:1)
        at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:99)
        at android.os.Handler.handleCallback(Handler.java:725)
        at android.os.Handler.dispatchMessage(Handler.java:92)
        at android.os.Looper.loop(Looper.java:137)

And

public class Constant_Country
{
public static String country_id = "country_id";
public static String country_short_code = "country_short_code";
public static String country_name = "country_name";
public static String country_code = "country_code";
}
Mind Android
  • 558
  • 2
  • 9
  • 27

1 Answers1

0

I think you have to add the class Constant_Country into the package com.mi.uVite.model and put in the first line of Constant_Country

package com.mi.uVite.model

Remember that if you use an object of type Constant_Country you have to use an import.

Brank Victoria
  • 1,447
  • 10
  • 17