Didn't find class "com.raizlabs.android.dbflow.config.GeneratedDatabaseHolder"
See original GitHub issue05-14 11:22:23.349 2832-2832/com.mirabelle.app E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.mirabelle.app, PID: 2832
java.lang.RuntimeException: Unable to create application com.mirabelle.liquid.MyApplication: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.raizlabs.android.dbflow.config.GeneratedDatabaseHolder
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4556)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.raizlabs.android.dbflow.config.GeneratedDatabaseHolder
at com.raizlabs.android.dbflow.config.FlowManager.getDatabaseHolder(FlowManager.java:116)
at com.raizlabs.android.dbflow.config.FlowManager.init(FlowManager.java:155)
at com.mirabelle.liquid.MyApplication.onCreate(MyApplication.groovy:17)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4553)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.ClassNotFoundException: com.raizlabs.android.dbflow.config.GeneratedDatabaseHolder
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:309)
at java.lang.Class.forName(Class.java:273)
at com.raizlabs.android.dbflow.config.FlowManager.getDatabaseHolder(FlowManager.java:113)
at com.raizlabs.android.dbflow.config.FlowManager.init(FlowManager.java:155)
at com.mirabelle.liquid.MyApplication.onCreate(MyApplication.groovy:17)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4553)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.raizlabs.android.dbflow.config.GeneratedDatabaseHolder" on path: DexPathList[[zip file "/data/app/com.mirabelle.app-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:309)
at java.lang.Class.forName(Class.java:273)
at com.raizlabs.android.dbflow.config.FlowManager.getDatabaseHolder(FlowManager.java:113)
at com.raizlabs.android.dbflow.config.FlowManager.init(FlowManager.java:155)
at com.mirabelle.liquid.MyApplication.onCreate(MyApplication.groovy:17)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4553)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Suppressed: java.lang.ClassNotFoundException: com.raizlabs.android.dbflow.config.GeneratedDatabaseHolder
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 18 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
Project build.gradle
:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.2'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
classpath 'org.codehaus.groovy:gradle-groovy-android-plugin:0.3.6'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://raw.github.com/Raizlabs/maven-releases/master/releases" }
}
}
Module build.gradle
:
apply plugin: 'com.android.application'
apply plugin: 'groovyx.grooid.groovy-android'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.mirabelle.app"
minSdkVersion 17
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'org.codehaus.groovy:groovy:2.4.3:grooid'
compile 'io.reactivex:rxjava:1.0.10'
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1'
compile 'com.squareup.okhttp:okhttp:2.3.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
apt 'com.raizlabs.android:DBFlow-Compiler:2.0.0'
compile 'com.raizlabs.android:DBFlow-Core:2.0.0'
compile 'com.raizlabs.android:DBFlow:2.0.0'
}
Issue Analytics
- State:
- Created 8 years ago
- Comments:16 (2 by maintainers)
Top Results From Across the Web
Android DBFlow not generating database
What I've tried. Disabling instant run; Removing the SQLCipher integration, i.e. changing initFlowDb() to simply be FlowManager.init(new ...
Read more >DBFlow Guide | CodePath Android Cliffnotes
You can go into your app/build/intermediate/classes/com/raizlabs/android/dbflow/config and look for the GeneratedDatabaseHolder.class to understand what code is ...
Read more >com.raizlabs.android.dbflow.config.FlowManager java ...
Description: The main entry point into the generated database code. It uses reflection to look up and construct the generated database holder class...
Read more >Open Event Organizer Android App
It is an Android app used by event organizers to create and manage events on ... up and construct the generated database holder...
Read more >The Fastest Android ORM Database Library – RPLabs
DBFlow uses this functionality to generate all sorts of classes and interactions with the database at compile time. This enables the library ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah… finaly the solution… The solutions is to create a table first, read the @MaximEfimovRMR answer… Create at least one table by following this: https://github.com/Raizlabs/DBFlow/blob/master/usage/DBStructure.md
It turns out it was an issue with Kotlin. (I posted the details in a similar issue for this project. GitHub needs a way to search for all of your comments. If I find it I’ll post here.)
Essentially, enable Kotlin first before setting up dbflow and ensure you use kapt instead of annotaionProcessor