アプリのGradleをビルドしようとしていますが、ビルドが失敗します
この問題に関して他のいくつかの質問を見回しましたが、解決できませんでした。また、私はgradleビルドツールのバージョンを変更して、別のlibや問題を解決するために管理できなかったいくつかのものを追加しようとしました。
プロジェクトレベルのbuild.gradle
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.Android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.3.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
アプリレベルのbuild.gradle
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.Android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
Android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.Android.com/studio/build/application-id.html).
applicationId "com.example.app"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "Android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
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'
implementation 'com.Android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.google.firebase:firebase-firestore:20.2.0'
}
apply plugin: 'com.google.gms.google-services'
Gradle --stacktraceを使用した後、次のエラーが発生します。
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\Development\Projects\MyProjects\app\Android\app\build.gradle' line: 24
* What went wrong:
A problem occurred evaluating project ':app'.
> ASCII
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating project ':app'.
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.Java:92)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$2.run(DefaultScriptPluginFactory.Java:204)
at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.Java:77)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.Java:209)
at org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.Java:61)
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.BuildOperationScriptPlugin.apply(BuildOperationScriptPlugin.Java:58)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.Java:41)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.Java:26)
at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.Java:34)
at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.Java:64)
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:667)
at org.gradle.api.internal.project.DefaultProject.evaluationDependsOn(DefaultProject.Java:747)
at org.gradle.api.internal.project.DefaultProject.evaluationDependsOn(DefaultProject.Java:739)
at org.gradle.api.Project$evaluationDependsOn.call(Unknown Source)
at build_4s2wu7zh7cf5gkrqlj5jziodv$_run_closure3.doCall(D:\Development\Projects\MyProjects\app\Android\build.gradle:25)
at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.Java:71)
at org.gradle.util.ConfigureUtil.configureTarget(ConfigureUtil.Java:160)
at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.Java:106)
at org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator$3.run(BuildOperationCrossProjectConfigurator.Java:100)
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.api.internal.project.BuildOperationCrossProjectConfigurator.runProjectConfigureClosure(BuildOperationCrossProjectConfigurator.Java:96)
at org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator.access$400(BuildOperationCrossProjectConfigurator.Java:31)
at org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator$1.doRunProjectConfigure(BuildOperationCrossProjectConfigurator.Java:81)
at org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator$BlockConfigureBuildOperation.run(BuildOperationCrossProjectConfigurator.Java:144)
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.api.internal.project.BuildOperationCrossProjectConfigurator.runBlockConfigureClosure(BuildOperationCrossProjectConfigurator.Java:78)
at org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator.subprojects(BuildOperationCrossProjectConfigurator.Java:53)
at org.gradle.api.internal.project.DefaultProject.subprojects(DefaultProject.Java:1119)
at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.Java:479)
at org.gradle.internal.metaobject.BeanDynamicObject.tryInvokeMethod(BeanDynamicObject.Java:191)
at org.gradle.internal.metaobject.CompositeDynamicObject.tryInvokeMethod(CompositeDynamicObject.Java:98)
at org.gradle.internal.metaobject.MixInClosurePropertiesAsMethodsDynamicObject.tryInvokeMethod(MixInClosurePropertiesAsMethodsDynamicObject.Java:30)
at org.gradle.groovy.scripts.BasicScript$ScriptDynamicObject.tryInvokeMethod(BasicScript.Java:134)
at org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.Java:160)
at org.gradle.groovy.scripts.BasicScript.invokeMethod(BasicScript.Java:83)
at build_4s2wu7zh7cf5gkrqlj5jziodv.run(D:\Development\Projects\MyProjects\app\Android\build.gradle:24)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.Java:90)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$2.run(DefaultScriptPluginFactory.Java:204)
at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.Java:77)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.Java:209)
at org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.Java:61)
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.BuildOperationScriptPlugin.apply(BuildOperationScriptPlugin.Java:58)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.Java:41)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.Java:26)
at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.Java:34)
at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.Java:64)
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:667)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.Java:136)
at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.Java:35)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.Java:60)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.Java:38)
at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuild.run(DefaultGradleLauncher.Java:261)
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:173)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.Java:132)
at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.Java:115)
at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.Java:78)
at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.Java:75)
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.run(GradleBuildController.Java:75)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.Java:28)
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:49)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.Java:32)
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:64)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.Java:29)
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 org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.Java:55)
Caused by: Java.lang.NoSuchFieldError: ASCII
at com.Android.build.gradle.BasePlugin.checkPathForErrors(BasePlugin.Java:1006)
at com.Android.build.gradle.BasePlugin.apply(BasePlugin.Java:261)
at com.Android.build.gradle.AbstractAppPlugin.apply(AbstractAppPlugin.Java:122)
at com.Android.build.gradle.AppPlugin.apply(AppPlugin.Java:43)
at com.Android.build.gradle.AppPlugin.apply(AppPlugin.Java:35)
at org.gradle.api.internal.plugins.ImperativeOnlyPluginTarget.applyImperative(ImperativeOnlyPluginTarget.Java:42)
at org.gradle.api.internal.plugins.RuleBasedPluginTarget.applyImperative(RuleBasedPluginTarget.Java:50)
at org.gradle.api.internal.plugins.DefaultPluginManager.addPlugin(DefaultPluginManager.Java:164)
at org.gradle.api.internal.plugins.DefaultPluginManager.access$200(DefaultPluginManager.Java:47)
at org.gradle.api.internal.plugins.DefaultPluginManager$AddPluginBuildOperation.run(DefaultPluginManager.Java:252)
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.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.Java:144)
at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.Java:125)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyType(DefaultObjectConfigurationAction.Java:120)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.Java:38)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.Java:86)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.Java:143)
at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.Java:46)
at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.Java:34)
at org.gradle.api.Script$apply$0.callCurrent(Unknown Source)
at build_38z6bfg6sklosvddu68v2kav9.run(D:\Development\Projects\MyProjects\app\Android\app\build.gradle:24)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.Java:90)
... 146 more
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
Gradle --infoを実行した後
Initialized native services in: C:\Users\Alon\.gradle\native
Found daemon DaemonInfo{pid=9132, address=[1188a464-723f-4e03-8889-a8aac56f1b3d port:50296, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Idle, lastBusy=1564299092334, context=DefaultDaemonContext[uid=1fefa30a-a771-48fb-bc97-9b85efee7704,javaHome=C:\Program Files\Java\jdk1.8.0_191,daemonRegistryDir=C:\Users\Alon\.gradle\daemon,pid=9132,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]} however its context does not match the desired criteria.
At least one daemon option is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files\Java\jdk1.8.0_191,daemonRegistryDir=C:\Users\Alon\.gradle\daemon,pid=4300,idleTimeout=null,daemonOpts=-Xmx1536M,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=1fefa30a-a771-48fb-bc97-9b85efee7704,javaHome=C:\Program Files\Java\jdk1.8.0_191,daemonRegistryDir=C:\Users\Alon\.gradle\daemon,pid=9132,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Looking for a different daemon...
The client will now receive all logging from the daemon (pid: 5312). The daemon log file: C:\Users\Alon\.gradle\daemon\4.6\daemon-5312.out.log
Starting 12th build in daemon [uptime: 39 mins 49.473 secs, performance: 100%, no major garbage collections]
Using 4 worker leases.
Starting Build
Settings evaluated using settings file 'D:\Development\Projects\MyProjects\app\Android\settings.gradle'.
Projects loaded. Root project using build file 'D:\Development\Projects\MyProjects\app\Android\build.gradle'.
Included projects: [root project 'Android', project ':app', project ':cloud_firestore', project ':firebase_core']
Evaluating root project 'Android' using build file 'D:\Development\Projects\MyProjects\app\Android\build.gradle'.
Evaluating project ':app' using build file 'D:\Development\Projects\MyProjects\app\Android\app\build.gradle'.
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\Development\Projects\MyProjects\app\Android\app\build.gradle' line: 24
* What went wrong:
A problem occurred evaluating project ':app'.
> ASCII
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
VCS Checkout Cache (D:\Development\Projects\MyProjects\app\Android\.gradle\vcsWorkingDirs) has not been cleaned up in 0 days
この問題を解決する方法を知っていますか?
それでも問題が解決しない場合は、Android StudioのSDKツールでGoogle Play開発者サービスが有効になっていることを確認してください。
Google-servicesをclasspath 'com.google.gms:google-services:4.3.0'
からclasspath 'com.google.gms:google-services:4.2.0'
に変更した後もエラーが発生しました。
Google Play開発者サービスを有効にした後、エラーが修正されました。
Project/build.gradleファイルを次のように変更しました:
// ...
dependencies {
classpath 'com.Android.tools.build:gradle:3.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.2'
// ...
}
ここでは、私のプロジェクトは"$kotlin_version"
に依存するkotlin-gradle-pluginを使用しています。また、Android GradleプラグインはKotlin Gradleプラグインバージョン1.3.0以降のみをサポートしています。そのため、同じ "build.gradle"ファイルでkotlin_versionの値を変更しました。
ただ変える
ext.kotlin_version = '1.2.71'
に
ext.kotlin_version = '1.3.0'
また、"Android/gradle/wrapper/gradle-wrapper.properties"ファイルに移動して、次のように変更する必要があります。
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.Zip
次に、「flutter clean」を実行してから、「flutter run」コマンドを実行します。それは完全に動作します!