代码之家  ›  专栏  ›  技术社区  ›  Sahil

android build.gradle同步失败,NoSuchFielderRor:for编译

  •  0
  • Sahil  · 技术社区  · 6 年前

    我面临着一个奇怪的问题,Gradle无法同步,返回时出现错误“for摷compile”。有关详细错误日志,请查看所附的屏幕截图。

    下面是我的build.gradle文件

    应用插件:“com.android.application” 应用插件:“Kotlin Android” 安卓{ 编译dkversion 26 默认配置{ applicationID“com.app.practice” Minsdk版本21 目标版本26 版本代码1 版本名“1.0” TestInstrumentRunner“android.support.test.runner.androidjunitrunner” } 构建类型{ 释放{ MinifyEnabled错误 proguardfiles getdefaultproguardfile('proguard-android.txt'),'proguard rules.pro' } } } 依赖项{ 实现文件树(dir:'libs',include:'*.jar']) 实现'com.android.support:appcompat-v7:26.0.0' 实现“com.android.support.constraint:constraint layout:1.1.2” 实现“com.android.support:design:26.0.0” “JUnit:JUnit:4.12”测试实施 Android测试实现'com.android.support.test:runner:1.0.2' android测试实施'com.android.support.test.espresso:espresso core:3.0.2' api“org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_版本” } 存储库{ 小牛脑() }

    生成渐变版本:类路径 'com.android.tools.build:gradle:3.0.0-alpha8',

    详细日志:

    org.gradle.api.projectconfigurationexception:配置项目“:app”时出现问题。
    在Org.Geal.Stutial.ProjeCyeCurrProjeTeValual.AddioDebug失败(LealCyeCurreProjeCufforal.Valua.java:94)
    在Org.Goel.Stutial.LeaveCyCurrPraceCeValual.NoTIFYORE评估(LealCeCyProjeCeValual.java:89)
    在Org.Geal.Stutial.ProjeCyeCurrProjeTealValual.doOp配置(LealCyCyProjeCealValual.java:70)
    在Org.Goel.Story.Projial.LealCeCyProjeCeValual.Access 100美元(LealCyCyProjCeTeValual.java:34)
    在Org.Goel.Sturial.Projial.LealCeCyProjCeTeValue$CortualProjk.Run(LealCyCyProjCeTeValual.java:110)
    在Org.Goel.Prime.DeBuffBudioObjtualExtExtuutor $ RunnabeBueDeLoopEngtualWork.Exc执行(Debug ToBuffOptualExtutor.java:336)
    在Org.Goel.Prime.DeBuffBudioObjtualExtExtuutor $ RunnabeBueDeLoopEngtualWork.Exc执行(Debug ToBuffOptualExtutor.java:328)
    在Org.Goel.Prime.Debug ToBuffOptualExtor中执行(Debug ToBuffOptualExtutor.java:199)
    在Org.Goel.Prime.DeFuffBudioOptualExctuuor.Run(Debug ToBuffOptualExtutor.java:110)
    在Org.Goel.Sturial.Projial.CurryCyCurrPraceCeValual.Exalk(LealCyCyProjCeTeValual.java:50)
    在Org.Goel.App.No.Project .Debug项目Projt(Debug项目Projava. 666)
    在Org.Goel.App.No.Project .Debug项目Projt(Debug项目Projava. 135)
    在Org.Geord.Realth.TaskPasePortCeValual.St配置(TaskPasePortCeValual.java:35)
    在Org.Geld.Sturtual.TaskPasePrimeCeValual.CortEnguleAdvices(TaskPasePrimeCeValual.java:62)
    在Org.Goel.Story.Debug构建Buffer-Engor.配置(Debug构建Buffel.java:38)
    在Org.Gealle。初始化。Debug TealLeLaunung$CortualBuff.Run(Debug TealLelaLunChel.java:249)
    在Org.Goel.Prime.DeBuffBudioObjtualExtExtuutor $ RunnabeBueDeLoopEngtualWork.Exc执行(Debug ToBuffOptualExtutor.java:336)
    在Org.Goel.Prime.DeBuffBudioObjtualExtExtuutor $ RunnabeBueDeLoopEngtualWork.Exc执行(Debug ToBuffOptualExtutor.java:328)
    在Org.Goel.Prime.Debug ToBuffOptualExtor中执行(Debug ToBuffOptualExtutor.java:199)
    在Org.Goel.Prime.DeFuffBudioOptualExctuuor.Run(Debug ToBuffOptualExtutor.java:110)
    在Org.GealL.Stimult.Debug ToGrLeLaununChel.CuffueBug(Debug TealLelaLunChel.java:167)
    在Org.Gealle。初始化。Debug TealLeLaununChel.DoBuudForm(Debug TealLeLaununChel.java:126)
    在Org.GooList.Debug TraseLeLelaunChel.GETCortualDeBug(Debug TealLelaLunChel.java:104)
    在.org .Goel.Goo.Copaso.DealLeBugDeCube 2美元.调用(GradleBuildController .java:87)
    在.org .Goel.Goo.Copaso.DealLeBugDeCube 2美元.调用(GradleBuildController .java:84)
    在Org.GooLe.DeWorkWorkLeSeraseService。
    在Org.Goelle内部调用.GraveLeabdDealth.DoBug(GeaveLeaveDealth.Java:100)
    在Org.Goelle内部调用.GealLeBugDealCort.配置(GealeLeaveDealCorp.java:84)
    在Org.Goeld.Engor.Idval.Serv.clitPortVoDug ActudiActualRun.Run(Cclipse PosivDeBuffActoRun.java:64)
    在Org.Goel.Adv.ChaneBug ActudiaRun.Run(ChaneBug ActudiActhRun.java:35)
    在Org.Goel.Adv.ChaneBug ActudiaRun.Run(ChaneBug ActudiActhRun.java:35)
    在Org.Goeld.Engulo.Idvald.ValualTePugActudiActualRun.Run(ValueActudiActualRun.java:32)
    在Org.Goel.Real.RunasBudioObjtudioBuffAdgActudioRuns$ 1运行(RunasBudioDealPosialActudiaActoRun.java:43)
    在Org.Goel.Prime.DeBuffBudioObjtualExtExtuutor $ RunnabeBueDeLoopEngtualWork.Exc执行(Debug ToBuffOptualExtutor.java:336)
    在Org.Goel.Prime.DeBuffBudioObjtualExtExtuutor $ RunnabeBueDeLoopEngtualWork.Exc执行(Debug ToBuffOptualExtutor.java:328)
    在Org.Goel.Prime.Debug ToBuffOptualExtor中执行(Debug ToBuffOptualExtutor.java:199)
    在Org.Goel.Prime.DeFuffBudioOptualExctuuor.Run(Debug ToBuffOptualExtutor.java:110)
    在Org.Goel.Rex.RunasBudioOptudioActudioRun.Run(RunasBudioObjtudioActudioRun.java:40)
    在Org.Goeld.Corn.Posial.PuxBabuBudiActoRun.Run.Run(订阅BubBueBuffActoRun.java:51)
    在Org.Geld.Actudio.Exc.BuffeldBudieActudieExuter .Ex执行(in BuffeldDeActudiExuuth.java:47)
    在Org.Geld.Actudio.Exc.BuffeldBudieActudieExuter .Ex执行(in BuffeldDeActudiExuuth.java:30)
    在Org.Goeld.Exc.BueDeTeSeCopeBudieActualExucUnter . Excel(BuffueTeeSeCopeBudieActudieExuuter .java:39)
    在Org.Goeld.Exc.BueDeTeSeCopeBudieActualExucUnter . Excel(BuffueTeeSeCopeBudieActudieExuuter .java:25)
    在Org.GooLe.Tooal.Neal.Services中。
    在Org.GooLe.Tooal.Neal.Services中。
    在Org.Goeld.Corn.PosivServices ServestEpUpBugDeActudiExcUnter执行(ServestEtPubIdgActudieExuuter .java:57)
    在Org.Goeld.Corn.PosivServices ServestEpUpBugDeActudiExcUnter执行(ServestEtPubIdgActudieExuuter .java:32)
    在Org.GooLe.Too.Ing.Primult.StReLead RealDeBuffActudieExuter。Excel(GraveRealBudieActudiExpUTER,Java:36)
    在Org.GooLe.Too.Ing.Primult.StReLead RealDeBuffActudieExuter。Excel(GraveRealBudieActudiExpUTER,Java:25)
    在Org.Goeld.Corn.IdvaldServices中。
    在Org.Goeld.Corn.IdvaldServices中。
    在Org.Goeld.Corn.Posial.StasePARAMSDSValueActualExcUnter .Excel(StasePARAMSDSValueActualExcExuter .java:69)
    在Org.Goeld.Corn.Posial.StasePARAMSDSValueActualExcUnter .Excel(StasePARAMSDSValueActualExcExuter .java:30)
    在Org.Goeld.Corn.Posial.StutsRealurureRePortActExcUnter .Excel(SeaSturnRuleRePortActhExcExuter .java:59)
    在Org.Goeld.Corn.Posial.StutsRealurureRePortActExcUnter .Excel(SeaSturnRuleRePortActhExcExuter .java:44)
    在Org.GooLe.Tooal.Neal.Posiv.StEngRoGGUnActualExcUnter .Ex执行(StEngRoGangActhExcExuter .java:45)
    在Org.GooLe.Tooal.Neal.Posiv.StEngRoGGUnActualExcUnter .Ex执行(StEngRoGangActhExcExuter .java:30)
    在Org.Goeld.Daimon。Server。Exc.ExuthTeaBudi.doBug(ExeExtudioBuff.java:67)
    在Org.Goeld.Daimon . Server . Exc. BuudCudidUn.Exctudio(BueDeCudidJavaNo.java:36)
    在Org.Goeld.Daimon .Server .API中. Daimon CudithExcDebug .继续(DaaMeMeaveDebug,Java:122)
    在Org.Goeld.Daimon。Server。Exc.WistorDeCornal.Exc执行(CaveForDeloCorn.java:37)
    在Org.Goeld.Daimon .Server .API中. Daimon CudithExcDebug .继续(DaaMeMeaveDebug,Java:122)
    在Org.Goeld.Daimon .Server .Exc.ReestEdPractLogLog.Excel(ReestEdTrimeLogLog.java:26)
    在Org.Goeld.Daimon .Server .API中. Daimon CudithExcDebug .继续(DaaMeMeaveDebug,Java:122)
    在Org.Goeld.Daimon . Server . Exc. ReestStestFIFSUnEndoDaimon . Excel(RealestStuffSimuleEndoDaimon . Java:34)
    在Org.Goeld.Daimon .Server .API中. Daimon CudithExcDebug .继续(DaaMeMeaveDebug,Java:122)
    在Org.Goeld.Daimon .Server .Exc.NordcliclitPin $ 2 .调用(OntdcliclitPort.java:74)
    在Org.Goeld.Daimon .Server .Exc.NordcliclitPin $ 2 .调用(OntdcliclitPort.java:72)
    在Org.Goel.U.S.Exper-Exchange(SWAPPER,Java:38)
    在Org.Goeld.Daimon .Server .Exc.NordcliclitPort.Ex执行(TorncliclitPort.java:72)
    在Org.Goeld.Daimon .Server .API中. Daimon CudithExcDebug .继续(DaaMeMeaveDebug,Java:122)
    在Org.Goeld.Daimon .Server .Exc.Logand ChestHealth.Exc执行(Logand ChestHealth.java:55)
    在Org.Goeld.Daimon .Server .API中. Daimon CudithExcDebug .继续(DaaMeMeaveDebug,Java:122)
    在Org.Goeld.DaveM.Serv.Exc.LogtoLInt.doBuw(LogoCiLo.java:62)
    在Org.Goeld.Daimon . Server . Exc. BuudCudidUn.Exctudio(BueDeCudidJavaNo.java:36)
    在Org.Goeld.Daimon .Server .API中. Daimon CudithExcDebug .继续(DaaMeMeaveDebug,Java:122)
    在Org.Goeld.Daimon . Server . Exc. SuffueBudidEndo.doBube(SudiuBudidEnguly.java:82)
    在Org.Goeld.Daimon . Server . Exc. BuudCudidUn.Exctudio(BueDeCudidJavaNo.java:36)
    在Org.Goeld.Daimon .Server .API中. Daimon CudithExcDebug .继续(DaaMeMeaveDebug,Java:122)
    在Org.Goeld.Daimon .Server .Exc.StaseBuffDeRebug中使用繁忙的1美元.运行(StestBurdReopdDeWord.Java: 50)
    在Org.Goeld.Daimon .Server .Daimon StistCoroCortAudio$ 1。运行(DaMon StisteCortActual.java:295)
    在Org.Goel.My.Curror.ExcExtorOrrors$Caskand ReordOrthReals.OnExc执行(ExtrutOrror.java:63)
    在Org.Goel.My.Curror.Excel中管理1美元.Run(MauleDeCortEutorIMP.java:46)
    在Java.UTI.Orth.TycRePoLeExtUnor。RunWork(TythPoLeExcel)。Java:1142)
    在Java.UTI.Orth.TycRePoLeExtor中$WorkWork.Run(TythPoLeExcel).java:617)
    在Org.Goel.Corn.ToReultForthyIMP$MultudithTraceRunnRel.Run(THealForthyIMP.java:55)
    在Java.Lang.Tr.Run(线程.java:745)中由Or.Gr.Leal.Neal.Enviv.ListEnnEndocIcExcExcExcor导致:通知项目评估监听器失败。
    在Org.Goel.No.Engest.ActudioTrack.Debug(AbdidioBaskTrace.java:86)
    在Org.Goel.No.Engor.广播调度$CorpItEffice .调度(广播调度. Java:324)
    在Org.Goel.No.Engor.广播调度$CorpItEffice .调度(广播调度. Java:234)
    在Org.Goel.No.Engult.ListNealsRelay.Debug(ListNealStudio.java:140)
    在Org.Goel.No.Engult.ListNealsRelay.Debug(ListNealStudio.java:37)
    在Org.Goel.PrimeDeaPraceAdvultPosigCudioVoCutoActualAdvors.NoCKE(PROXORDIQUCHAPTION.JAVA:93)
    位于com.sun.proxy.$proxy31.afterevaluate(未知源)
    在Org.Goel.Stutial.LeaveCyCurrPraceCeValual.NoTIFYORE评估(LealCeCyProjeCeValual.java:76)
    ……85更多原因:java.lang.nosuchfielderror:for compile
    在COM.Android .Build.Goel.No.Audio.ValuestAssiabase$Builder .Build(ValuestAsdiix.java:256)
    在COM.Android .Buff.GooL.Goel.No.ValuestMealth.createVariantDataForVariantType(ValuestMealth.java:825)
    在COM.Android .Buff.GooL.Goel.No.ValuestMealth.createVariantDataForProductFlavorsAndVariantType(ValuestMealth.java:1053)
    在COM.Android上。
    在COM.Android上。
    在COM.Android .Builder .Prime. THealRealth.Read(TyReal记录器. Java:81)
    在COM.Android .Bug .Goel.No.ValuestMealth.CREATEANDROIDTION(ValuestMealth.java:319)
    在COM.Android .Buff.Goo.Gracle .BasePuxin .lambda $ CurATANDROIDIDATH 5美元(BasePlugin .java:615)
    在COM.Android .Builder .Prime. THealRealth.Read(TyReal记录器. Java:81)
    在COM. Android .Bug .Goel.BasePuulin . CurATE ANDROID任务(BasePuxin . Java:610)
    在COM.Android .Buff.Goo.Gracle .BasePuxin .lambda $ NULL $ 3(BasePlugin .java:537)
    在COM.Android .Builder .Prime. THealRealth.Read(TyReal记录器. Java:81)
    在COM.Android .Buff.Goo.Gracle .BasePuxin。lambda $ CeaTeTeCK $ 4(BasePlugin .java:533)
    在Org.Goel.No.Enguly.CopyTracePrimeActoVoCoCortActoRel.Debug(广播调度.java:91)
    在Org.Goel.No.Enguly.CopyTracePrimeActoVoCoCortActoRel.Debug(广播调度.java:80)
    在Org.Goel.No.Engest.ActudioTrack.Debug(AbdidioBaskTrace.java:42)
    在Gr.Goel.G.Eng.Engor.广播调度$SuntLon Dealth.Debug(广播调度. Java:230)
    在Gr.Goel.G.Eng.Engor.广播调度$SuntLon Dealth.Debug(广播调度. Java:149)
    在Org.Goel.No.Engest.ActudioTopStay.Debug(Actudio BaskTrace.java:58)…92个以上
    gradle_sync_error

    下面是我的build.gradle文件

    apply plugin: 'com.android.application'
    apply plugin: 'kotlin-android'
    
    android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.app.practice"
        minSdkVersion 21
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    }
    
     dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:26.0.0'
      implementation 'com.android.support.constraint:constraint-layout:1.1.2'
      implementation 'com.android.support:design:26.0.0'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    }
    repositories {
      mavenCentral()
    }
    

    生成渐变版本:类路径 'com.android.tools.build:gradle:3.0.0-alpha8'

    详细日志:

    org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
    at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:94)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:89)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:70)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.access$100(LifecycleProjectEvaluator.java:34)
    at org.gradle.configuration.project.LifecycleProjectEvaluator$ConfigureProject.run(LifecycleProjectEvaluator.java:110)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:50)
    at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:666)
    at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:135)
    at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35)
    at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:62)
    at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:38)
    at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuild.run(DefaultGradleLauncher.java:249)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
    at org.gradle.initialization.DefaultGradleLauncher.configureBuild(DefaultGradleLauncher.java:167)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:126)
    at org.gradle.initialization.DefaultGradleLauncher.getConfiguredBuild(DefaultGradleLauncher.java:104)
    at org.gradle.internal.invocation.GradleBuildController$2.call(GradleBuildController.java:87)
    at org.gradle.internal.invocation.GradleBuildController$2.call(GradleBuildController.java:84)
    at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152)
    at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:100)
    at org.gradle.internal.invocation.GradleBuildController.configure(GradleBuildController.java:84)
    at org.gradle.tooling.internal.provider.runner.ClientProvidedBuildActionRunner.run(ClientProvidedBuildActionRunner.java:64)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$1.run(RunAsBuildOperationBuildActionRunner.java:43)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:40)
    at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:47)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
    at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39)
    at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25)
    at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80)
    at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53)
    at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:57)
    at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:32)
    at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
    at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
    at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
    at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:69)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:30)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:45)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
    at org.gradle.util.Swapper.swap(Swapper.java:38)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    at java.lang.Thread.run(Thread.java:745) Caused by: org.gradle.internal.event.ListenerNotificationException: Failed to notify project evaluation listener.
    at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:86)
    at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324)
    at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234)
    at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140)
    at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
    at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
    at com.sun.proxy.$Proxy31.afterEvaluate(Unknown Source)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:76)
    ... 85 more Caused by: java.lang.NoSuchFieldError: FOR_COMPILE
    at com.android.build.gradle.internal.dependency.VariantDependencies$Builder.build(VariantDependencies.java:256)
    at com.android.build.gradle.internal.VariantManager.createVariantDataForVariantType(VariantManager.java:825)
    at com.android.build.gradle.internal.VariantManager.createVariantDataForProductFlavorsAndVariantType(VariantManager.java:1053)
    at com.android.build.gradle.internal.VariantManager.createVariantDataForProductFlavors(VariantManager.java:986)
    at com.android.build.gradle.internal.VariantManager.populateVariantDataList(VariantManager.java:676)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
    at com.android.build.gradle.internal.VariantManager.createAndroidTasks(VariantManager.java:319)
    at com.android.build.gradle.BasePlugin.lambda$createAndroidTasks$5(BasePlugin.java:615)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
    at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:610)
    at com.android.build.gradle.BasePlugin.lambda$null$3(BasePlugin.java:537)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
    at com.android.build.gradle.BasePlugin.lambda$createTasks$4(BasePlugin.java:533)
    at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:91)
    at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:80)
    at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
    at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230)
    at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149)
    at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)  ... 92 more
    
    3 回复  |  直到 6 年前
        1
  •  2
  •   Loong_T    6 年前

    将Android Gradle构建工具更新到3.2.0-beta02版本并再次同步,这可能会有所帮助。

    classpath 'com.android.tools.build:gradle:3.2.0-beta02'

        2
  •  1
  •   Rugved Marathe    6 年前

    1)转到文件->使缓存无效/重新启动

    2)关闭Android Studio

    3)重命名/删除用户主目录中的.gradle文件夹

    4)重启Android Studio(下载Gradle元数据和数据)

    渐变构建成功

    重建项目。完成。

    你试过这个吗?

        3
  •  0
  •   Leet    6 年前

    我以前也有过类似的问题,虽然我没有使用Kotlin。我通过注释出约束布局库来解决它