chennaione / sugar

Insanely easy way to work with Android Database.
http://satyan.github.com/sugar/
MIT License
2.62k stars 583 forks source link

Android O TypefaceCompatApi24Impl java.lang.NoSuchMethodException: addFontWeightStyle #776

Open fg607 opened 6 years ago

fg607 commented 6 years ago

at java.lang.Class.getMethod(Class.java:1690) at android.support.v4.graphics.TypefaceCompatApi24Impl.(TypefaceCompatApi24Impl.java:70) at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:453) at com.orm.util.ReflectionUtil.getDomainClass(ReflectionUtil.java:274) at com.orm.util.ReflectionUtil.getDomainClasses(ReflectionUtil.java:258) at com.orm.SchemaGenerator.createDatabase(SchemaGenerator.java:45) at com.orm.SugarDb.onCreate(SugarDb.java:28) at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:294) at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:194) at com.orm.SugarDb.getDB(SugarDb.java:38) at com.orm.SugarRecord.getSugarDataBase(SugarRecord.java:35) at com.orm.SugarRecord.findWithQuery(SugarRecord.java:191)

ibtisamasif commented 6 years ago

Having same issue. Any update on this ?

ali-star commented 6 years ago

you forgot to set empty constructor in your class.

tmeinhart commented 6 years ago

Having the same issue. What class do you mean?

Gokuldroid commented 5 years ago

I had the same issue. ManifestHelper.getDomainPackageName is returns empty value if we have wrong config or no sugar config in manifest. I had my sugar config under manifest tag. It should be under application tag. Moving the config to application tag helped me to fix this issue.

Gokuldroid commented 5 years ago

TypefaceCompatApi24Impl have some staic block that gets invoked when loding it via class loader. It would be great, if suger reports these kind of error initialization itself.