In my Android project, I have two modules,
Application module
backend module
I want to import the backend module class into one of the classes of my application module. but when I try to import it like this
import com.me.you.backend.entities
I get an error Error:(52, 58) error: package com.me.you.backend.entities does not exist
The next thing I tried is to compile my backend module in my build.gradle application, like this
dependencies { .... compile project(':backend') }
But I get 13 warnings! of this type
WARNING: Dependency org.apache.httpcomponents:httpclient:4.4.1 is ignored for debug as it may be conflicting with the internal version provided by Android. In case of problem, please repackage it with jarjar to change the class packages
And when I run my application module, I get this error
Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
java.util.zip.ZipException: duplicate entry: com / google / appengine / repackaged / com / google / api / client / auth / oauth2 / AuthorizationCodeFlow $ Builder.class
Question
How can I successfully import my base class?
source share