Skip to content Skip to sidebar Skip to footer

Class Load Exception When Using @restservice - Java.lang.classnotfoundexception (...) At Dalvik.system.basedexclassloader.findclass

So my project is compiling and running well unitll I inject AndroidAnnotations @RestService into my MainActivity @EActivity(R.layout.activity_main) public class MainActivity extend

Solution 1:

You should not ues org.springframework:spring-core/web, these are artifacts meant for Java web development, not Android. This is the correct library:

compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'

You should also include underlying library for your converters (like GSON, Simple XML, Jackson) etc. The converters themselves are already included in the rest template artifact.

Post a Comment for "Class Load Exception When Using @restservice - Java.lang.classnotfoundexception (...) At Dalvik.system.basedexclassloader.findclass"