Этот проект состоит из трех модулей (app, datecs e volley).Модуль datecs
является интерфейсом между библиотекой libs/com.datecs.api.jar
.Проблема в том, что библиотеки классов / пакетов не видны в модуле приложения.
Вот файлы gradle:
project.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
app.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
allprojects {
repositories {
google()
jcenter()
}
}
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
dependencies {
implementation files('libs/gson-2.3.1.jar')
implementation project(':volley')
implementation 'com.android.support:support-v4:21.0.3'
implementation 'com.android.support:appcompat-v7:21.0.3'
implementation project(':datecs')
}
datecs.gradle
apply plugin: 'com.android.library'
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
android {
compileSdkVersion 21
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 16
targetSdkVersion 21
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:support-v4:21.0.3'
implementation 'com.android.support:appcompat-v7:21.0.3'
testImplementation 'junit:junit:4.12'
implementation files('libs/com.datecs.api.jar')
}
allprojects {
repositories {
google()
jcenter()
}
}
Как сделать библиотечные классы доступными вмодуль приложения?