前提・実現したいこと
Android StudioにてFlutterアプリを作成中、エラーが起きたので、その対処として"Android X migration"をするように書いてあったのですが、Refactoring Previewが見つかりません。
発生している問題・エラーメッセージ
Dart
1D8: Program type already present: io.flutter.BuildConfig 2com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: 3Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes. 4Program type already present: io.flutter.BuildConfig 5 at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:131) 6 at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:118) 7 at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:102) 8 at com.android.build.gradle.internal.tasks.DexMergingTaskRunnable.run(DexMergingTask.kt:444) 9 at com.android.build.gradle.internal.tasks.Workers$ActionFacade.run(Workers.kt:335) 10 at org.gradle.workers.internal.AdapterWorkAction.execute(AdapterWorkAction.java:50) 11 at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:47) 12 at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1$1.create(NoIsolationWorkerFactory.java:65) 13 at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1$1.create(NoIsolationWorkerFactory.java:61) 14 at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:98) 15 at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.execute(NoIsolationWorkerFactory.java:61) 16 at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44) 17 at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41) 18 at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416) 19 at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406) 20 at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165) 21 at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250) 22 at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158) 23 at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102) 24 at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36) 25 at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41) 26 at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:56) 27 at org.gradle.workers.internal.DefaultWorkerExecutor$3.call(DefaultWorkerExecutor.java:215) 28 at org.gradle.workers.internal.DefaultWorkerExecutor$3.call(DefaultWorkerExecutor.java:210) 29 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 30 at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:215) 31 at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164) 32 at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:131) 33 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 34 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 35 at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) 36 at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) 37 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 38 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 39 at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) 40 at java.lang.Thread.run(Thread.java:748) 41Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete 42 at com.android.tools.r8.utils.t.a(:55) 43 at com.android.tools.r8.D8.run(:11) 44 at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:116) 45 ... 34 more 46Caused by: com.android.tools.r8.utils.AbortException: Error: Program type already present: io.flutter.BuildConfig 47 at com.android.tools.r8.utils.Reporter.a(:21) 48 at com.android.tools.r8.utils.Reporter.a(:7) 49 at com.android.tools.r8.utils.t.a(:36) 50 ... 36 more 51 52 53FAILURE: Build failed with an exception. 54 55* What went wrong: 56Execution failed for task ':app:mergeExtDexDebug'. 57> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade 58 > com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: 59 Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes. 60 Program type already present: io.flutter.BuildConfig 61 62* Try: 63Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. 64 65* Get more help at https://help.gradle.org 66 67BUILD FAILED in 15s 68[!] The shrinker may have failed to optimize the Java bytecode. 69To disable the shrinker, pass the `--no-shrink` flag to this command. 70To learn more, see: https://developer.android.com/studio/build/shrink-code 71Exception: Gradle task assembleDebug failed with exit code 1 72
参考にしている解決方法
下記のリンク先にある、7番 : The refactoring preview shows the list of changes. Finally, click Do Refactor:
この refactoring previewがどこに表示されてるかが明記されておらず、先に進めません。
補足情報(FW/ツールのバージョンなど)
先月にFlutter, Android共に最新版にしてから、エラーばかりで先に進めません。。。
MacOS Mojaveです。
回答1件
あなたの回答
tips
プレビュー