2016-05-30 51 views
0

在我的Android库项目包括我很多第三方库,例如如何使用JCenter将第三个库包含在.arr中?

compile 'com.jakewharton:butterknife:8.0.1' 
apt 'com.jakewharton:butterknife-compiler:8.0.1' 
// Java8的时间库 
compile 'com.jakewharton.threetenabp:threetenabp:1.0.3' 
// RxJava 
compile 'io.reactivex:rxjava:1.1.5' 
compile 'io.reactivex:rxandroid:1.2.0' 

当我用./gradlew install建立ARR不包括第三库。所以我的其他项目不能引用这个库。

但是当我包括Rosie项目(https://github.com/Karumi/Rosie)。我可以自动包括dagger,butterknife ....

我该怎么办?

我想让我的图书馆在我的arr中包含这些第三方库。我该怎么办?

回答

0

您必须在您的build.gradle这些线路使用Butterknife:

buildscript { 
    repositories { 
     mavenCentral() 
    } 
    dependencies { 
     classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' 
    } 
} 

apply plugin: 'com.neenbedankt.android-apt' 
+0

不不不,我需要我的ARR文件包含这些第三方库。不是我的主要项目。你的方法是让主项目使用butterknife。 – H3c

相关问题