Closed Yanqilong closed 6 years ago
现在有两个工程,一个主工程 App 和一个子工程 welcome
主工程 gradle.properties 配置如下:
org.gradle.jvmargs=-Xmx1536m isRunAlone=true debugComponent=welcome compileComponent=com.newseax.welcome:welcome
子工程 gradle.properties 配置如下: isRunAlone=false debugComponent= compileComponent=
那么子工程运行 assembleRelease 打包时会报下面这个错误
What went wrong: Could not resolve all files for configuration ':app:releaseCompileClasspath'.
Could not find com.newseax.welcome:welcome:. Searched in the following locations: file:/Users/yanqilong/Library/Android/sdk/extras/m2repository/com/newseax/welcome/welcome//welcome-.pom file:/Users/yanqilong/Library/Android/sdk/extras/m2repository/com/newseax/welcome/welcome//welcome-.jar file:/Users/yanqilong/Library/Android/sdk/extras/google/m2repository/com/newseax/welcome/welcome//welcome-.pom file:/Users/yanqilong/Library/Android/sdk/extras/google/m2repository/com/newseax/welcome/welcome//welcome-.jar file:/Users/yanqilong/Library/Android/sdk/extras/android/m2repository/com/newseax/welcome/welcome//welcome-.pom file:/Users/yanqilong/Library/Android/sdk/extras/android/m2repository/com/newseax/welcome/welcome//welcome-.jar file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/newseax/welcome/welcome//welcome-.pom file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/newseax/welcome/welcome//welcome-.jar https://jcenter.bintray.com/com/newseax/welcome/welcome//welcome-.pom https://jcenter.bintray.com/com/newseax/welcome/welcome//welcome-.jar https://dl.google.com/dl/android/maven2/com/newseax/welcome/welcome//welcome-.pom https://dl.google.com/dl/android/maven2/com/newseax/welcome/welcome//welcome-.jar https://repo1.maven.org/maven2/com/newseax/welcome/welcome//welcome-.pom https://repo1.maven.org/maven2/com/newseax/welcome/welcome//welcome-.jar https://jitpack.io/com/newseax/welcome/welcome//welcome-.pom https://jitpack.io/com/newseax/welcome/welcome//welcome-.jar file:/Users/yanqilong/Workspaces/androidnewseaxarchitecture/componentrelease/welcome-.jar file:/Users/yanqilong/Workspaces/androidnewseaxarchitecture/componentrelease/welcome.jar Required by: project :app
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 2m 41s
现在修改下主工程 gradle.properties 配置, 将 compileComponent 设置为模块名称,即compile 引入,那么不会报错,检查过了 componentrelease 目录下是有 arr 文件的, 这是啥原因啊? org.gradle.jvmargs=-Xmx1536m isRunAlone=true debugComponent=welcome compileComponent=welcome
现在已经不支持componenrelease目录了,请看https://github.com/luojilab/DDComponentForAndroid/releases/tag/build-gradle1.1.0, 目前支持compileComponent=readercomponent和compileComponent=com.luojilab.reader:readercomponent:1.0.0两种语法
现在有两个工程,一个主工程 App 和一个子工程 welcome
主工程 gradle.properties 配置如下:
org.gradle.jvmargs=-Xmx1536m isRunAlone=true debugComponent=welcome compileComponent=com.newseax.welcome:welcome
子工程 gradle.properties 配置如下: isRunAlone=false debugComponent= compileComponent=
那么子工程运行 assembleRelease 打包时会报下面这个错误
What went wrong: Could not resolve all files for configuration ':app:releaseCompileClasspath'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 2m 41s
现在修改下主工程 gradle.properties 配置, 将 compileComponent 设置为模块名称,即compile 引入,那么不会报错,检查过了 componentrelease 目录下是有 arr 文件的, 这是啥原因啊? org.gradle.jvmargs=-Xmx1536m isRunAlone=true debugComponent=welcome compileComponent=welcome