Nach dem Upgrade auf Android Studio 1.2, ich bin immer den folgenden Fehler zu laden, wenn sie versuchen mein ProjektUnable Klasse OutputFileTask mit Android Studio 1.2 und 1.2.2 Gradle
Error:Unable to load class 'com.android.build.gradle.internal.tasks.OutputFileTask'. 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)
Das ist mein gradle Datei
zu synchronisierenapply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'maven-publish'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
repositories {
mavenCentral()
}
defaultConfig {
minSdkVersion 9
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
consumerProguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
checkReleaseBuilds false
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LGPL2.1'
}
}
dependencies {
compile 'com.android.support:support-v4:22.1.0'
compile 'com.android.support:appcompat-v7:22.1.0'
}
task sourceJar(type: Jar) {
classifier "source"
}
publishing {
publications {
repositories.maven {
url repo
credentials {
username user
password passwd
}
}
maven(MavenPublication) {
artifacts {
groupId 'com.android'
artifactId 'artefact-1'
version '1'
artifact artifactPath
}
}
}
}
}
Ich denke, es könnte noch eine andere Groß-API-Änderung geben, die bewirkt, dass die alten Sachen nicht mehr funktionieren.
Wie kann ich das Problem lösen, um mein Projekt erneut zu erstellen?
Versuchten, was die "Fehler", sagte? Versuchen Sie 'gradlew clean --refresh-dependencies' und' gradlew -stop'. –
Die letzte stabile Gradle Plugin Version ist 1.1.3. Benutze es. –
Auf AS 1.2 Ich konnte nicht mit Android Gradle Plugin 1.1.3 reproduzieren, aber mit 1.2 + – for3st