我试图在新的 Android Studio 3.0金丝雀2中打开我现有的项目。我根据 指示更新了 Gradle,更改了依赖配置的名称,但是我继续得到下一个错误:
Unable to resolve dependency for ':app@productionRelease/compileClasspath':
Could not resolve project : abChat.
在另一个窗口:
Error:Could not resolve all dependencies for configuration ':bankOK:betaNewApiInnerTestRuntimeClasspath'.
> Unable to find a matching configuration in project :abChat:
- Configuration 'debugApiElements':
- Required apiLvl 'ProductFlavorAttr{name=newApi}' but no value provided.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'AndroidTypeAttr{name=Aar}' and found compatible value 'AndroidTypeAttr{name=Aar}'.
- Required com.android.build.gradle.internal.dependency.BuildTypeAttr 'BuildTypeAttr{name=innerTest}' and found incompatible value 'BuildTypeAttr{name=debug}'.
- Found com.android.build.gradle.internal.dependency.VariantAttr 'VariantAttr{name=debug}' but wasn't required.
- Required org.gradle.api.attributes.Usage 'for runtime' and found incompatible value 'for compile'.
- Required releaseType 'ProductFlavorAttr{name=beta}' but no value provided.
- Configuration 'debugRuntimeElements':
- Required apiLvl 'ProductFlavorAttr{name=newApi}' but no value provided.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'AndroidTypeAttr{name=Aar}' and found compatible value 'AndroidTypeAttr{name=Aar}'.
- Required com.android.build.gradle.internal.dependency.BuildTypeAttr 'BuildTypeAttr{name=innerTest}' and found incompatible value 'BuildTypeAttr{name=debug}'.
- Found com.android.build.gradle.internal.dependency.VariantAttr 'VariantAttr{name=debug}' but wasn't required.
- Required org.gradle.api.attributes.Usage 'for runtime' and found compatible value 'for runtime'.
- Required releaseType 'ProductFlavorAttr{name=beta}' but no value provided.
- Configuration 'releaseApiElements':
- Required apiLvl 'ProductFlavorAttr{name=newApi}' but no value provided.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'AndroidTypeAttr{name=Aar}' and found compatible value 'AndroidTypeAttr{name=Aar}'.
- Required com.android.build.gradle.internal.dependency.BuildTypeAttr 'BuildTypeAttr{name=innerTest}' and found incompatible value 'BuildTypeAttr{name=release}'.
- Found com.android.build.gradle.internal.dependency.VariantAttr 'VariantAttr{name=release}' but wasn't required.
- Required org.gradle.api.attributes.Usage 'for runtime' and found incompatible value 'for compile'.
- Required releaseType 'ProductFlavorAttr{name=beta}' but no value provided.
- Configuration 'releaseRuntimeElements':
- Required apiLvl 'ProductFlavorAttr{name=newApi}' but no value provided.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'AndroidTypeAttr{name=Aar}' and found compatible value 'AndroidTypeAttr{name=Aar}'.
- Required com.android.build.gradle.internal.dependency.BuildTypeAttr 'BuildTypeAttr{name=innerTest}' and found incompatible value 'BuildTypeAttr{name=release}'.
- Found com.android.build.gradle.internal.dependency.VariantAttr 'VariantAttr{name=release}' but wasn't required.
- Required org.gradle.api.attributes.Usage 'for runtime' and found compatible value 'for runtime'.
- Required releaseType 'ProductFlavorAttr{name=beta}' but no value provided.
下面是我们的构建类型和风格:
buildTypes {
release {
//...
}
debug {
//...
}
innerTest {
//...
}
}
flavorDimensions "releaseType", "apiLvl"
productFlavors {
prod {
dimension "releaseType"
//...
}
beta {
dimension "releaseType"
//...
}
oldApi {
dimension "apiLvl"
//...
}
newApi {
dimension "apiLvl"
//...
}
}
此外,我们还有一个名为“ abChat”的库模块,没有任何风味。 我可以尝试做什么来解决这个问题?