Если вышеупомянутый файл build.gradle завершен, то я считаю, что он не завершен. Файл build.gradle вашей библиотеки должен выглядеть примерно так:
apply plugin: 'com.android.library'
android {
compileSdkVersion 27
defaultConfig {
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:percent:27.1.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
}
allprojects {
repositories {
maven { url "https://jitpack.io" }
maven {
url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases'
}
}
}
, а если вы используете google services
, включите также нижние строки в конце файла:
apply plugin: 'com.google.gms.google-services'