I am trying to open my existing project in new Android Studio 3.0 canary 2. I updated Gradle according to instructions, changed names for dependency configurations but I continue to get next error:
Unable to resolve dependency for ':app@productionRelease/compileClasspath':
Could not resolve project : abChat.
And in another window:
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.
Here are our build types and flavors:
buildTypes {
release {
//...
}
debug {
//...
}
innerTest {
//...
}
}
flavorDimensions "releaseType", "apiLvl"
productFlavors {
prod {
dimension "releaseType"
//...
}
beta {
dimension "releaseType"
//...
}
oldApi {
dimension "apiLvl"
//...
}
newApi {
dimension "apiLvl"
//...
}
}
Also, we have a library module named "abChat" without any flavors.
What can I try to do to solve the problem?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…