Java Android库依赖项
我正在做一个android库项目。 这个库项目已经编译了一些第三方库,比如Volley。 当用户使用库时,用户也需要编译截图。如果用户不编译,用户的应用程序将找不到截取代码。 但我不想让用户编译截击库,只需编译我的库即可。有解决办法吗 这是我的图书馆Java Android库依赖项,java,android,dependencies,android-volley,android-library,Java,Android,Dependencies,Android Volley,Android Library,我正在做一个android库项目。 这个库项目已经编译了一些第三方库,比如Volley。 当用户使用库时,用户也需要编译截图。如果用户不编译,用户的应用程序将找不到截取代码。 但我不想让用户编译截击库,只需编译我的库即可。有解决办法吗 这是我的图书馆 apply plugin: 'com.android.library' android { compileSdkVersion 23 buildToolsVersion "23.0.1" defaultConfig {
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
consumerProguardFiles 'proguard-rules.pro'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.squareup:seismic:1.0.1'
compile 'com.android.volley:volley:1.0.0'
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.android.support:recyclerview-v7:23.0.1"
compile "com.android.support:support-v4:23.0.1"
compile "com.android.support:support-annotations:23.0.1"
compile "com.android.support:design:23.0.1"
}
有一个示例应用程序gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 15
targetSdkVersion 25
versionCode 108
versionName "3.1"
}
signingConfigs {
debug {
storeFile file("debug.jks")
storePassword 'develop'
keyAlias "develop"
keyPassword "develop"
}
}
buildTypes {
release {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
applicationIdSuffix ".debug"
minifyEnabled false
shrinkResources false
signingConfig signingConfigs.debug
}
}
lintOptions {
disable 'MissingTranslation'
abortOnError false
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
}
dependencies {
compile 'com.android.support:design:25.2.0'
compile 'com.android.support:recyclerview-v7:25.2.0'
compile 'org.jsoup:jsoup:1.10.2'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.soundcloud.android:android-crop:1.0.1@aar'
compile 'com.getkeepsafe.taptargetview:taptargetview:1.8.0'
compile 'com.squareup:seismic:1.0.1'<<<<<<<<<<<<<<<<<<<< I need to hide this
compile 'com.android.volley:volley:1.0.0'<<<<<<<<<<<<<<< I need to hide this
compile project(':mylibrary')
}
apply插件:“com.android.application”
安卓{
编译DK25版
buildToolsVersion“25.0.2”
默认配置{
第15版
targetSdkVersion 25
版本代码108
版本名称“3.1”
}
签名配置{
调试{
storeFile文件(“debug.jks”)
storePassword“开发”
keyAlias“开发”
密钥密码“开发”
}
}
建筑类型{
释放{
minifyEnabled false
收缩资源是错误的
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard rules.pro'
}
调试{
applicationIdSuffix“.debug”
minifyEnabled false
收缩资源是错误的
signingConfig signingConfigs.debug
}
}
林特选项{
禁用“MissingTranslation”
异常错误
}
所有项目{
存储库{
jcenter()
maven{url“https://jitpack.io" }
}
}
}
依赖关系{
编译'com.android.support:design:25.2.0'
编译'com.android.support:recyclerview-v7:25.2.0'
编译“org.jsoup:jsoup:1.10.2”
编译'com.davemorrissey.labs:子采样比例图像视图:3.6.0'
编译'com.nostra13.universalimageloader:universalimageloader:1.9.5'
编译'com.soundcloud.android:android-crop:1.0。1@aar'
编译'com.getkeepsafe.taptargetview:taptargetview:1.8.0'
编译'com.squareup:seismic:1.0.1'您可以删除这一行…但是如果用户删除这一行,应用程序将找不到截取库并将崩溃。您已经完全阅读了吗?我现在已经阅读了。感谢您的帮助