3

我已经从 github 克隆了 zoomage 库并在我们的Android Studio 3.3 Canary 13版本中打开它,并且在使用升级的 gradle 插件版本进行了一些调整之后,我在构建项目时遇到了以下错误。哪位大神能指导一下,先谢谢了。

错误

配置 ':zoomage:debugApiElements' 解决后无法创建变体 'android-aidl'

错误的堆栈跟踪

org.gradle.api.ProjectConfigurationException:配置项目“:zoomage”时出现问题。在 org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:79) 在 org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:73) 在 org.gradle.configuration.project.LifecycleProjectEvaluator.access $400(LifecycleProjectEvaluator.java:54) at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate.run(LifecycleProjectEvaluator.java:200) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)在 org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker。

项目配置如下:

项目级 build.gradle

    // Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        mavenCentral()
        google()

        maven{
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0-alpha13'
        classpath "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.13.1"
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

plugins {
    id "com.jfrog.bintray" version "1.6"
    id "com.jfrog.artifactory" version "4.4.0"
}

allprojects {
    repositories {
        jcenter()
        google()
    }

    configurations.all {
        apply plugin: 'com.github.hierynomus.license'

        license {
            header rootProject.file('LICENSE_HEADER')
            exclude("**/ic_settings.xml")
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

ext {
    supportVersion = "28.0.0"
    compileVersion = 28
    targetVersion = 28
    buildToolsVersion = "28.0.3"
}

模块的 build.gradle

    apply plugin: 'com.android.application'

android {
    compileSdkVersion rootProject.ext.compileVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        applicationId "com.jsibbold.zoomage"
        minSdkVersion 16
        targetSdkVersion rootProject.ext.targetVersion
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    lintOptions {
        abortOnError false
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    testImplementation 'junit:junit:4.12'
    implementation "com.android.support:appcompat-v7:$rootProject.ext.supportVersion"
    implementation project(':zoomage')
}

gradle-wrapper.properties

#Sat Oct 13 13:29:40 PKT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
4

1 回答 1

0

一些库还不支持 gradle 3.3。降级 gradle 并等待该库的新版本。

于 2019-01-29T17:40:38.957 回答