App添加usercenter库依赖时报错
来源:2-3 模块化实战-动态加载模块类型

慕标2152332
2018-05-17
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :usercenter.
Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve project :usercenter.
Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve project :usercenter.
Open File
Show Details
Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve project :usercenter.
Open File
Show Details
Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve project :usercenter.
Open File
Show Details
这是UserCenter的Biuld.gradle if (isUserModule.toBoolean()) { apply plugin: 'com.android.library' } else { apply plugin: 'com.android.application' } apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 27 defaultConfig { minSdkVersion 15 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } sourceSets { main { if (isUserModule.toBoolean()) { manifest.srcFile 'src/main/release/AndroidManifest.xml' java{ exclude 'debug/**' } } else { manifest.srcFile 'src/main/debug/AndroidManifest.xml' } } } } dependencies { implementation project(':Provider') implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" 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' } 这是app的Biuld.gradle apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 27 defaultConfig { applicationId "com.shoping.wbs.wbsshoping" minSdkVersion 15 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.0' 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 project(':Provider') implementation project(':UserCenter') }
写回答
1回答
-
雷宇
2018-05-17
确认一下大小写,如有问题,工程结构和build.gradle截图发出来看一下
00
相似问题