java - RoboGuice Error: Didn't find class "AnnotationDatabaseImpl" on path -
trying simple app run roboguice encountering error: didn't find class "annotationdatabaseimpl" on path:
looks lot of people error, , none of solutions seem work me. have done taken androidstudio blank app template. mainactivity.java:
package com.example.temp.robotest; import android.os.bundle; import roboguice.roboguice; import roboguice.util.robocontext; import java.util.hashmap; import java.util.hashmap; import java.util.map; import com.google.inject.key; import roboguice.activity.roboactionbaractivity; public class mainactivity extends roboactionbaractivity implements robocontext { protected hashmap<key<?>, object> scopedobjects; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); } public map<key<?>, object> getscopedobjectmap() { return this.scopedobjects; } }
and gradle:
apply plugin: 'com.android.application' android { compilesdkversion 24 buildtoolsversion "24.0.0" defaultconfig { applicationid "com.example.temp.robotest" minsdkversion 23 targetsdkversion 24 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) testcompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:24.0.0' compile 'org.roboguice:roboguice:3.0' provided 'org.roboguice:roboblender:3.0' }
replacing line 14 in mainactivity.java //public class mainactivity extends appcompatactivity implements robocontext {
, app runs. wish use roboguice. thoughts?
replacing provided 'org.roboguice:roboblender:3.0'
apt 'org.roboguice:roboblender:3.0'
worked me.
you have enable com.neenbedankt.android-apt gradle plugin adding
apply plugin: 'com.neenbedankt.android-apt'
to build.gradle app module ,
buildscript { /.../ dependencies { /.../ classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' } }
to build.gradle of project.
Comments
Post a Comment