0

I have inserted a module in my project as a library. The module use Dagger2.

apply plugin: 'com.android.library'
apply plugin: 'com.neenbedankt.android-apt'
.
.
//dagger for DI
apt 'com.google.dagger:dagger-compiler:2.0.2'
provided 'javax.annotation:jsr250-api:1.0'

As an application it works fine, but as a library module I get this error:

Error:(7, 46) error: cannot find symbol class DaggerApplicationComponent
Error:(8, 46) error: cannot find symbol class DaggerHomeActivityComponent
Error:(21, 46) error: cannot find symbol class DaggerProfileComponent
Error:(27, 46) error: cannot find symbol class DaggerSearchComponent
Error:(27, 46) error: cannot find symbol class DaggerShareFeedComponent

And so on! Has anybody an idea what's wrong with the combination library-module and dagger?

Thanks a lot...

EDIT:

After include actionbarsherlock I get these errors:

Error:(146) Attribute "titleTextStyle" has already been defined
Error:(146) Attribute "subtitleTextStyle" has already been defined
Error:(146) Attribute "divider" has already been defined
Error:(146) Attribute "background" has already been defined
Error:(146) Attribute "backgroundSplit" has already been defined
.
.
.

Here my dependencies from the module build.gradle:

compile 'com.android.support:palette-v7:23.2.0'
compile 'com.android.support:design:23.2.0'
compile 'com.android.support:recyclerview-v7:23.2.0'
// compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.0.1'
compile 'com.squareup.retrofit2:adapter-rxjava:2.0.0-beta4'
compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta4'
compile 'com.colintmiller:simplenosql:0.5.1'
compile 'com.pkmmte.view:circularimageview:1.1'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'io.reactivex:rxandroid:1.1.0'
compile 'me.iwf.photopicker:PhotoPicker:0.2.8@aar'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.soundcloud.android:android-crop:1.0.1@aar'
compile 'jp.wasabeef:glide-transformations:1.3.1'
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'
compile 'net.danlew:android.joda:2.9.2'
compile 'com.github.danylovolokh:hashtag-helper:1.1.0'
// compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'

For testing I have deactivated google play services and appcombat...

Any ideas?

Mirza Sisic
  • 2,401
  • 4
  • 24
  • 38
BakteriusD
  • 77
  • 1
  • 2
  • 8
  • this link will help you bro [http://stackoverflow.com/questions/16588064/how-do-i-add-a-library-project-to-android-studio/16634680#16634680](http://stackoverflow.com/questions/16588064/how-do-i-add-a-library-project-to-android-studio/16634680#16634680) Note: you need to add file dependency of module in your app gradle. – VijayKalyan Aug 23 '16 at 11:41
  • Thanks a lot. New problem. Thread updated! – BakteriusD Aug 23 '16 at 13:04

0 Answers0