我写了一个图书馆myLib用途RemoteMessage从Firebase,应用程序本身也使用Firebase.
使用gradle 4.7.也见于4.4.1.
怎么解决?
project.gradle
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.3.0'
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
mavenLocal()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)
app.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.test.app"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
dexOptions {
preDexLibraries = false
jumboMode = false
javaMaxHeapSize …Run Code Online (Sandbox Code Playgroud) 我有一个多模块项目,我需要为我的 aar 创建一个模块。
这是 gradle 文件:
configurations.maybeCreate("default")
artifacts.add("default", file('my-aar-1.0.0.aar'))
Run Code Online (Sandbox Code Playgroud)
还有另一个模块可以实现这个工件。当我./gradlew build直接从 android studio 运行时工作正常,但在我的 CI 脚本中我遇到了这个错误:
Install Android SDK Platform-Tools (revision: 34.0.5) finished.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':features:app:buildProdBetaPreBundle'.
> Could not resolve all task dependencies for configuration
':features:app:prodBetaRuntimeClasspath'.
> Could not resolve project :myaar.
Required by:
project :app > project :module:secondmodule
> No matching configuration of project :myaar was found. The consumer was configured to …Run Code Online (Sandbox Code Playgroud)