私はAndroidプロジェクトを新しい実験的なgradleプラグインに移行しようとしています。私はthisページの指示に従った。私は必要なファイルを変更しましたが、プロジェクトをgradleファイルと同期しようとするとエラーが発生します。私app
フォルダ内の新しい実験的なgradleプラグインへのプロジェクトの移行
Error:Unable to load class 'com.android.build.gradle.managed.ProductFlavor_Impl'. Possible causes for this unexpected error include:
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
- Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network)
- The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem. Stop Gradle build processes (requires restart)
- Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
build.gradle
これと非常によく似ています、問題がどこにある
apply plugin: 'com.android.model.application'
apply plugin: 'maven'
repositories {
maven {
url = getBaseRepository()
credentials {
username = NEXUS_USERNAME
password = NEXUS_PASSWORD
}
}
mavenCentral()
}
def int CACHE_LIMIT = CACHE_CHANGING_MODULES_FOR_SECONDS.toInteger()
configurations.all {
resolutionStrategy.cacheChangingModulesFor CACHE_LIMIT, 'seconds'
}
model {
android {
compileSdkVersion = 23
buildToolsVersion = "23.0.0"
defaultConfig.with {
applicationId = "<myRealAppIdIsHere>"
minSdkVersion.apiLevel = 14
targetSdkVersion.apiLevel = 18
multiDexEnabled = true
}
}
android.buildTypes {
debug {
/*buildConfigField.with {
create() {
type = "boolean"
name = "DEBUG_BUILD"
value = rootProject.ext.debugBuild
}
}*/
}
release {
minifyEnabled = false
proguardFiles += 'proguard-rules.pro'
/*buildConfigField.with {
create() {
type = "boolean"
name = "DEBUG_BUILD"
value = rootProject.ext.releaseBuild
}
}*/
}
}
}
dependencies {
// my dependencies are here...
}
誰もが知っていますか?私は、エラーメッセージがProductFlavorについての問題が含まれている理由は、私のプロジェクトは何の味を持っていないので、私は私のプロジェクトをきれいにしようとした
UPDATE ...、知らない - クリーンは成功しませんでしたが、きれいな時のエラーメッセージ
Error:(10, 1) A problem occurred configuring project ':app'. Exception thrown while executing model rule: com.android.build.gradle.model.BaseComponentModelPlugin$Rules#createVariantData(org.gradle.model.ModelMap, org.gradle.model.ModelMap, com.android.build.gradle.internal.TaskManager) > afterEach() Could not resolve all dependencies for configuration ':app:_debugCompile'. Exception thrown while executing model rule: model.android Cannot set readonly property: minSdkVersion for class: com.android.build.gradle.managed.ProductFlavor_Impl
しかし、まだ私はそれを修正することはできません。場合、これは、プロジェクトの実際のファイルではありません
これは、マルチモジュールプロジェクトで発生する可能性があります。あなたのプロジェクトに複数のモジュールがありますか? –
同じ問題があります。私たちのプロジェクトは一つのモジュールを含んでいます。どうすればこの問題を解決できますか? –