From 5e93550b2294df58f2da7540208a6b50ba6b4511 Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Wed, 25 Feb 2026 14:59:46 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E8=B7=AF=E5=BE=84=E8=A7=84=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.kotlin/errors/errors-1771998886119.log | 198 ++++++++++++++++++ .../home/presentation/pages/home_page.dart | 6 +- .../presentation/widgets/path_list_pages.dart | 160 +++++++++++++- 3 files changed, 354 insertions(+), 10 deletions(-) create mode 100644 android/.kotlin/errors/errors-1771998886119.log diff --git a/android/.kotlin/errors/errors-1771998886119.log b/android/.kotlin/errors/errors-1771998886119.log new file mode 100644 index 00000000..b4938596 --- /dev/null +++ b/android/.kotlin/errors/errors-1771998886119.log @@ -0,0 +1,198 @@ +kotlin version: 2.2.20 +error message: Daemon compilation failed: null +java.lang.Exception + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:69) + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:65) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemon(GradleKotlinCompilerWork.kt:240) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemonOrFallbackImpl(GradleKotlinCompilerWork.kt:159) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.run(GradleKotlinCompilerWork.kt:111) + at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction.execute(GradleCompilerRunnerWithWorkers.kt:74) + at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:66) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:62) + at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:62) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:210) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:205) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:67) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:60) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:167) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:60) + at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:54) + at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:59) + at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$0(DefaultWorkerExecutor.java:174) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:194) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.access$700(DefaultConditionalExecutionQueue.java:127) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner$1.run(DefaultConditionalExecutionQueue.java:169) + at org.gradle.internal.Factories$1.create(Factories.java:31) + at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:263) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:127) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:132) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:133) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) + at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) + at java.base/java.lang.Thread.run(Unknown Source) +Caused by: java.lang.AssertionError: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:218) + at org.jetbrains.kotlin.incremental.IncrementalCachesManager.close(IncrementalCachesManager.kt:55) + at kotlin.io.CloseableKt.closeFinally(Closeable.kt:46) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileNonIncrementally(IncrementalCompilerRunner.kt:293) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:128) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:684) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:94) + at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1810) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) + at java.base/java.lang.reflect.Method.invoke(Unknown Source) + at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.Transport.serviceCall(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) + ... 3 more +Caused by: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:205) + ... 22 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\flutter_webrtc-1.3.0\android\src\main\java\com\cloudwebrtc\webrtc\SimulcastVideoEncoderFactoryWrapper.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:33) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\flutter_webrtc-1.3.0\android\src\main\java\com\cloudwebrtc\webrtc\SimulcastVideoEncoderFactoryWrapper.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\flutter_webrtc-1.3.0\android\src\main\java\com\cloudwebrtc\webrtc\SimulcastVideoEncoderFactoryWrapper.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:33) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.incremental.storage.AppendableCollectionExternalizer.save(LazyStorage.kt:151) + at org.jetbrains.kotlin.incremental.storage.AppendableCollectionExternalizer.save(LazyStorage.kt:142) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\lookups: id-to-file.tab, file-to-id.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.LookupStorage.close(LookupStorage.kt:155) + ... 23 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\flutter_webrtc-1.3.0\android\src\main\java\com\cloudwebrtc\webrtc\SimulcastVideoEncoderFactoryWrapper.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.LegacyFileExternalizer.save(IdToFileMap.kt:51) + at org.jetbrains.kotlin.incremental.storage.LegacyFileExternalizer.save(IdToFileMap.kt:48) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\flutter_webrtc-1.3.0\android\src\main\java\com\cloudwebrtc\webrtc\SimulcastVideoEncoderFactoryWrapper.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\inputs: source-to-output.tab + ... 25 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\flutter_webrtc-1.3.0\android\src\main\java\com\cloudwebrtc\webrtc\SimulcastVideoEncoderFactoryWrapper.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + + diff --git a/lib/features/home/presentation/pages/home_page.dart b/lib/features/home/presentation/pages/home_page.dart index bfe4f9b1..74ae9315 100644 --- a/lib/features/home/presentation/pages/home_page.dart +++ b/lib/features/home/presentation/pages/home_page.dart @@ -17,8 +17,8 @@ class HomePage extends StatelessWidget { final deviceState = context.watch().state; final currentDevice = deviceState.selectedDevice; - if (currentDevice == null) - return const Scaffold(body: Center(child: Text("加载中..."))); + //if (currentDevice == null) + // return const Scaffold(body: Center(child: Text("加载中..."))); return Scaffold( backgroundColor: const Color(0xFFF7F7F7), @@ -26,7 +26,7 @@ class HomePage extends StatelessWidget { physics: const BouncingScrollPhysics(), slivers: [ // 1. 沉浸式顶部展示区 - SliverToBoxAdapter(child: ImmersionHeader(device: currentDevice)), + //SliverToBoxAdapter(child: ImmersionHeader(device: currentDevice)), // 2. 功能网格(保持原有逻辑,但背景建议改为纯白) const SliverToBoxAdapter(child: QuickActionsGrid()), diff --git a/lib/features/home/presentation/widgets/path_list_pages.dart b/lib/features/home/presentation/widgets/path_list_pages.dart index c42d83a4..d0f64a31 100644 --- a/lib/features/home/presentation/widgets/path_list_pages.dart +++ b/lib/features/home/presentation/widgets/path_list_pages.dart @@ -36,11 +36,13 @@ class _VerticalFloatMenuState extends State { children: _menuItems .asMap() .entries - .map((entry) => _buildMenuItem( - entry.value["icon"], - entry.key, - entry.value["name"], - )) + .map( + (entry) => _buildMenuItem( + entry.value["icon"], + entry.key, + entry.value["name"], + ), + ) .toList(), ), ); @@ -51,9 +53,17 @@ class _VerticalFloatMenuState extends State { final isSelected = _selectedIndex == index; return InkWell( // 点击切换选中状态+触发外部回调 - onTap: () { + onTap: () async { setState(() => _selectedIndex = index); if (widget.onItemTap != null) widget.onItemTap!(index, name); + if (index == 0) { + final result = await _showModeDialog(context); + + if (result == true) { + // 点击了确定 → 弹出底部面板 + _showBottomPanel(context); + } + } }, child: Container( width: double.infinity, // 撑满父容器宽度,保证点击区域 @@ -83,4 +93,140 @@ class _VerticalFloatMenuState extends State { ), ); } -} \ No newline at end of file +} + +Future _showModeDialog(BuildContext context) { + int selectedMode = 0; // 0: 弓字模式 1: 自定义模式 + + return showDialog( + context: context, + barrierDismissible: false, + builder: (context) { + return StatefulBuilder( + builder: (context, setState) { + return Dialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(16), + ), + child: Container( + padding: const EdgeInsets.all(20), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + const Text( + "选择作业模式", + style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + ), + const SizedBox(height: 20), + + /// 弓字模式 + _modeItem( + title: "弓字模式", + subtitle: "标准全覆盖路径规划", + isSelected: selectedMode == 0, + onTap: () => setState(() => selectedMode = 0), + ), + + const SizedBox(height: 12), + + /// 自定义模式 + _modeItem( + title: "自定义模式", + subtitle: "手动设定作业区域", + isSelected: selectedMode == 1, + onTap: () => setState(() => selectedMode = 1), + ), + + const SizedBox(height: 20), + + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + TextButton( + onPressed: () { + Navigator.pop(context, false); // 取消 + }, + child: const Text("取消"), + ), + ElevatedButton( + onPressed: () { + Navigator.pop(context, true); // 确定 + }, + child: const Text("确定"), + ), + ], + ), + ], + ), + ), + ); + }, + ); + }, + ); +} + +Widget _modeItem({ + required String title, + required String subtitle, + required bool isSelected, + required VoidCallback onTap, +}) { + return InkWell( + onTap: onTap, + child: Container( + padding: const EdgeInsets.all(14), + decoration: BoxDecoration( + border: Border.all( + color: isSelected ? Colors.lightBlue : Colors.grey.shade300, + ), + borderRadius: BorderRadius.circular(12), + color: isSelected ? Colors.lightBlue.shade50 : Colors.white, + ), + child: Row( + children: [ + Icon( + isSelected ? Icons.check_circle : Icons.circle_outlined, + color: isSelected ? Colors.lightBlue : Colors.grey, + ), + const SizedBox(width: 12), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(title, style: const TextStyle(fontWeight: FontWeight.bold)), + Text( + subtitle, + style: const TextStyle(fontSize: 12, color: Colors.grey), + ), + ], + ), + ], + ), + ), + ); +} + +void _showBottomPanel(BuildContext context) { + showModalBottomSheet( + context: context, + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.vertical(top: Radius.circular(16)), + ), + builder: (context) { + return Container( + height: 200, + padding: const EdgeInsets.all(20), + child: Column( + children: const [ + Text( + "圈地操作面板", + style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + ), + SizedBox(height: 20), + Text("这里放你的圈地操作按钮"), + ], + ), + ); + }, + ); +} From 30ef6c8e40b4dbdc0920844b904ed100df96919d Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Wed, 25 Feb 2026 17:22:59 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=9C=88=E5=9C=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.kotlin/errors/errors-1772003113400.log | 198 ++++++ .../.kotlin/errors/errors-1772003113405.log | 232 +++++++ .../.kotlin/errors/errors-1772003113412.log | 198 ++++++ .../.kotlin/errors/errors-1772003113417.log | 198 ++++++ .../.kotlin/errors/errors-1772003113421.log | 198 ++++++ .../.kotlin/errors/errors-1772003113424.log | 198 ++++++ .../home/presentation/pages/home_page.dart | 2 +- .../presentation/widgets/common/enum.dart | 5 + .../widgets/map/testmap_pages.dart | 52 +- .../presentation/widgets/path_list_pages.dart | 615 ++++++++++++++---- .../presentation/widgets/startpoint_area.dart | 219 +++++++ 11 files changed, 1974 insertions(+), 141 deletions(-) create mode 100644 android/.kotlin/errors/errors-1772003113400.log create mode 100644 android/.kotlin/errors/errors-1772003113405.log create mode 100644 android/.kotlin/errors/errors-1772003113412.log create mode 100644 android/.kotlin/errors/errors-1772003113417.log create mode 100644 android/.kotlin/errors/errors-1772003113421.log create mode 100644 android/.kotlin/errors/errors-1772003113424.log create mode 100644 lib/features/home/presentation/widgets/common/enum.dart create mode 100644 lib/features/home/presentation/widgets/startpoint_area.dart diff --git a/android/.kotlin/errors/errors-1772003113400.log b/android/.kotlin/errors/errors-1772003113400.log new file mode 100644 index 00000000..30084619 --- /dev/null +++ b/android/.kotlin/errors/errors-1772003113400.log @@ -0,0 +1,198 @@ +kotlin version: 2.2.20 +error message: Daemon compilation failed: null +java.lang.Exception + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:69) + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:65) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemon(GradleKotlinCompilerWork.kt:240) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemonOrFallbackImpl(GradleKotlinCompilerWork.kt:159) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.run(GradleKotlinCompilerWork.kt:111) + at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction.execute(GradleCompilerRunnerWithWorkers.kt:74) + at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:66) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:62) + at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:62) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:210) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:205) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:67) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:60) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:167) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:60) + at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:54) + at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:59) + at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$0(DefaultWorkerExecutor.java:174) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:194) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.access$700(DefaultConditionalExecutionQueue.java:127) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner$1.run(DefaultConditionalExecutionQueue.java:169) + at org.gradle.internal.Factories$1.create(Factories.java:31) + at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:263) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:127) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:132) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:133) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) + at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) + at java.base/java.lang.Thread.run(Unknown Source) +Caused by: java.lang.AssertionError: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\device_info_plus\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:218) + at org.jetbrains.kotlin.incremental.IncrementalCachesManager.close(IncrementalCachesManager.kt:55) + at kotlin.io.CloseableKt.closeFinally(Closeable.kt:46) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileNonIncrementally(IncrementalCompilerRunner.kt:293) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:128) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:684) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:94) + at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1810) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) + at java.base/java.lang.reflect.Method.invoke(Unknown Source) + at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.Transport.serviceCall(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) + ... 3 more +Caused by: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\device_info_plus\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:205) + ... 22 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\device_info_plus-12.3.0\android\src\main\kotlin\dev\fluttercommunity\plus\device_info\DeviceInfoPlusPlugin.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:33) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\device_info_plus-12.3.0\android\src\main\kotlin\dev\fluttercommunity\plus\device_info\DeviceInfoPlusPlugin.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\device_info_plus-12.3.0\android\src\main\kotlin\dev\fluttercommunity\plus\device_info\DeviceInfoPlusPlugin.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:33) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.incremental.storage.AppendableCollectionExternalizer.save(LazyStorage.kt:151) + at org.jetbrains.kotlin.incremental.storage.AppendableCollectionExternalizer.save(LazyStorage.kt:142) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\device_info_plus\kotlin\compileDebugKotlin\cacheable\caches-jvm\lookups: id-to-file.tab, file-to-id.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.LookupStorage.close(LookupStorage.kt:155) + ... 23 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\device_info_plus-12.3.0\android\src\main\kotlin\dev\fluttercommunity\plus\device_info\DeviceInfoPlusPlugin.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.LegacyFileExternalizer.save(IdToFileMap.kt:51) + at org.jetbrains.kotlin.incremental.storage.LegacyFileExternalizer.save(IdToFileMap.kt:48) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\device_info_plus-12.3.0\android\src\main\kotlin\dev\fluttercommunity\plus\device_info\DeviceInfoPlusPlugin.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\device_info_plus\kotlin\compileDebugKotlin\cacheable\caches-jvm\inputs: source-to-output.tab + ... 25 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\device_info_plus-12.3.0\android\src\main\kotlin\dev\fluttercommunity\plus\device_info\DeviceInfoPlusPlugin.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + + diff --git a/android/.kotlin/errors/errors-1772003113405.log b/android/.kotlin/errors/errors-1772003113405.log new file mode 100644 index 00000000..eb2847be --- /dev/null +++ b/android/.kotlin/errors/errors-1772003113405.log @@ -0,0 +1,232 @@ +kotlin version: 2.2.20 +error message: Daemon compilation failed: null +java.lang.Exception + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:69) + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:65) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemon(GradleKotlinCompilerWork.kt:240) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemonOrFallbackImpl(GradleKotlinCompilerWork.kt:159) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.run(GradleKotlinCompilerWork.kt:111) + at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction.execute(GradleCompilerRunnerWithWorkers.kt:74) + at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:66) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:62) + at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:62) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:210) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:205) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:67) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:60) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:167) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:60) + at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:54) + at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:59) + at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$0(DefaultWorkerExecutor.java:174) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:194) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.access$700(DefaultConditionalExecutionQueue.java:127) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner$1.run(DefaultConditionalExecutionQueue.java:169) + at org.gradle.internal.Factories$1.create(Factories.java:31) + at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:263) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:127) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:132) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:133) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) + at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) + at java.base/java.lang.Thread.run(Unknown Source) +Caused by: java.lang.AssertionError: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:218) + at org.jetbrains.kotlin.incremental.IncrementalCachesManager.close(IncrementalCachesManager.kt:55) + at kotlin.io.CloseableKt.closeFinally(Closeable.kt:46) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileNonIncrementally(IncrementalCompilerRunner.kt:293) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:128) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:684) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:94) + at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1810) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) + at java.base/java.lang.reflect.Method.invoke(Unknown Source) + at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.Transport.serviceCall(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) + ... 3 more +Caused by: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:205) + ... 22 more + Suppressed: java.lang.IllegalStateException: Storage for [D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin\class-fq-name-to-source.tab] is already registered + at org.jetbrains.kotlin.com.intellij.util.io.FilePageCache.registerPagedFileStorage(FilePageCache.java:410) + at org.jetbrains.kotlin.com.intellij.util.io.PagedFileStorage.(PagedFileStorage.java:72) + at org.jetbrains.kotlin.com.intellij.util.io.ResizeableMappedFile.(ResizeableMappedFile.java:68) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentBTreeEnumerator.(PersistentBTreeEnumerator.java:128) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentEnumerator.createDefaultEnumerator(PersistentEnumerator.java:52) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.(PersistentMapImpl.java:165) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.(PersistentMapImpl.java:140) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapBuilder.buildImplementation(PersistentMapBuilder.java:88) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapBuilder.build(PersistentMapBuilder.java:71) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.(PersistentHashMap.java:46) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.(PersistentHashMap.java:72) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.createMap(LazyStorage.kt:62) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.getStorageOrCreateNew(LazyStorage.kt:59) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.Exception: Storage[D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin\class-fq-name-to-source.tab] registration stack trace + at org.jetbrains.kotlin.com.intellij.util.io.FilePageCache.registerPagedFileStorage(FilePageCache.java:437) + ... 43 more + Suppressed: java.lang.IllegalStateException: Storage for [D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin\source-to-classes.tab] is already registered + at org.jetbrains.kotlin.com.intellij.util.io.FilePageCache.registerPagedFileStorage(FilePageCache.java:410) + at org.jetbrains.kotlin.com.intellij.util.io.PagedFileStorage.(PagedFileStorage.java:72) + at org.jetbrains.kotlin.com.intellij.util.io.ResizeableMappedFile.(ResizeableMappedFile.java:68) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentBTreeEnumerator.(PersistentBTreeEnumerator.java:128) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentEnumerator.createDefaultEnumerator(PersistentEnumerator.java:52) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.(PersistentMapImpl.java:165) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.(PersistentMapImpl.java:140) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapBuilder.buildImplementation(PersistentMapBuilder.java:88) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapBuilder.build(PersistentMapBuilder.java:71) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.(PersistentHashMap.java:46) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.(PersistentHashMap.java:72) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.createMap(LazyStorage.kt:62) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.getStorageOrCreateNew(LazyStorage.kt:59) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.Exception: Storage[D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin\source-to-classes.tab] registration stack trace + at org.jetbrains.kotlin.com.intellij.util.io.FilePageCache.registerPagedFileStorage(FilePageCache.java:437) + ... 44 more + Suppressed: java.lang.IllegalStateException: Storage for [D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin\internal-name-to-source.tab] is already registered + at org.jetbrains.kotlin.com.intellij.util.io.FilePageCache.registerPagedFileStorage(FilePageCache.java:410) + at org.jetbrains.kotlin.com.intellij.util.io.PagedFileStorage.(PagedFileStorage.java:72) + at org.jetbrains.kotlin.com.intellij.util.io.ResizeableMappedFile.(ResizeableMappedFile.java:68) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentBTreeEnumerator.(PersistentBTreeEnumerator.java:128) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentEnumerator.createDefaultEnumerator(PersistentEnumerator.java:52) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.(PersistentMapImpl.java:165) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.(PersistentMapImpl.java:140) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapBuilder.buildImplementation(PersistentMapBuilder.java:88) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapBuilder.build(PersistentMapBuilder.java:71) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.(PersistentHashMap.java:46) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.(PersistentHashMap.java:72) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.createMap(LazyStorage.kt:62) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.getStorageOrCreateNew(LazyStorage.kt:59) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.Exception: Storage[D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin\internal-name-to-source.tab] registration stack trace + at org.jetbrains.kotlin.com.intellij.util.io.FilePageCache.registerPagedFileStorage(FilePageCache.java:437) + ... 44 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\lookups: id-to-file.tab, file-to-id.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.LookupStorage.close(LookupStorage.kt:155) + ... 23 more + Suppressed: java.lang.IllegalStateException: Storage for [D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\lookups\id-to-file.tab] is already registered + at org.jetbrains.kotlin.com.intellij.util.io.FilePageCache.registerPagedFileStorage(FilePageCache.java:410) + at org.jetbrains.kotlin.com.intellij.util.io.PagedFileStorage.(PagedFileStorage.java:72) + at org.jetbrains.kotlin.com.intellij.util.io.ResizeableMappedFile.(ResizeableMappedFile.java:68) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentBTreeEnumerator.(PersistentBTreeEnumerator.java:128) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentEnumerator.createDefaultEnumerator(PersistentEnumerator.java:52) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.(PersistentMapImpl.java:165) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.(PersistentMapImpl.java:140) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapBuilder.buildImplementation(PersistentMapBuilder.java:88) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapBuilder.build(PersistentMapBuilder.java:71) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.(PersistentHashMap.java:46) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.(PersistentHashMap.java:72) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.createMap(LazyStorage.kt:62) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.getStorageOrCreateNew(LazyStorage.kt:59) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.Exception: Storage[D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\lookups\id-to-file.tab] registration stack trace + at org.jetbrains.kotlin.com.intellij.util.io.FilePageCache.registerPagedFileStorage(FilePageCache.java:437) + ... 44 more + Suppressed: java.lang.IllegalStateException: Storage for [D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\lookups\file-to-id.tab] is already registered + at org.jetbrains.kotlin.com.intellij.util.io.FilePageCache.registerPagedFileStorage(FilePageCache.java:410) + at org.jetbrains.kotlin.com.intellij.util.io.PagedFileStorage.(PagedFileStorage.java:72) + at org.jetbrains.kotlin.com.intellij.util.io.ResizeableMappedFile.(ResizeableMappedFile.java:68) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentBTreeEnumerator.(PersistentBTreeEnumerator.java:128) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentEnumerator.createDefaultEnumerator(PersistentEnumerator.java:52) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.(PersistentMapImpl.java:165) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.(PersistentMapImpl.java:140) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapBuilder.buildImplementation(PersistentMapBuilder.java:88) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapBuilder.build(PersistentMapBuilder.java:71) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.(PersistentHashMap.java:46) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.(PersistentHashMap.java:72) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.createMap(LazyStorage.kt:62) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.getStorageOrCreateNew(LazyStorage.kt:59) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.Exception: Storage[D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\lookups\file-to-id.tab] registration stack trace + at org.jetbrains.kotlin.com.intellij.util.io.FilePageCache.registerPagedFileStorage(FilePageCache.java:437) + ... 44 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\inputs: source-to-output.tab + ... 25 more + Suppressed: java.lang.IllegalStateException: Storage for [D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\inputs\source-to-output.tab] is already registered + at org.jetbrains.kotlin.com.intellij.util.io.FilePageCache.registerPagedFileStorage(FilePageCache.java:410) + at org.jetbrains.kotlin.com.intellij.util.io.PagedFileStorage.(PagedFileStorage.java:72) + at org.jetbrains.kotlin.com.intellij.util.io.ResizeableMappedFile.(ResizeableMappedFile.java:68) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentBTreeEnumerator.(PersistentBTreeEnumerator.java:128) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentEnumerator.createDefaultEnumerator(PersistentEnumerator.java:52) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.(PersistentMapImpl.java:165) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.(PersistentMapImpl.java:140) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapBuilder.buildImplementation(PersistentMapBuilder.java:88) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapBuilder.build(PersistentMapBuilder.java:71) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.(PersistentHashMap.java:46) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.(PersistentHashMap.java:72) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.createMap(LazyStorage.kt:62) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.getStorageOrCreateNew(LazyStorage.kt:59) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.Exception: Storage[D:\code\FlutterApp\build\flutter_webrtc\kotlin\compileDebugKotlin\cacheable\caches-jvm\inputs\source-to-output.tab] registration stack trace + at org.jetbrains.kotlin.com.intellij.util.io.FilePageCache.registerPagedFileStorage(FilePageCache.java:437) + ... 44 more + + diff --git a/android/.kotlin/errors/errors-1772003113412.log b/android/.kotlin/errors/errors-1772003113412.log new file mode 100644 index 00000000..eb2a25ac --- /dev/null +++ b/android/.kotlin/errors/errors-1772003113412.log @@ -0,0 +1,198 @@ +kotlin version: 2.2.20 +error message: Daemon compilation failed: null +java.lang.Exception + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:69) + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:65) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemon(GradleKotlinCompilerWork.kt:240) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemonOrFallbackImpl(GradleKotlinCompilerWork.kt:159) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.run(GradleKotlinCompilerWork.kt:111) + at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction.execute(GradleCompilerRunnerWithWorkers.kt:74) + at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:66) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:62) + at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:62) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:210) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:205) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:67) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:60) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:167) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:60) + at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:54) + at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:59) + at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$0(DefaultWorkerExecutor.java:174) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:194) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.access$700(DefaultConditionalExecutionQueue.java:127) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner$1.run(DefaultConditionalExecutionQueue.java:169) + at org.gradle.internal.Factories$1.create(Factories.java:31) + at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:263) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:127) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:132) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:133) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) + at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) + at java.base/java.lang.Thread.run(Unknown Source) +Caused by: java.lang.AssertionError: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\package_info_plus\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:218) + at org.jetbrains.kotlin.incremental.IncrementalCachesManager.close(IncrementalCachesManager.kt:55) + at kotlin.io.CloseableKt.closeFinally(Closeable.kt:46) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileNonIncrementally(IncrementalCompilerRunner.kt:293) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:128) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:684) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:94) + at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1810) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) + at java.base/java.lang.reflect.Method.invoke(Unknown Source) + at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.Transport.serviceCall(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) + ... 3 more +Caused by: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\package_info_plus\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:205) + ... 22 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\package_info_plus-9.0.0\android\src\main\kotlin\dev\fluttercommunity\plus\packageinfo\PackageInfoPlugin.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:33) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\package_info_plus-9.0.0\android\src\main\kotlin\dev\fluttercommunity\plus\packageinfo\PackageInfoPlugin.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\package_info_plus-9.0.0\android\src\main\kotlin\dev\fluttercommunity\plus\packageinfo\PackageInfoPlugin.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:33) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.incremental.storage.AppendableCollectionExternalizer.save(LazyStorage.kt:151) + at org.jetbrains.kotlin.incremental.storage.AppendableCollectionExternalizer.save(LazyStorage.kt:142) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\package_info_plus\kotlin\compileDebugKotlin\cacheable\caches-jvm\lookups: id-to-file.tab, file-to-id.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.LookupStorage.close(LookupStorage.kt:155) + ... 23 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\package_info_plus-9.0.0\android\src\main\kotlin\dev\fluttercommunity\plus\packageinfo\PackageInfoPlugin.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.LegacyFileExternalizer.save(IdToFileMap.kt:51) + at org.jetbrains.kotlin.incremental.storage.LegacyFileExternalizer.save(IdToFileMap.kt:48) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\package_info_plus-9.0.0\android\src\main\kotlin\dev\fluttercommunity\plus\packageinfo\PackageInfoPlugin.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\package_info_plus\kotlin\compileDebugKotlin\cacheable\caches-jvm\inputs: source-to-output.tab + ... 25 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\package_info_plus-9.0.0\android\src\main\kotlin\dev\fluttercommunity\plus\packageinfo\PackageInfoPlugin.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + + diff --git a/android/.kotlin/errors/errors-1772003113417.log b/android/.kotlin/errors/errors-1772003113417.log new file mode 100644 index 00000000..b10fcf70 --- /dev/null +++ b/android/.kotlin/errors/errors-1772003113417.log @@ -0,0 +1,198 @@ +kotlin version: 2.2.20 +error message: Daemon compilation failed: null +java.lang.Exception + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:69) + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:65) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemon(GradleKotlinCompilerWork.kt:240) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemonOrFallbackImpl(GradleKotlinCompilerWork.kt:159) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.run(GradleKotlinCompilerWork.kt:111) + at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction.execute(GradleCompilerRunnerWithWorkers.kt:74) + at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:66) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:62) + at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:62) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:210) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:205) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:67) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:60) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:167) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:60) + at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:54) + at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:59) + at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$0(DefaultWorkerExecutor.java:174) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:194) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.access$700(DefaultConditionalExecutionQueue.java:127) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner$1.run(DefaultConditionalExecutionQueue.java:169) + at org.gradle.internal.Factories$1.create(Factories.java:31) + at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:263) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:127) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:132) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:133) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) + at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) + at java.base/java.lang.Thread.run(Unknown Source) +Caused by: java.lang.AssertionError: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\sentry_flutter\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:218) + at org.jetbrains.kotlin.incremental.IncrementalCachesManager.close(IncrementalCachesManager.kt:55) + at kotlin.io.CloseableKt.closeFinally(Closeable.kt:46) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileNonIncrementally(IncrementalCompilerRunner.kt:293) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:128) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:684) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:94) + at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1810) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) + at java.base/java.lang.reflect.Method.invoke(Unknown Source) + at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.Transport.serviceCall(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) + ... 3 more +Caused by: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\sentry_flutter\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:205) + ... 22 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\sentry_flutter-9.11.0\android\src\main\kotlin\io\sentry\flutter\ReplayRecorderCallbacks.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:33) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\sentry_flutter-9.11.0\android\src\main\kotlin\io\sentry\flutter\ReplayRecorderCallbacks.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\sentry_flutter-9.11.0\android\src\main\kotlin\io\sentry\flutter\ReplayRecorderCallbacks.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:33) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.incremental.storage.AppendableCollectionExternalizer.save(LazyStorage.kt:151) + at org.jetbrains.kotlin.incremental.storage.AppendableCollectionExternalizer.save(LazyStorage.kt:142) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\sentry_flutter\kotlin\compileDebugKotlin\cacheable\caches-jvm\lookups: id-to-file.tab, file-to-id.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.LookupStorage.close(LookupStorage.kt:155) + ... 23 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\sentry_flutter-9.11.0\android\src\main\kotlin\io\sentry\flutter\ReplayRecorderCallbacks.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.LegacyFileExternalizer.save(IdToFileMap.kt:51) + at org.jetbrains.kotlin.incremental.storage.LegacyFileExternalizer.save(IdToFileMap.kt:48) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\sentry_flutter-9.11.0\android\src\main\kotlin\io\sentry\flutter\ReplayRecorderCallbacks.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\sentry_flutter\kotlin\compileDebugKotlin\cacheable\caches-jvm\inputs: source-to-output.tab + ... 25 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\sentry_flutter-9.11.0\android\src\main\kotlin\io\sentry\flutter\ReplayRecorderCallbacks.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + + diff --git a/android/.kotlin/errors/errors-1772003113421.log b/android/.kotlin/errors/errors-1772003113421.log new file mode 100644 index 00000000..68234ae5 --- /dev/null +++ b/android/.kotlin/errors/errors-1772003113421.log @@ -0,0 +1,198 @@ +kotlin version: 2.2.20 +error message: Daemon compilation failed: null +java.lang.Exception + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:69) + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:65) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemon(GradleKotlinCompilerWork.kt:240) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemonOrFallbackImpl(GradleKotlinCompilerWork.kt:159) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.run(GradleKotlinCompilerWork.kt:111) + at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction.execute(GradleCompilerRunnerWithWorkers.kt:74) + at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:66) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:62) + at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:62) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:210) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:205) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:67) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:60) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:167) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:60) + at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:54) + at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:59) + at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$0(DefaultWorkerExecutor.java:174) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:194) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.access$700(DefaultConditionalExecutionQueue.java:127) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner$1.run(DefaultConditionalExecutionQueue.java:169) + at org.gradle.internal.Factories$1.create(Factories.java:31) + at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:263) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:127) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:132) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:133) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) + at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) + at java.base/java.lang.Thread.run(Unknown Source) +Caused by: java.lang.AssertionError: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\shared_preferences_android\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:218) + at org.jetbrains.kotlin.incremental.IncrementalCachesManager.close(IncrementalCachesManager.kt:55) + at kotlin.io.CloseableKt.closeFinally(Closeable.kt:46) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileNonIncrementally(IncrementalCompilerRunner.kt:293) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:128) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:684) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:94) + at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1810) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) + at java.base/java.lang.reflect.Method.invoke(Unknown Source) + at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.Transport.serviceCall(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) + ... 3 more +Caused by: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\shared_preferences_android\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:205) + ... 22 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\shared_preferences_android-2.4.20\android\src\main\kotlin\io\flutter\plugins\sharedpreferences\MessagesAsync.g.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:33) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\shared_preferences_android-2.4.20\android\src\main\kotlin\io\flutter\plugins\sharedpreferences\MessagesAsync.g.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\shared_preferences_android-2.4.20\android\src\main\kotlin\io\flutter\plugins\sharedpreferences\MessagesAsync.g.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:33) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.incremental.storage.AppendableCollectionExternalizer.save(LazyStorage.kt:151) + at org.jetbrains.kotlin.incremental.storage.AppendableCollectionExternalizer.save(LazyStorage.kt:142) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\shared_preferences_android\kotlin\compileDebugKotlin\cacheable\caches-jvm\lookups: id-to-file.tab, file-to-id.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.LookupStorage.close(LookupStorage.kt:155) + ... 23 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\shared_preferences_android-2.4.20\android\src\main\kotlin\io\flutter\plugins\sharedpreferences\MessagesAsync.g.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.LegacyFileExternalizer.save(IdToFileMap.kt:51) + at org.jetbrains.kotlin.incremental.storage.LegacyFileExternalizer.save(IdToFileMap.kt:48) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\shared_preferences_android-2.4.20\android\src\main\kotlin\io\flutter\plugins\sharedpreferences\MessagesAsync.g.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\shared_preferences_android\kotlin\compileDebugKotlin\cacheable\caches-jvm\inputs: source-to-output.tab + ... 25 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\shared_preferences_android-2.4.20\android\src\main\kotlin\io\flutter\plugins\sharedpreferences\MessagesAsync.g.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + + diff --git a/android/.kotlin/errors/errors-1772003113424.log b/android/.kotlin/errors/errors-1772003113424.log new file mode 100644 index 00000000..982c804f --- /dev/null +++ b/android/.kotlin/errors/errors-1772003113424.log @@ -0,0 +1,198 @@ +kotlin version: 2.2.20 +error message: Daemon compilation failed: null +java.lang.Exception + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:69) + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:65) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemon(GradleKotlinCompilerWork.kt:240) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemonOrFallbackImpl(GradleKotlinCompilerWork.kt:159) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.run(GradleKotlinCompilerWork.kt:111) + at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction.execute(GradleCompilerRunnerWithWorkers.kt:74) + at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:66) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:62) + at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:62) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:210) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:205) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:67) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:60) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:167) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:60) + at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:54) + at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:59) + at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$0(DefaultWorkerExecutor.java:174) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:194) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.access$700(DefaultConditionalExecutionQueue.java:127) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner$1.run(DefaultConditionalExecutionQueue.java:169) + at org.gradle.internal.Factories$1.create(Factories.java:31) + at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:263) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:127) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:132) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:133) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) + at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) + at java.base/java.lang.Thread.run(Unknown Source) +Caused by: java.lang.AssertionError: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\webview_flutter_android\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:218) + at org.jetbrains.kotlin.incremental.IncrementalCachesManager.close(IncrementalCachesManager.kt:55) + at kotlin.io.CloseableKt.closeFinally(Closeable.kt:46) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileNonIncrementally(IncrementalCompilerRunner.kt:293) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:128) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:684) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:94) + at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1810) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) + at java.base/java.lang.reflect.Method.invoke(Unknown Source) + at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.Transport.serviceCall(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) + ... 3 more +Caused by: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\webview_flutter_android\kotlin\compileDebugKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:205) + ... 22 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\webview_flutter_android-4.10.11\android\src\main\java\io\flutter\plugins\webviewflutter\AndroidWebkitLibrary.g.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:33) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\webview_flutter_android-4.10.11\android\src\main\java\io\flutter\plugins\webviewflutter\AndroidWebkitLibrary.g.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\webview_flutter_android-4.10.11\android\src\main\java\io\flutter\plugins\webviewflutter\AndroidWebkitLibrary.g.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:33) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.incremental.storage.AppendableCollectionExternalizer.save(LazyStorage.kt:151) + at org.jetbrains.kotlin.incremental.storage.AppendableCollectionExternalizer.save(LazyStorage.kt:142) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\webview_flutter_android\kotlin\compileDebugKotlin\cacheable\caches-jvm\lookups: id-to-file.tab, file-to-id.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.LookupStorage.close(LookupStorage.kt:155) + ... 23 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\webview_flutter_android-4.10.11\android\src\main\java\io\flutter\plugins\webviewflutter\AndroidWebkitLibrary.g.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.LegacyFileExternalizer.save(IdToFileMap.kt:51) + at org.jetbrains.kotlin.incremental.storage.LegacyFileExternalizer.save(IdToFileMap.kt:48) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:447) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\webview_flutter_android-4.10.11\android\src\main\java\io\flutter\plugins\webviewflutter\AndroidWebkitLibrary.g.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\code\FlutterApp\build\webview_flutter_android\kotlin\compileDebugKotlin\cacheable\caches-jvm\inputs: source-to-output.tab + ... 25 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\15563\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\webview_flutter_android-4.10.11\android\src\main\java\io\flutter\plugins\webviewflutter\AndroidWebkitLibrary.g.kt and D:\code\FlutterApp\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:1007) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:455) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:426) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:106) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + + diff --git a/lib/features/home/presentation/pages/home_page.dart b/lib/features/home/presentation/pages/home_page.dart index ff62c2ff..90e7b5b1 100644 --- a/lib/features/home/presentation/pages/home_page.dart +++ b/lib/features/home/presentation/pages/home_page.dart @@ -51,7 +51,7 @@ class HomePage extends StatelessWidget { physics: const BouncingScrollPhysics(), slivers: [ // 1. 沉浸式顶部展示区 - //SliverToBoxAdapter(child: ImmersionHeader(device: currentDevice)), + SliverToBoxAdapter(child: ImmersionHeader(device: currentDevice)), // 2. 功能网格 const SliverToBoxAdapter(child: QuickActionsGrid()), diff --git a/lib/features/home/presentation/widgets/common/enum.dart b/lib/features/home/presentation/widgets/common/enum.dart new file mode 100644 index 00000000..b123a18b --- /dev/null +++ b/lib/features/home/presentation/widgets/common/enum.dart @@ -0,0 +1,5 @@ +enum WorkMode { bow, custom } + +enum RobotMode { point, robot } + +enum AreaMode { work, obstacle } diff --git a/lib/features/home/presentation/widgets/map/testmap_pages.dart b/lib/features/home/presentation/widgets/map/testmap_pages.dart index 2cdc9406..f862faf1 100644 --- a/lib/features/home/presentation/widgets/map/testmap_pages.dart +++ b/lib/features/home/presentation/widgets/map/testmap_pages.dart @@ -4,9 +4,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; import 'package:geolocator/geolocator.dart'; import 'package:latlong2/latlong.dart'; +import 'package:maibu_satabot_v2/features/home/presentation/widgets/common/enum.dart'; +import 'package:maibu_satabot_v2/features/home/presentation/widgets/startpoint_area.dart'; import '../path_list_pages.dart'; + class MapPageEnterprise extends StatefulWidget { const MapPageEnterprise({Key? key}) : super(key: key); @@ -20,6 +23,9 @@ class _MapPageEnterpriseState extends State { LatLng? _currentLatLng; StreamSubscription? _positionSub; bool _hasMovedOnce = false; + bool _isPanelOpen = false; // 控制面板显示/隐藏 + RobotMode _currentRobotMode = RobotMode.point; + AreaMode _currentAreaMode = AreaMode.work; @override void initState() { @@ -141,9 +147,53 @@ class _MapPageEnterpriseState extends State { top: maxTop > 10 ? 11 : maxTop, // 确保不超出屏幕范围 child: FloatingActionButton( onPressed: _moveToCurrentLocation, - child: new VerticalFloatMenu(), + child: new VerticalFloatMenu( + onEditTap: (bool isOpen) { + // 关键:接收子组件的回调,修改外部的_isPanelOpen + setState(() { + _isPanelOpen = isOpen; + }); + },), ), ), + if (_isPanelOpen) + Positioned( + left: 0, + right: 0, + bottom: 0, + child: BottomOperationPanel( + // 传入初始值 + initialRobotMode:RobotMode.point , + initialAreaMode: _currentAreaMode, + // 接收面板的事件回调 + onComplete: () { + // 完成按钮点击:关闭面板 + setState(() => _isPanelOpen = false); + }, + onRobotModeChanged: (mode) { + // 接收机器人模式变更 + //setState(() => _currentRobotMode = mode); + debugPrint('外部收到机器人模式:$mode'); + }, + onAreaModeChanged: (mode) { + // 接收作业区域模式变更 + //setState(() => _currentAreaMode = mode); + debugPrint('外部收到区域模式:$mode'); + }, + onAddTap: () { + // 加号按钮自定义逻辑 + debugPrint('外部处理加号按钮点击'); + }, + onLandTap: () { + // 地块标签自定义逻辑 + debugPrint('外部处理地块标签点击'); + }, + onRouteTap: () { + // 航线标签自定义逻辑 + debugPrint('外部处理航线标签点击'); + }, + ), + ), ], ), )); diff --git a/lib/features/home/presentation/widgets/path_list_pages.dart b/lib/features/home/presentation/widgets/path_list_pages.dart index d0f64a31..998feb21 100644 --- a/lib/features/home/presentation/widgets/path_list_pages.dart +++ b/lib/features/home/presentation/widgets/path_list_pages.dart @@ -1,21 +1,22 @@ import 'package:flutter/material.dart'; +import 'package:maibu_satabot_v2/features/home/presentation/widgets/common/enum.dart'; -/// 垂直侧边功能菜单组件 - 纯白不透明长方形、独立可复用 class VerticalFloatMenu extends StatefulWidget { - // 外部可传点击回调,获取选中的索引和名称(可选) final Function(int index, String name)? onItemTap; - - const VerticalFloatMenu({super.key, this.onItemTap}); + final ValueChanged? onEditTap; + const VerticalFloatMenu({super.key, this.onItemTap, this.onEditTap}); @override State createState() => _VerticalFloatMenuState(); } class _VerticalFloatMenuState extends State { - // 默认选中「编辑」项(索引4),与原设计一致 int _selectedIndex = 4; - // 菜单配置:图标+名称,和原截图完全对应 + WorkMode? _selectedWorkMode; + RobotMode _robotMode = RobotMode.point; + AreaMode _areaMode = AreaMode.work; + final List> _menuItems = const [ {"icon": Icons.crop_free, "name": "圈地"}, {"icon": Icons.format_list_bulleted, "name": "列表"}, @@ -27,12 +28,11 @@ class _VerticalFloatMenuState extends State { @override Widget build(BuildContext context) { - // 纯白不透明 + 固定长方形宽度,无阴影/圆角(纯基础样式) return Container( - width: 56, // 适配悬浮按钮的窄长方形宽度,可自行微调 - color: Colors.white, // 纯白不透明背景,核心要求 + width: 56, + color: Colors.white, child: Column( - mainAxisSize: MainAxisSize.min, // 高度自适应子项,不占多余空间 + mainAxisSize: MainAxisSize.min, children: _menuItems .asMap() .entries @@ -48,28 +48,29 @@ class _VerticalFloatMenuState extends State { ); } - /// 构建单个菜单项(含选中高亮、点击事件) Widget _buildMenuItem(IconData icon, int index, String name) { final isSelected = _selectedIndex == index; + return InkWell( - // 点击切换选中状态+触发外部回调 onTap: () async { setState(() => _selectedIndex = index); - if (widget.onItemTap != null) widget.onItemTap!(index, name); - if (index == 0) { - final result = await _showModeDialog(context); - if (result == true) { - // 点击了确定 → 弹出底部面板 - _showBottomPanel(context); + widget.onItemTap?.call(index, name); + + if (index == 0) { + final result = await _showModeDialog(); + + if (result != null) { + _selectedWorkMode = result; + widget.onEditTap?.call(true); + //_showBottomPanel(); } } }, child: Container( - width: double.infinity, // 撑满父容器宽度,保证点击区域 - height: 56, // 单个项固定高度,视觉均匀 + width: double.infinity, + height: 56, alignment: Alignment.center, - // 选中项高亮背景(浅蓝,可自行改色) color: isSelected ? Colors.lightBlue[50] : Colors.white, child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -77,15 +78,14 @@ class _VerticalFloatMenuState extends State { Icon( icon, color: isSelected ? Colors.lightBlue : Colors.black, - size: 22, // 图标大小微调,适配窄宽度 + size: 22, ), const SizedBox(height: 2), Text( name, style: TextStyle( - fontSize: 10, // 文字大小适配窄宽度 + fontSize: 10, color: isSelected ? Colors.lightBlue : Colors.black, - height: 1, // 取消文字默认行高,避免高度过高 ), ), ], @@ -93,140 +93,477 @@ class _VerticalFloatMenuState extends State { ), ); } -} -Future _showModeDialog(BuildContext context) { - int selectedMode = 0; // 0: 弓字模式 1: 自定义模式 + /// ================= 弹窗 ================= - return showDialog( - context: context, - barrierDismissible: false, - builder: (context) { - return StatefulBuilder( - builder: (context, setState) { - return Dialog( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(16), + Future _showModeDialog() { + WorkMode selectedMode = WorkMode.bow; + + return showDialog( + context: context, + barrierDismissible: false, + builder: (context) { + return StatefulBuilder( + builder: (context, setState) { + return Dialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(16), + ), + child: Padding( + padding: const EdgeInsets.all(20), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + const Text( + "选择作业模式", + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold, + ), + ), + const SizedBox(height: 20), + _modeItem( + title: "弓字模式", + subtitle: "标准全覆盖路径规划", + isSelected: selectedMode == WorkMode.bow, + onTap: () { + setState(() { + selectedMode = WorkMode.bow; + }); + }, + ), + const SizedBox(height: 12), + _modeItem( + title: "自定义模式", + subtitle: "手动设定作业区域", + isSelected: selectedMode == WorkMode.custom, + onTap: () { + setState(() { + selectedMode = WorkMode.custom; + }); + }, + ), + const SizedBox(height: 20), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + TextButton( + onPressed: () => Navigator.pop(context), + child: const Text("取消"), + ), + ElevatedButton( + onPressed: () => Navigator.pop(context, selectedMode), + child: const Text("确定"), + ), + ], + ), + ], + ), + ), + ); + }, + ); + }, + ); + } + + Widget _modeItem({ + required String title, + required String subtitle, + required bool isSelected, + required VoidCallback onTap, + }) { + return InkWell( + onTap: onTap, + child: Container( + padding: const EdgeInsets.all(14), + decoration: BoxDecoration( + border: Border.all( + color: isSelected ? Colors.lightBlue : Colors.grey.shade300, + ), + borderRadius: BorderRadius.circular(12), + color: isSelected ? Colors.lightBlue.shade50 : Colors.white, + ), + child: Row( + children: [ + Icon( + isSelected ? Icons.check_circle : Icons.circle_outlined, + color: isSelected ? Colors.lightBlue : Colors.grey, ), - child: Container( - padding: const EdgeInsets.all(20), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Text( - "选择作业模式", - style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), - ), - const SizedBox(height: 20), + const SizedBox(width: 12), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: const TextStyle(fontWeight: FontWeight.bold), + ), + Text( + subtitle, + style: const TextStyle(fontSize: 12, color: Colors.grey), + ), + ], + ), + ], + ), + ), + ); + } - /// 弓字模式 - _modeItem( - title: "弓字模式", - subtitle: "标准全覆盖路径规划", - isSelected: selectedMode == 0, - onTap: () => setState(() => selectedMode = 0), - ), + /// ================= 底部面板 ================= + /// + /// // 构建底部面板(和原有样式一致,无遮罩) + //Widget _buildBottomPanel() { + // return Container( + // decoration: const BoxDecoration( + // color: Colors.white, + // borderRadius: BorderRadius.vertical(top: Radius.circular(20)), + // boxShadow: [BoxShadow(color: Colors.black12, blurRadius: 8)], + // ), + // padding: const EdgeInsets.all(16), + // constraints: const BoxConstraints(minHeight: 260), + // child: SingleChildScrollView( + // child: Column( + // mainAxisSize: MainAxisSize.min, + // children: [ + // // 顶部拖拽指示器(可选) + // Container( + // width: 40, + // height: 5, + // decoration: BoxDecoration( + // color: Colors.grey[300], + // borderRadius: BorderRadius.circular(3), + // ), + // ), + // const SizedBox(height: 16), - const SizedBox(height: 12), + // // 面板核心内容 + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // DropdownButton( + // value: _robotMode, + // items: const [ + // DropdownMenuItem( + // value: RobotMode.point, + // child: Text("地图打点"), + // ), + // DropdownMenuItem( + // value: RobotMode.robot, + // child: Text("机器人模式"), + // ), + // ], + // onChanged: (v) { + // setState(() => _robotMode = v!); + // }, + // ), + // GestureDetector( + // onTap: () => debugPrint('点击了添加按钮'), + // child: Container( + // width: 60, + // height: 60, + // decoration: const BoxDecoration( + // color: Color(0xFF00C853), + // shape: BoxShape.circle, + // ), + // child: const Icon(Icons.add, color: Colors.white, size: 32), + // ), + // ), + // DropdownButton( + // value: _areaMode, + // items: const [ + // DropdownMenuItem(value: AreaMode.work, child: Text("作业区域")), + // DropdownMenuItem( + // value: AreaMode.obstacle, + // child: Text("障碍区域"), + // ), + // ], + // onChanged: (v) { + // setState(() => _areaMode = v!); + // }, + // ), + // ], + // ), + // const SizedBox(height: 32), - /// 自定义模式 - _modeItem( - title: "自定义模式", - subtitle: "手动设定作业区域", - isSelected: selectedMode == 1, - onTap: () => setState(() => selectedMode = 1), - ), + // // 操作按钮行 + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceAround, + // children: [ + // _buildActionButton(Icons.delete_outline, '删除', false, () {}), + // _buildActionButton(Icons.undo_outlined, '撤回', false, () {}), + // _buildActionButton(Icons.check_outlined, '完成', true, () { + // setState(() => _isPanelOpen = false); // 完成后关闭面板 + // }), + // ], + // ), + // const SizedBox(height: 32), - const SizedBox(height: 20), + // // 底部标签页切换 + // Container( + // decoration: BoxDecoration( + // color: Colors.grey[200], + // borderRadius: BorderRadius.circular(8), + // ), + // child: Row( + // children: [ + // Expanded( + // child: GestureDetector( + // onTap: () => debugPrint('切换到地块标签'), + // child: Container( + // padding: const EdgeInsets.symmetric(vertical: 10), + // decoration: BoxDecoration( + // color: Colors.white, + // borderRadius: BorderRadius.circular(8), + // ), + // child: const Center( + // child: Text( + // '地块', + // style: TextStyle( + // color: Colors.black87, + // fontSize: 16, + // ), + // ), + // ), + // ), + // ), + // ), + // Expanded( + // child: GestureDetector( + // onTap: () => debugPrint('切换到航线标签'), + // child: const Center( + // child: Text( + // '航线', + // style: TextStyle(color: Colors.grey, fontSize: 16), + // ), + // ), + // ), + // ), + // ], + // ), + // ), + // const SizedBox(height: 5), + // ], + // ), + // ), + // ); + //} - Row( - mainAxisAlignment: MainAxisAlignment.end, + void _showBottomPanel() { + showModalBottomSheet( + context: context, + // 关键1:设置弹窗可滚动,避免内容超出 + isScrollControlled: true, + barrierColor: Colors.transparent, + // 关键2:禁止点击空白区域关闭弹窗 + isDismissible: false, + // 关键3:禁止拖拽关闭弹窗(可选,根据需求) + enableDrag: false, + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.vertical(top: Radius.circular(20)), + ), + builder: (context) { + return StatefulBuilder( + builder: (context, setState) { + // 关键2:移除固定高度,改用最小高度+自适应 + // 关键3:用SingleChildScrollView包裹,内容超出时可滚动 + return SingleChildScrollView( + // 关键4:适配底部安全区,避免被系统导航栏遮挡 + child: SafeArea( + child: Container( + padding: const EdgeInsets.all(16), + // 用最小高度替代固定高度,保证内容能完整显示 + constraints: const BoxConstraints(minHeight: 260), + child: Column( + // 关键5:设置mainAxisSize为min,Column高度自适应内容 + mainAxisSize: MainAxisSize.min, children: [ - TextButton( - onPressed: () { - Navigator.pop(context, false); // 取消 - }, - child: const Text("取消"), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + DropdownButton( + value: _robotMode, + items: const [ + DropdownMenuItem( + value: RobotMode.point, + child: Text("地图打点"), + ), + DropdownMenuItem( + value: RobotMode.robot, + child: Text("机器人模式"), + ), + ], + onChanged: (v) { + setState(() { + _robotMode = v!; + }); + }, + ), + GestureDetector( + onTap: () { + // 加号按钮点击逻辑 + debugPrint('点击了添加按钮'); + }, + child: Container( + width: 60, + height: 60, + decoration: const BoxDecoration( + color: Color(0xFF00C853), + shape: BoxShape.circle, + ), + child: const Icon( + Icons.add, + color: Colors.white, + size: 32, + ), + ), + ), + DropdownButton( + value: _areaMode, + items: const [ + DropdownMenuItem( + value: AreaMode.work, + child: Text("作业区域"), + ), + DropdownMenuItem( + value: AreaMode.obstacle, + child: Text("障碍区域"), + ), + ], + onChanged: (v) { + setState(() { + _areaMode = v!; + }); + }, + ), + ], ), - ElevatedButton( - onPressed: () { - Navigator.pop(context, true); // 确定 - }, - child: const Text("确定"), + const SizedBox(height: 32), + + // 操作按钮行 + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _buildActionButton( + icon: Icons.delete_outline, + label: '删除', + isEnabled: false, + onTap: () {}, + ), + _buildActionButton( + icon: Icons.undo_outlined, + label: '撤回', + isEnabled: false, + onTap: () {}, + ), + _buildActionButton( + icon: Icons.check_outlined, + label: '完成', + isEnabled: true, + onTap: () { + // 完成按钮点击逻辑 + debugPrint('点击了完成按钮'); + Navigator.pop(context); // 关闭底部弹窗 + }, + ), + ], ), + const SizedBox(height: 32), + + // 底部标签页切换 + Container( + decoration: BoxDecoration( + color: Colors.grey[200], + borderRadius: BorderRadius.circular(8), + ), + child: Row( + children: [ + Expanded( + child: GestureDetector( + onTap: () => debugPrint('切换到地块标签'), + child: Container( + padding: const EdgeInsets.symmetric( + vertical: 10, + ), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: const Center( + child: Text( + '地块', + style: TextStyle( + color: Colors.black87, + fontSize: 16, + fontWeight: FontWeight.w500, + ), + ), + ), + ), + ), + ), + Expanded( + child: GestureDetector( + onTap: () => debugPrint('切换到航线标签'), + child: const Center( + child: Text( + '航线', + style: TextStyle( + color: Colors.grey, + fontSize: 16, + fontWeight: FontWeight.w500, + ), + ), + ), + ), + ), + ], + ), + ), + const SizedBox(height: 5), // 底部留白 ], ), - ], + ), ), - ), - ); - }, - ); - }, - ); -} + ); + }, + ); + }, + ); + } -Widget _modeItem({ - required String title, - required String subtitle, - required bool isSelected, - required VoidCallback onTap, -}) { - return InkWell( - onTap: onTap, - child: Container( - padding: const EdgeInsets.all(14), - decoration: BoxDecoration( - border: Border.all( - color: isSelected ? Colors.lightBlue : Colors.grey.shade300, - ), - borderRadius: BorderRadius.circular(12), - color: isSelected ? Colors.lightBlue.shade50 : Colors.white, - ), - child: Row( + Widget _buildActionButton({ + required IconData icon, + required String label, + required bool isEnabled, + required VoidCallback onTap, + }) { + return InkWell( + onTap: isEnabled ? onTap : null, + child: Column( children: [ - Icon( - isSelected ? Icons.check_circle : Icons.circle_outlined, - color: isSelected ? Colors.lightBlue : Colors.grey, + Container( + width: 50, + height: 50, + decoration: BoxDecoration( + color: isEnabled ? Colors.blue : Colors.grey[300], + shape: BoxShape.circle, + ), + child: Icon(icon, color: Colors.white), ), - const SizedBox(width: 12), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(title, style: const TextStyle(fontWeight: FontWeight.bold)), - Text( - subtitle, - style: const TextStyle(fontSize: 12, color: Colors.grey), - ), - ], + const SizedBox(height: 6), + Text( + label, + style: TextStyle(color: isEnabled ? Colors.black : Colors.grey), ), ], ), - ), - ); -} + ); + } -void _showBottomPanel(BuildContext context) { - showModalBottomSheet( - context: context, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.vertical(top: Radius.circular(16)), - ), - builder: (context) { - return Container( - height: 200, - padding: const EdgeInsets.all(20), - child: Column( - children: const [ - Text( - "圈地操作面板", - style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), - ), - SizedBox(height: 20), - Text("这里放你的圈地操作按钮"), - ], - ), - ); - }, - ); + void _handleSubmit() { + debugPrint("作业模式: $_selectedWorkMode"); + debugPrint("机器人模式: $_robotMode"); + debugPrint("区域模式: $_areaMode"); + } } diff --git a/lib/features/home/presentation/widgets/startpoint_area.dart b/lib/features/home/presentation/widgets/startpoint_area.dart new file mode 100644 index 00000000..f2ba00cc --- /dev/null +++ b/lib/features/home/presentation/widgets/startpoint_area.dart @@ -0,0 +1,219 @@ +import 'package:flutter/material.dart'; +import 'package:maibu_satabot_v2/features/home/presentation/widgets/common/enum.dart'; +import 'package:maibu_satabot_v2/features/home/presentation/widgets/map/testmap_pages.dart'; + +/// 底部操作面板独立组件 +class BottomOperationPanel extends StatefulWidget { + // 外部传入的初始值 + final RobotMode initialRobotMode; + final AreaMode initialAreaMode; + // 回调函数:向外部传递事件 + final VoidCallback onComplete; // 完成按钮点击回调 + final ValueChanged? onRobotModeChanged; // 机器人模式变更回调 + final ValueChanged? onAreaModeChanged; // 作业区域模式变更回调 + final VoidCallback? onAddTap; // 加号按钮点击回调 + final VoidCallback? onLandTap; // 地块标签点击回调 + final VoidCallback? onRouteTap; // 航线标签点击回调 + + const BottomOperationPanel({ + super.key, + this.initialRobotMode = RobotMode.point, + this.initialAreaMode = AreaMode.work, + required this.onComplete, // 完成按钮必须传 + this.onRobotModeChanged, + this.onAreaModeChanged, + this.onAddTap, + this.onLandTap, + this.onRouteTap, + }); + + @override + State createState() => _BottomOperationPanelState(); +} + +class _BottomOperationPanelState extends State { + late RobotMode _robotMode; + late AreaMode _areaMode; + + @override + void initState() { + super.initState(); + // 初始化外部传入的默认值 + _robotMode = widget.initialRobotMode; + _areaMode = widget.initialAreaMode; + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: const BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.vertical(top: Radius.circular(20)), + boxShadow: [BoxShadow(color: Colors.black12, blurRadius: 8)], + ), + padding: const EdgeInsets.all(16), + constraints: const BoxConstraints(minHeight: 260), + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + // 面板核心内容 + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + DropdownButton( + value: _robotMode, + items: const [ + DropdownMenuItem( + value: RobotMode.point, + child: Text("地图打点"), + ), + DropdownMenuItem( + value: RobotMode.robot, + child: Text("机器人模式"), + ), + ], + onChanged: (v) { + if (v != null) { + setState(() => _robotMode = v); + // 触发回调,把选中的模式传给外部 + widget.onRobotModeChanged?.call(v); + } + }, + ), + GestureDetector( + onTap: () { + debugPrint('点击了添加按钮'); + // 触发加号按钮回调 + widget.onAddTap?.call(); + }, + child: Container( + width: 60, + height: 60, + decoration: const BoxDecoration( + color: Color(0xFF00C853), + shape: BoxShape.circle, + ), + child: const Icon(Icons.add, color: Colors.white, size: 32), + ), + ), + DropdownButton( + value: _areaMode, + items: const [ + DropdownMenuItem(value: AreaMode.work, child: Text("作业区域")), + DropdownMenuItem( + value: AreaMode.obstacle, + child: Text("障碍区域"), + ), + ], + onChanged: (v) { + if (v != null) { + setState(() => _areaMode = v); + // 触发回调,把选中的区域模式传给外部 + widget.onAreaModeChanged?.call(v); + } + }, + ), + ], + ), + const SizedBox(height: 32), + + // 操作按钮行 + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _buildActionButton(Icons.delete_outline, '删除', false, () {}), + _buildActionButton(Icons.undo_outlined, '撤回', false, () {}), + _buildActionButton(Icons.check_outlined, '完成', true, () { + // 触发完成按钮回调,通知外部关闭面板 + widget.onComplete.call(); + }), + ], + ), + const SizedBox(height: 32), + + // 底部标签页切换 + Container( + decoration: BoxDecoration( + color: Colors.grey[200], + borderRadius: BorderRadius.circular(8), + ), + child: Row( + children: [ + Expanded( + child: GestureDetector( + onTap: () { + debugPrint('切换到地块标签'); + widget.onLandTap?.call(); + }, + child: Container( + padding: const EdgeInsets.symmetric(vertical: 10), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: const Center( + child: Text( + '地块', + style: TextStyle( + color: Colors.black87, + fontSize: 16, + ), + ), + ), + ), + ), + ), + Expanded( + child: GestureDetector( + onTap: () { + debugPrint('切换到航线标签'); + widget.onRouteTap?.call(); + }, + child: const Center( + child: Text( + '航线', + style: TextStyle(color: Colors.grey, fontSize: 16), + ), + ), + ), + ), + ], + ), + ), + const SizedBox(height: 5), + ], + ), + ), + ); + } + + // 构建操作按钮 + Widget _buildActionButton( + IconData icon, + String label, + bool isEnabled, + VoidCallback onTap, + ) { + return GestureDetector( + onTap: isEnabled ? onTap : null, + child: Column( + children: [ + Icon( + icon, + color: isEnabled ? Colors.black87 : Colors.grey[400], + size: 32, + ), + const SizedBox(height: 8), + Text( + label, + style: TextStyle( + color: isEnabled ? Colors.black87 : Colors.grey[400], + fontSize: 16, + ), + ), + ], + ), + ); + } +} From 27717cbba2ba6b62f56002a2e1b736eaf0cf4064 Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Wed, 25 Feb 2026 18:39:09 +0800 Subject: [PATCH 3/6] test --- .../widgets/map/testmap_pages.dart | 6 +- .../presentation/widgets/path_list_pages.dart | 347 ------------------ .../presentation/widgets/startpoint_area.dart | 23 +- 3 files changed, 15 insertions(+), 361 deletions(-) diff --git a/lib/features/home/presentation/widgets/map/testmap_pages.dart b/lib/features/home/presentation/widgets/map/testmap_pages.dart index f862faf1..1235e237 100644 --- a/lib/features/home/presentation/widgets/map/testmap_pages.dart +++ b/lib/features/home/presentation/widgets/map/testmap_pages.dart @@ -164,7 +164,7 @@ class _MapPageEnterpriseState extends State { child: BottomOperationPanel( // 传入初始值 initialRobotMode:RobotMode.point , - initialAreaMode: _currentAreaMode, + initialAreaMode: AreaMode.work, // 接收面板的事件回调 onComplete: () { // 完成按钮点击:关闭面板 @@ -172,12 +172,12 @@ class _MapPageEnterpriseState extends State { }, onRobotModeChanged: (mode) { // 接收机器人模式变更 - //setState(() => _currentRobotMode = mode); + setState(() => _currentRobotMode = mode); debugPrint('外部收到机器人模式:$mode'); }, onAreaModeChanged: (mode) { // 接收作业区域模式变更 - //setState(() => _currentAreaMode = mode); + setState(() => _currentAreaMode = mode); debugPrint('外部收到区域模式:$mode'); }, onAddTap: () { diff --git a/lib/features/home/presentation/widgets/path_list_pages.dart b/lib/features/home/presentation/widgets/path_list_pages.dart index 998feb21..0293edc2 100644 --- a/lib/features/home/presentation/widgets/path_list_pages.dart +++ b/lib/features/home/presentation/widgets/path_list_pages.dart @@ -210,356 +210,9 @@ class _VerticalFloatMenuState extends State { ); } - /// ================= 底部面板 ================= - /// - /// // 构建底部面板(和原有样式一致,无遮罩) - //Widget _buildBottomPanel() { - // return Container( - // decoration: const BoxDecoration( - // color: Colors.white, - // borderRadius: BorderRadius.vertical(top: Radius.circular(20)), - // boxShadow: [BoxShadow(color: Colors.black12, blurRadius: 8)], - // ), - // padding: const EdgeInsets.all(16), - // constraints: const BoxConstraints(minHeight: 260), - // child: SingleChildScrollView( - // child: Column( - // mainAxisSize: MainAxisSize.min, - // children: [ - // // 顶部拖拽指示器(可选) - // Container( - // width: 40, - // height: 5, - // decoration: BoxDecoration( - // color: Colors.grey[300], - // borderRadius: BorderRadius.circular(3), - // ), - // ), - // const SizedBox(height: 16), - // // 面板核心内容 - // Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // DropdownButton( - // value: _robotMode, - // items: const [ - // DropdownMenuItem( - // value: RobotMode.point, - // child: Text("地图打点"), - // ), - // DropdownMenuItem( - // value: RobotMode.robot, - // child: Text("机器人模式"), - // ), - // ], - // onChanged: (v) { - // setState(() => _robotMode = v!); - // }, - // ), - // GestureDetector( - // onTap: () => debugPrint('点击了添加按钮'), - // child: Container( - // width: 60, - // height: 60, - // decoration: const BoxDecoration( - // color: Color(0xFF00C853), - // shape: BoxShape.circle, - // ), - // child: const Icon(Icons.add, color: Colors.white, size: 32), - // ), - // ), - // DropdownButton( - // value: _areaMode, - // items: const [ - // DropdownMenuItem(value: AreaMode.work, child: Text("作业区域")), - // DropdownMenuItem( - // value: AreaMode.obstacle, - // child: Text("障碍区域"), - // ), - // ], - // onChanged: (v) { - // setState(() => _areaMode = v!); - // }, - // ), - // ], - // ), - // const SizedBox(height: 32), - // // 操作按钮行 - // Row( - // mainAxisAlignment: MainAxisAlignment.spaceAround, - // children: [ - // _buildActionButton(Icons.delete_outline, '删除', false, () {}), - // _buildActionButton(Icons.undo_outlined, '撤回', false, () {}), - // _buildActionButton(Icons.check_outlined, '完成', true, () { - // setState(() => _isPanelOpen = false); // 完成后关闭面板 - // }), - // ], - // ), - // const SizedBox(height: 32), - // // 底部标签页切换 - // Container( - // decoration: BoxDecoration( - // color: Colors.grey[200], - // borderRadius: BorderRadius.circular(8), - // ), - // child: Row( - // children: [ - // Expanded( - // child: GestureDetector( - // onTap: () => debugPrint('切换到地块标签'), - // child: Container( - // padding: const EdgeInsets.symmetric(vertical: 10), - // decoration: BoxDecoration( - // color: Colors.white, - // borderRadius: BorderRadius.circular(8), - // ), - // child: const Center( - // child: Text( - // '地块', - // style: TextStyle( - // color: Colors.black87, - // fontSize: 16, - // ), - // ), - // ), - // ), - // ), - // ), - // Expanded( - // child: GestureDetector( - // onTap: () => debugPrint('切换到航线标签'), - // child: const Center( - // child: Text( - // '航线', - // style: TextStyle(color: Colors.grey, fontSize: 16), - // ), - // ), - // ), - // ), - // ], - // ), - // ), - // const SizedBox(height: 5), - // ], - // ), - // ), - // ); - //} - - void _showBottomPanel() { - showModalBottomSheet( - context: context, - // 关键1:设置弹窗可滚动,避免内容超出 - isScrollControlled: true, - barrierColor: Colors.transparent, - // 关键2:禁止点击空白区域关闭弹窗 - isDismissible: false, - // 关键3:禁止拖拽关闭弹窗(可选,根据需求) - enableDrag: false, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.vertical(top: Radius.circular(20)), - ), - builder: (context) { - return StatefulBuilder( - builder: (context, setState) { - // 关键2:移除固定高度,改用最小高度+自适应 - // 关键3:用SingleChildScrollView包裹,内容超出时可滚动 - return SingleChildScrollView( - // 关键4:适配底部安全区,避免被系统导航栏遮挡 - child: SafeArea( - child: Container( - padding: const EdgeInsets.all(16), - // 用最小高度替代固定高度,保证内容能完整显示 - constraints: const BoxConstraints(minHeight: 260), - child: Column( - // 关键5:设置mainAxisSize为min,Column高度自适应内容 - mainAxisSize: MainAxisSize.min, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - DropdownButton( - value: _robotMode, - items: const [ - DropdownMenuItem( - value: RobotMode.point, - child: Text("地图打点"), - ), - DropdownMenuItem( - value: RobotMode.robot, - child: Text("机器人模式"), - ), - ], - onChanged: (v) { - setState(() { - _robotMode = v!; - }); - }, - ), - GestureDetector( - onTap: () { - // 加号按钮点击逻辑 - debugPrint('点击了添加按钮'); - }, - child: Container( - width: 60, - height: 60, - decoration: const BoxDecoration( - color: Color(0xFF00C853), - shape: BoxShape.circle, - ), - child: const Icon( - Icons.add, - color: Colors.white, - size: 32, - ), - ), - ), - DropdownButton( - value: _areaMode, - items: const [ - DropdownMenuItem( - value: AreaMode.work, - child: Text("作业区域"), - ), - DropdownMenuItem( - value: AreaMode.obstacle, - child: Text("障碍区域"), - ), - ], - onChanged: (v) { - setState(() { - _areaMode = v!; - }); - }, - ), - ], - ), - const SizedBox(height: 32), - - // 操作按钮行 - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - _buildActionButton( - icon: Icons.delete_outline, - label: '删除', - isEnabled: false, - onTap: () {}, - ), - _buildActionButton( - icon: Icons.undo_outlined, - label: '撤回', - isEnabled: false, - onTap: () {}, - ), - _buildActionButton( - icon: Icons.check_outlined, - label: '完成', - isEnabled: true, - onTap: () { - // 完成按钮点击逻辑 - debugPrint('点击了完成按钮'); - Navigator.pop(context); // 关闭底部弹窗 - }, - ), - ], - ), - const SizedBox(height: 32), - - // 底部标签页切换 - Container( - decoration: BoxDecoration( - color: Colors.grey[200], - borderRadius: BorderRadius.circular(8), - ), - child: Row( - children: [ - Expanded( - child: GestureDetector( - onTap: () => debugPrint('切换到地块标签'), - child: Container( - padding: const EdgeInsets.symmetric( - vertical: 10, - ), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), - child: const Center( - child: Text( - '地块', - style: TextStyle( - color: Colors.black87, - fontSize: 16, - fontWeight: FontWeight.w500, - ), - ), - ), - ), - ), - ), - Expanded( - child: GestureDetector( - onTap: () => debugPrint('切换到航线标签'), - child: const Center( - child: Text( - '航线', - style: TextStyle( - color: Colors.grey, - fontSize: 16, - fontWeight: FontWeight.w500, - ), - ), - ), - ), - ), - ], - ), - ), - const SizedBox(height: 5), // 底部留白 - ], - ), - ), - ), - ); - }, - ); - }, - ); - } - - Widget _buildActionButton({ - required IconData icon, - required String label, - required bool isEnabled, - required VoidCallback onTap, - }) { - return InkWell( - onTap: isEnabled ? onTap : null, - child: Column( - children: [ - Container( - width: 50, - height: 50, - decoration: BoxDecoration( - color: isEnabled ? Colors.blue : Colors.grey[300], - shape: BoxShape.circle, - ), - child: Icon(icon, color: Colors.white), - ), - const SizedBox(height: 6), - Text( - label, - style: TextStyle(color: isEnabled ? Colors.black : Colors.grey), - ), - ], - ), - ); - } void _handleSubmit() { debugPrint("作业模式: $_selectedWorkMode"); diff --git a/lib/features/home/presentation/widgets/startpoint_area.dart b/lib/features/home/presentation/widgets/startpoint_area.dart index f2ba00cc..658fa17c 100644 --- a/lib/features/home/presentation/widgets/startpoint_area.dart +++ b/lib/features/home/presentation/widgets/startpoint_area.dart @@ -122,8 +122,8 @@ class _BottomOperationPanelState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - _buildActionButton(Icons.delete_outline, '删除', false, () {}), - _buildActionButton(Icons.undo_outlined, '撤回', false, () {}), + _buildActionButton(Icons.delete_outline, '删除', true, () {}), + _buildActionButton(Icons.undo_outlined, '撤回', true, () {}), _buildActionButton(Icons.check_outlined, '完成', true, () { // 触发完成按钮回调,通知外部关闭面板 widget.onComplete.call(); @@ -199,18 +199,19 @@ class _BottomOperationPanelState extends State { onTap: isEnabled ? onTap : null, child: Column( children: [ - Icon( - icon, - color: isEnabled ? Colors.black87 : Colors.grey[400], - size: 32, + Container( + width: 50, + height: 50, + decoration: BoxDecoration( + color: isEnabled ? Colors.blue : Colors.grey[300], + shape: BoxShape.circle, + ), + child: Icon(icon, color: Colors.white), ), - const SizedBox(height: 8), + const SizedBox(height: 6), Text( label, - style: TextStyle( - color: isEnabled ? Colors.black87 : Colors.grey[400], - fontSize: 16, - ), + style: TextStyle(color: isEnabled ? Colors.black : Colors.grey), ), ], ), From 07a653fca558ac5f404206d341350dc89726047b Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Wed, 25 Feb 2026 20:00:33 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E8=88=AA=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widgets/BottomDirectionLine.dart | 169 ++++++++++ .../widgets/map/testmap_pages.dart | 308 ++++++++++-------- .../presentation/widgets/path_list_pages.dart | 14 +- .../presentation/widgets/startpoint_area.dart | 299 ++++++++++++----- 4 files changed, 567 insertions(+), 223 deletions(-) create mode 100644 lib/features/home/presentation/widgets/BottomDirectionLine.dart diff --git a/lib/features/home/presentation/widgets/BottomDirectionLine.dart b/lib/features/home/presentation/widgets/BottomDirectionLine.dart new file mode 100644 index 00000000..188a5d29 --- /dev/null +++ b/lib/features/home/presentation/widgets/BottomDirectionLine.dart @@ -0,0 +1,169 @@ +import 'package:flutter/material.dart'; + +class RouteDirectionPanel extends StatefulWidget { // 重命名为Panel更符合组件语义 + // 接收外部传入的初始值 + final bool initialOptimalHeading; + final double initialDirection; + // 新增:回调函数 - 关闭面板/返回设置结果 + final ValueChanged>? onConfirm; + final VoidCallback? onCancel; + + const RouteDirectionPanel({ + super.key, + this.initialOptimalHeading = true, // 默认开启最优航向 + this.initialDirection = 0.0, // 默认方向0度 + this.onConfirm, + this.onCancel, + }); + + @override + State createState() => _RouteDirectionPanelState(); +} + +class _RouteDirectionPanelState extends State { + late bool _optimalHeading; + late double _direction; // 0-360度范围 + + @override + void initState() { + super.initState(); + _optimalHeading = widget.initialOptimalHeading; + _direction = widget.initialDirection.clamp(0, 360); // 限制在0-360度 + } + + @override + Widget build(BuildContext context) { + // 纯面板结构:无Scaffold,仅Container包裹核心UI + return Container( + decoration: const BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.vertical(top: Radius.circular(20)), + boxShadow: [BoxShadow(color: Colors.black12, blurRadius: 8)], + ), + padding: const EdgeInsets.all(16), + constraints: const BoxConstraints(minHeight: 300), // 最小高度保证UI完整 + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + // 顶部标题栏 + 返回按钮 + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + // 取消/返回按钮 + GestureDetector( + onTap: () { + widget.onCancel?.call(); // 触发取消回调 + }, + child: const Icon( + Icons.arrow_back_ios, + color: Colors.black87, + size: 20, + ), + ), + const Text( + '航线方向', + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w600, + color: Colors.black87, + ), + ), + const SizedBox(width: 24), // 占位保持标题居中 + ], + ), + const SizedBox(height: 20), + const Divider(height: 1, color: Colors.grey), + const SizedBox(height: 20), + + // 最优航向开关 + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + '最优航向', + style: TextStyle(fontSize: 16, color: Colors.black87), + ), + Switch( + value: _optimalHeading, + activeColor: const Color(0xFF00C853), + onChanged: (bool value) { + setState(() { + _optimalHeading = value; + }); + }, + ), + ], + ), + const SizedBox(height: 30), + + // 航线方向滑块 + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + '航线方向', + style: TextStyle(fontSize: 16, color: Colors.black87), + ), + Text( + '${_direction.toStringAsFixed(0)}°', + style: TextStyle( + fontSize: 16, + color: _optimalHeading ? Colors.grey : Colors.black87, + fontWeight: FontWeight.w500, + ), + ), + ], + ), + const SizedBox(height: 15), + Slider( + value: _direction, + min: 0, + max: 360, + divisions: 36, + label: '${_direction.toStringAsFixed(0)}°', + activeColor: const Color(0xFF00C853), + inactiveColor: Colors.grey[300], + onChanged: _optimalHeading + ? null + : (double value) { + setState(() { + _direction = value; + }); + }, + ), + ], + ), + const SizedBox(height: 40), + + // 确认按钮 + SizedBox( + width: double.infinity, + child: ElevatedButton( + onPressed: () { + // 触发确认回调,传递设置结果 + widget.onConfirm?.call({ + 'optimalHeading': _optimalHeading, + 'direction': _direction, + }); + }, + style: ElevatedButton.styleFrom( + backgroundColor: const Color(0xFF00C853), + foregroundColor: Colors.white, + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), + child: const Text('确认'), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/features/home/presentation/widgets/map/testmap_pages.dart b/lib/features/home/presentation/widgets/map/testmap_pages.dart index 1235e237..c10d9f43 100644 --- a/lib/features/home/presentation/widgets/map/testmap_pages.dart +++ b/lib/features/home/presentation/widgets/map/testmap_pages.dart @@ -4,12 +4,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; import 'package:geolocator/geolocator.dart'; import 'package:latlong2/latlong.dart'; +import 'package:maibu_satabot_v2/features/home/presentation/widgets/BottomDirectionLine.dart'; import 'package:maibu_satabot_v2/features/home/presentation/widgets/common/enum.dart'; import 'package:maibu_satabot_v2/features/home/presentation/widgets/startpoint_area.dart'; import '../path_list_pages.dart'; - class MapPageEnterprise extends StatefulWidget { const MapPageEnterprise({Key? key}) : super(key: key); @@ -24,8 +24,32 @@ class _MapPageEnterpriseState extends State { StreamSubscription? _positionSub; bool _hasMovedOnce = false; bool _isPanelOpen = false; // 控制面板显示/隐藏 - RobotMode _currentRobotMode = RobotMode.point; - AreaMode _currentAreaMode = AreaMode.work; + bool _directionBoxOpen = false; //航线面板显示/隐藏 + + RobotMode _currentRobotMode = RobotMode.point; //打点模式 + AreaMode _currentAreaMode = AreaMode.work; //作业区域还是障碍物区域 + WorkMode? _currentWorkMode = WorkMode.bow; // 当前作业模式 + + // ========== 新增:打点相关状态 ========== + List _markedPoints = []; // 存储所有打点的坐标 + int _pointIndex = 1; // 打点序号(用于标记显示) + + void _addMapMarker() { + // 1. 获取当前地图中心的坐标 + LatLng centerLatLng = _mapController.center; + + // 2. 记录打点坐标(带序号) + setState(() { + _markedPoints.add(centerLatLng); + }); + + // 3. 打印打点信息(调试用) + debugPrint( + '第$_pointIndex个点:纬度=${centerLatLng.latitude.toStringAsFixed(6)},经度=${centerLatLng.longitude.toStringAsFixed(6)}', + ); + // 4. 序号自增 + _pointIndex++; + } @override void initState() { @@ -58,15 +82,16 @@ class _MapPageEnterpriseState extends State { _updateLocation(gcj, moveMap: true); // 2️⃣ 实时监听(不再强制移动地图) - _positionSub = Geolocator.getPositionStream( - locationSettings: const LocationSettings( - accuracy: LocationAccuracy.bestForNavigation, - distanceFilter: 2, - ), - ).listen((pos) { - final gcj = wgs84ToGcj02(pos.latitude, pos.longitude); - _updateLocation(gcj, moveMap: false); - }); + _positionSub = + Geolocator.getPositionStream( + locationSettings: const LocationSettings( + accuracy: LocationAccuracy.bestForNavigation, + distanceFilter: 2, + ), + ).listen((pos) { + final gcj = wgs84ToGcj02(pos.latitude, pos.longitude); + _updateLocation(gcj, moveMap: false); + }); } /// =============================== @@ -101,102 +126,137 @@ class _MapPageEnterpriseState extends State { final menuHeight = 16 * 6; // 假设 VerticalFloatMenu 有 6 个选项,每个高度为 56 final maxTop = screenHeight - menuHeight; return Scaffold( - body: - SafeArea( + body: SafeArea( child: Stack( - children: [ - FlutterMap( - mapController: _mapController, - options: MapOptions( - initialCenter: - _currentLatLng ?? const LatLng(39.9042, 116.4074), - initialZoom: 15, - maxZoom: 18, - ), - children: [ - /// 高德瓦片(GCJ-02) - TileLayer( - urlTemplate: - 'https://webrd02.is.autonavi.com/appmaptile' - '?style=8&x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1' - '&key=bbb1f0f20eed6bf679eddf2625630aba', + children: [ + FlutterMap( + mapController: _mapController, + options: MapOptions( + initialCenter: + _currentLatLng ?? const LatLng(39.9042, 116.4074), + initialZoom: 15, + maxZoom: 18, ), - - /// 当前定位 Marker - if (_currentLatLng != null) - MarkerLayer( - markers: [ - Marker( - point: _currentLatLng!, - width: 40, - height: 40, - child: const Icon( - Icons.my_location, - color: Colors.blue, - size: 30, - ), - ), - ], + children: [ + /// 高德瓦片(GCJ-02) + TileLayer( + urlTemplate: + 'https://webrd02.is.autonavi.com/appmaptile' + '?style=8&x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1' + '&key=bbb1f0f20eed6bf679eddf2625630aba', ), - ], - ), - Positioned( - height: 336, - right: 16, - top: maxTop > 10 ? 11 : maxTop, // 确保不超出屏幕范围 - child: FloatingActionButton( - onPressed: _moveToCurrentLocation, - child: new VerticalFloatMenu( - onEditTap: (bool isOpen) { - // 关键:接收子组件的回调,修改外部的_isPanelOpen - setState(() { - _isPanelOpen = isOpen; - }); - },), + /// 当前定位 Marker + if (_currentLatLng != null) + MarkerLayer( + markers: [ + Marker( + point: _currentLatLng!, + width: 40, + height: 40, + child: const Icon( + Icons.my_location, + color: Colors.blue, + size: 30, + ), + ), + ], + ), + ], ), - ), - if (_isPanelOpen) + Positioned( - left: 0, - right: 0, - bottom: 0, - child: BottomOperationPanel( - // 传入初始值 - initialRobotMode:RobotMode.point , - initialAreaMode: AreaMode.work, - // 接收面板的事件回调 - onComplete: () { - // 完成按钮点击:关闭面板 - setState(() => _isPanelOpen = false); - }, - onRobotModeChanged: (mode) { - // 接收机器人模式变更 - setState(() => _currentRobotMode = mode); - debugPrint('外部收到机器人模式:$mode'); - }, - onAreaModeChanged: (mode) { - // 接收作业区域模式变更 - setState(() => _currentAreaMode = mode); - debugPrint('外部收到区域模式:$mode'); - }, - onAddTap: () { - // 加号按钮自定义逻辑 - debugPrint('外部处理加号按钮点击'); - }, - onLandTap: () { - // 地块标签自定义逻辑 - debugPrint('外部处理地块标签点击'); - }, - onRouteTap: () { - // 航线标签自定义逻辑 - debugPrint('外部处理航线标签点击'); - }, + height: 336, + right: 16, + top: maxTop > 10 ? 11 : maxTop, // 确保不超出屏幕范围 + child: FloatingActionButton( + onPressed: _moveToCurrentLocation, + child: new VerticalFloatMenu( + onEditTap: (bool isOpen) { + // 关键:接收子组件的回调,修改外部的_isPanelOpen + setState(() { + _isPanelOpen = isOpen; + }); + }, + onWorkModeSelected: (mode) { + // 接收作业模式选择结果 + _currentWorkMode = mode; + debugPrint('外部收到作业模式:$mode'); + }, + ), ), ), - ], + if (_isPanelOpen) + Positioned( + left: 0, + right: 0, + bottom: 0, + child: BottomOperationPanel( + // 传入初始值 + initialRobotMode: RobotMode.point, + initialAreaMode: AreaMode.work, + // 接收面板的事件回调 + onComplete: () { + // 完成按钮点击:关闭面板 + setState(() => _isPanelOpen = false); + }, + onRobotModeChanged: (mode) { + // 接收机器人模式变更 + setState(() => _currentRobotMode = mode); + debugPrint('外部收到机器人模式:$mode'); + }, + onAreaModeChanged: (mode) { + // 接收作业区域模式变更 + setState(() => _currentAreaMode = mode); + debugPrint('外部收到区域模式:$mode'); + }, + onAddTap: () { + // 加号按钮自定义逻辑 + _addMapMarker(); + debugPrint('外部处理加号按钮点击'); + }, + onSettingTap: () { + // 设置按钮自定义逻辑 + debugPrint('外部处理设置按钮点击'); + setState(() { + _directionBoxOpen = true; + }); + }, + onLandTap: () { + // 地块标签自定义逻辑 + debugPrint('外部处理地块标签点击'); + }, + onRouteTap: () { + // 航线标签自定义逻辑 + debugPrint('外部处理航线标签点击'); + }, + ), + ), + if (_directionBoxOpen) + Positioned( + left: 0, + right: 0, + bottom: 0, + child: RouteDirectionPanel( + initialOptimalHeading: true, + initialDirection: 0.0, + onConfirm: (result) { + // 处理确认结果 + debugPrint( + '最优航向:${result['optimalHeading']},角度:${result['direction']}', + ); + setState(() => _directionBoxOpen = false); + }, + onCancel: () { + // 关闭面板 + setState(() => _directionBoxOpen = false); + }, + ), + ), + ], + ), ), - )); + ); } } @@ -218,8 +278,7 @@ LatLng wgs84ToGcj02(double lat, double lon) { double magic = sin(radLat); magic = 1 - _ee * magic * magic; double sqrtMagic = sqrt(magic); - dLat = (dLat * 180.0) / - ((_a * (1 - _ee)) / (magic * sqrtMagic) * _pi); + dLat = (dLat * 180.0) / ((_a * (1 - _ee)) / (magic * sqrtMagic) * _pi); dLon = (dLon * 180.0) / (_a / sqrtMagic * cos(radLat) * _pi); double mgLat = lat + dLat; double mgLon = lon + dLon; @@ -227,52 +286,29 @@ LatLng wgs84ToGcj02(double lat, double lon) { } bool _outOfChina(double lat, double lon) { - return lon < 72.004 || - lon > 137.8347 || - lat < 0.8293 || - lat > 55.8271; + return lon < 72.004 || lon > 137.8347 || lat < 0.8293 || lat > 55.8271; } double _transformLat(double x, double y) { - double ret = -100.0 + + double ret = + -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * sqrt(x.abs()); - ret += (20.0 * sin(6.0 * x * _pi) + - 20.0 * sin(2.0 * x * _pi)) * - 2.0 / - 3.0; - ret += (20.0 * sin(y * _pi) + - 40.0 * sin(y / 3.0 * _pi)) * - 2.0 / - 3.0; - ret += (160.0 * sin(y / 12.0 * _pi) + - 320 * sin(y * _pi / 30.0)) * - 2.0 / - 3.0; + ret += (20.0 * sin(6.0 * x * _pi) + 20.0 * sin(2.0 * x * _pi)) * 2.0 / 3.0; + ret += (20.0 * sin(y * _pi) + 40.0 * sin(y / 3.0 * _pi)) * 2.0 / 3.0; + ret += (160.0 * sin(y / 12.0 * _pi) + 320 * sin(y * _pi / 30.0)) * 2.0 / 3.0; return ret; } double _transformLon(double x, double y) { - double ret = 300.0 + - x + - 2.0 * y + - 0.1 * x * x + - 0.1 * x * y + - 0.1 * sqrt(x.abs()); - ret += (20.0 * sin(6.0 * x * _pi) + - 20.0 * sin(2.0 * x * _pi)) * - 2.0 / - 3.0; - ret += (20.0 * sin(x * _pi) + - 40.0 * sin(x / 3.0 * _pi)) * - 2.0 / - 3.0; - ret += (150.0 * sin(x / 12.0 * _pi) + - 300.0 * sin(x / 30.0 * _pi)) * - 2.0 / - 3.0; + double ret = + 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * sqrt(x.abs()); + ret += (20.0 * sin(6.0 * x * _pi) + 20.0 * sin(2.0 * x * _pi)) * 2.0 / 3.0; + ret += (20.0 * sin(x * _pi) + 40.0 * sin(x / 3.0 * _pi)) * 2.0 / 3.0; + ret += + (150.0 * sin(x / 12.0 * _pi) + 300.0 * sin(x / 30.0 * _pi)) * 2.0 / 3.0; return ret; } diff --git a/lib/features/home/presentation/widgets/path_list_pages.dart b/lib/features/home/presentation/widgets/path_list_pages.dart index 0293edc2..21ce7015 100644 --- a/lib/features/home/presentation/widgets/path_list_pages.dart +++ b/lib/features/home/presentation/widgets/path_list_pages.dart @@ -4,7 +4,13 @@ import 'package:maibu_satabot_v2/features/home/presentation/widgets/common/enum. class VerticalFloatMenu extends StatefulWidget { final Function(int index, String name)? onItemTap; final ValueChanged? onEditTap; - const VerticalFloatMenu({super.key, this.onItemTap, this.onEditTap}); + final ValueChanged? onWorkModeSelected; // 新增:作业模式选择回调 + const VerticalFloatMenu({ + super.key, + this.onItemTap, + this.onEditTap, + this.onWorkModeSelected, + }); @override State createState() => _VerticalFloatMenuState(); @@ -63,6 +69,8 @@ class _VerticalFloatMenuState extends State { if (result != null) { _selectedWorkMode = result; widget.onEditTap?.call(true); + // ========== 核心修改:传递result到外部 ========== + widget.onWorkModeSelected?.call(result); //_showBottomPanel(); } } @@ -210,10 +218,6 @@ class _VerticalFloatMenuState extends State { ); } - - - - void _handleSubmit() { debugPrint("作业模式: $_selectedWorkMode"); debugPrint("机器人模式: $_robotMode"); diff --git a/lib/features/home/presentation/widgets/startpoint_area.dart b/lib/features/home/presentation/widgets/startpoint_area.dart index 658fa17c..5605fd37 100644 --- a/lib/features/home/presentation/widgets/startpoint_area.dart +++ b/lib/features/home/presentation/widgets/startpoint_area.dart @@ -7,6 +7,8 @@ class BottomOperationPanel extends StatefulWidget { // 外部传入的初始值 final RobotMode initialRobotMode; final AreaMode initialAreaMode; + // 新增:外部控制初始选中的标签(默认地块) + final String initialSelectedTab; // 回调函数:向外部传递事件 final VoidCallback onComplete; // 完成按钮点击回调 final ValueChanged? onRobotModeChanged; // 机器人模式变更回调 @@ -14,17 +16,20 @@ class BottomOperationPanel extends StatefulWidget { final VoidCallback? onAddTap; // 加号按钮点击回调 final VoidCallback? onLandTap; // 地块标签点击回调 final VoidCallback? onRouteTap; // 航线标签点击回调 + final VoidCallback? onSettingTap; // 设置标签点击回调 const BottomOperationPanel({ super.key, this.initialRobotMode = RobotMode.point, this.initialAreaMode = AreaMode.work, + this.initialSelectedTab = '地块', // 默认选中地块 required this.onComplete, // 完成按钮必须传 this.onRobotModeChanged, this.onAreaModeChanged, this.onAddTap, this.onLandTap, this.onRouteTap, + this.onSettingTap, }); @override @@ -34,6 +39,10 @@ class BottomOperationPanel extends StatefulWidget { class _BottomOperationPanelState extends State { late RobotMode _robotMode; late AreaMode _areaMode; + // 新增:当前选中的标签(地块/航线)- 核心状态 + late String _currentTab; + // 新增:航线模式下的作业行距(默认0.5米) + double _operationDistance = 0.5; @override void initState() { @@ -41,6 +50,8 @@ class _BottomOperationPanelState extends State { // 初始化外部传入的默认值 _robotMode = widget.initialRobotMode; _areaMode = widget.initialAreaMode; + // 初始化选中的标签 + _currentTab = widget.initialSelectedTab; } @override @@ -52,87 +63,13 @@ class _BottomOperationPanelState extends State { boxShadow: [BoxShadow(color: Colors.black12, blurRadius: 8)], ), padding: const EdgeInsets.all(16), - constraints: const BoxConstraints(minHeight: 260), + //constraints: const BoxConstraints(minHeight: 260), child: SingleChildScrollView( child: Column( mainAxisSize: MainAxisSize.min, children: [ - // 面板核心内容 - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - DropdownButton( - value: _robotMode, - items: const [ - DropdownMenuItem( - value: RobotMode.point, - child: Text("地图打点"), - ), - DropdownMenuItem( - value: RobotMode.robot, - child: Text("机器人模式"), - ), - ], - onChanged: (v) { - if (v != null) { - setState(() => _robotMode = v); - // 触发回调,把选中的模式传给外部 - widget.onRobotModeChanged?.call(v); - } - }, - ), - GestureDetector( - onTap: () { - debugPrint('点击了添加按钮'); - // 触发加号按钮回调 - widget.onAddTap?.call(); - }, - child: Container( - width: 60, - height: 60, - decoration: const BoxDecoration( - color: Color(0xFF00C853), - shape: BoxShape.circle, - ), - child: const Icon(Icons.add, color: Colors.white, size: 32), - ), - ), - DropdownButton( - value: _areaMode, - items: const [ - DropdownMenuItem(value: AreaMode.work, child: Text("作业区域")), - DropdownMenuItem( - value: AreaMode.obstacle, - child: Text("障碍区域"), - ), - ], - onChanged: (v) { - if (v != null) { - setState(() => _areaMode = v); - // 触发回调,把选中的区域模式传给外部 - widget.onAreaModeChanged?.call(v); - } - }, - ), - ], - ), - const SizedBox(height: 32), - - // 操作按钮行 - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - _buildActionButton(Icons.delete_outline, '删除', true, () {}), - _buildActionButton(Icons.undo_outlined, '撤回', true, () {}), - _buildActionButton(Icons.check_outlined, '完成', true, () { - // 触发完成按钮回调,通知外部关闭面板 - widget.onComplete.call(); - }), - ], - ), - const SizedBox(height: 32), - - // 底部标签页切换 + _buildTabContent(), + // 底部标签页切换(修复背景色切换+状态更新) Container( decoration: BoxDecoration( color: Colors.grey[200], @@ -143,13 +80,19 @@ class _BottomOperationPanelState extends State { Expanded( child: GestureDetector( onTap: () { + setState(() { + _currentTab = '地块'; // 更新选中状态 + }); debugPrint('切换到地块标签'); widget.onLandTap?.call(); }, child: Container( padding: const EdgeInsets.symmetric(vertical: 10), + // 选中地块时背景为白色,否则透明 decoration: BoxDecoration( - color: Colors.white, + color: _currentTab == '地块' + ? Colors.white + : Colors.transparent, borderRadius: BorderRadius.circular(8), ), child: const Center( @@ -167,13 +110,29 @@ class _BottomOperationPanelState extends State { Expanded( child: GestureDetector( onTap: () { + setState(() { + _currentTab = '航线'; // 更新选中状态 + }); debugPrint('切换到航线标签'); widget.onRouteTap?.call(); }, - child: const Center( - child: Text( - '航线', - style: TextStyle(color: Colors.grey, fontSize: 16), + child: Container( + padding: const EdgeInsets.symmetric(vertical: 10), + // 选中航线时背景为白色,否则透明 + decoration: BoxDecoration( + color: _currentTab == '航线' + ? Colors.white + : Colors.transparent, + borderRadius: BorderRadius.circular(8), + ), + child: const Center( + child: Text( + '航线', + style: TextStyle( + color: Colors.black87, + fontSize: 16, + ), + ), ), ), ), @@ -188,6 +147,182 @@ class _BottomOperationPanelState extends State { ); } + // 地块模式内容构建方法 + Widget _buildLandContent() { + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + // 面板核心内容 + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + DropdownButton( + value: _robotMode, + items: const [ + DropdownMenuItem(value: RobotMode.point, child: Text("地图打点")), + DropdownMenuItem(value: RobotMode.robot, child: Text("机器人模式")), + ], + onChanged: (v) { + if (v != null) { + setState(() => _robotMode = v); + widget.onRobotModeChanged?.call(v); + } + }, + ), + GestureDetector( + onTap: () { + debugPrint('点击了添加按钮'); + widget.onAddTap?.call(); + }, + child: Container( + width: 60, + height: 60, + decoration: const BoxDecoration( + color: Color(0xFF00C853), + shape: BoxShape.circle, + ), + child: const Icon(Icons.add, color: Colors.white, size: 32), + ), + ), + DropdownButton( + value: _areaMode, + items: const [ + DropdownMenuItem(value: AreaMode.work, child: Text("作业区域")), + DropdownMenuItem(value: AreaMode.obstacle, child: Text("障碍区域")), + ], + onChanged: (v) { + if (v != null) { + setState(() => _areaMode = v); + widget.onAreaModeChanged?.call(v); + } + }, + ), + ], + ), + const SizedBox(height: 32), + + // 操作按钮行 + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _buildActionButton(Icons.delete_outline, '删除', true, () {}), + _buildActionButton(Icons.undo_outlined, '撤回', true, () {}), + _buildActionButton(Icons.check_outlined, '完成', true, () { + widget.onComplete.call(); + }), + ], + ), + const SizedBox(height: 32), + ], + ); + } + + // 标签内容切换方法(地块/航线) + Widget _buildTabContent() { + if (_currentTab == '地块') { + // 地块模式:显示机器人/区域选择+操作按钮 + return _buildLandContent(); + } else { + // 航线模式:显示作业行距+航线方向设置 + return Column( + children: [ + // 作业行距配置行 + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + '作业行距(米)', + style: TextStyle(fontSize: 16, color: Colors.black87), + ), + Row( + children: [ + // 减号按钮 + GestureDetector( + onTap: () { + setState(() { + if (_operationDistance > 0.1) { + _operationDistance -= 0.1; + } + }); + }, + child: Container( + width: 30, + height: 30, + decoration: BoxDecoration( + color: Colors.grey[200], + shape: BoxShape.circle, + ), + child: const Icon( + Icons.remove, + size: 16, + color: Colors.black87, + ), + ), + ), + const SizedBox(width: 10), + // 行距数值 + Text( + '${_operationDistance.toStringAsFixed(1)}', + style: const TextStyle(fontSize: 16, color: Colors.black87), + ), + const SizedBox(width: 10), + // 加号按钮 + GestureDetector( + onTap: () { + setState(() { + _operationDistance += 0.1; + }); + }, + child: Container( + width: 30, + height: 30, + decoration: BoxDecoration( + color: Colors.grey[200], + shape: BoxShape.circle, + ), + child: const Icon( + Icons.add, + size: 16, + color: Colors.black87, + ), + ), + ), + ], + ), + ], + ), + const SizedBox(height: 16), + // 航线方向配置行 + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + '航线方向', + style: TextStyle(fontSize: 16, color: Colors.black87), + ), + // 设置按钮 + ElevatedButton( + onPressed: () { + widget.onSettingTap?.call(); + + debugPrint('点击了航线方向设置按钮'); + }, + style: ElevatedButton.styleFrom( + backgroundColor: const Color(0xFF00C853), + foregroundColor: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: const Text('设置'), + ), + ], + ), + ], + ); + } + } + // 构建操作按钮 Widget _buildActionButton( IconData icon, From 4d3872b5761b92e227088da40fdaed1f836e1a34 Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Wed, 25 Feb 2026 20:09:18 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=89=93=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widgets/map/testmap_pages.dart | 148 +++++++++++++----- 1 file changed, 108 insertions(+), 40 deletions(-) diff --git a/lib/features/home/presentation/widgets/map/testmap_pages.dart b/lib/features/home/presentation/widgets/map/testmap_pages.dart index c10d9f43..8515d381 100644 --- a/lib/features/home/presentation/widgets/map/testmap_pages.dart +++ b/lib/features/home/presentation/widgets/map/testmap_pages.dart @@ -30,31 +30,21 @@ class _MapPageEnterpriseState extends State { AreaMode _currentAreaMode = AreaMode.work; //作业区域还是障碍物区域 WorkMode? _currentWorkMode = WorkMode.bow; // 当前作业模式 - // ========== 新增:打点相关状态 ========== - List _markedPoints = []; // 存储所有打点的坐标 - int _pointIndex = 1; // 打点序号(用于标记显示) - - void _addMapMarker() { - // 1. 获取当前地图中心的坐标 - LatLng centerLatLng = _mapController.center; - - // 2. 记录打点坐标(带序号) - setState(() { - _markedPoints.add(centerLatLng); - }); - - // 3. 打印打点信息(调试用) - debugPrint( - '第$_pointIndex个点:纬度=${centerLatLng.latitude.toStringAsFixed(6)},经度=${centerLatLng.longitude.toStringAsFixed(6)}', - ); - // 4. 序号自增 - _pointIndex++; - } + // ========== 核心新增状态 ========== + List _markedPoints = []; // 存储所有打点坐标 + LatLng get _mapCenter => _mapController.center; // 实时获取地图中心坐标 + // ================================= @override void initState() { super.initState(); _initLocationEnterprise(); + // 监听地图移动事件,实时更新连线 + _mapController.mapEventStream.listen((event) { + if (event is MapEventMove || event is MapEventMoveEnd) { + setState(() {}); // 触发UI刷新,更新连线 + } + }); } /// =============================== @@ -114,6 +104,16 @@ class _MapPageEnterpriseState extends State { _mapController.move(_currentLatLng!, 17); } + // ========== 核心方法:打点逻辑 ========== + void _addMarkedPoint() { + setState(() { + _markedPoints.add(_mapCenter); // 在地图中心打点 + }); + debugPrint( + '新增打点:第${_markedPoints.length}个点,经纬度:${_mapCenter.latitude.toStringAsFixed(6)}, ${_mapCenter.longitude.toStringAsFixed(6)}', + ); + } + @override void dispose() { _positionSub?.cancel(); @@ -129,6 +129,7 @@ class _MapPageEnterpriseState extends State { body: SafeArea( child: Stack( children: [ + // 地图核心组件 FlutterMap( mapController: _mapController, options: MapOptions( @@ -136,6 +137,8 @@ class _MapPageEnterpriseState extends State { _currentLatLng ?? const LatLng(39.9042, 116.4074), initialZoom: 15, maxZoom: 18, + // 禁止地图点击事件(避免和中心标冲突) + onTap: (_, __) {}, // 空实现,禁用地图点击响应 ), children: [ /// 高德瓦片(GCJ-02) @@ -146,14 +149,30 @@ class _MapPageEnterpriseState extends State { '&key=bbb1f0f20eed6bf679eddf2625630aba', ), + /// ========== 新增:中心标与历史打点的虚线连线 ========== + if (_markedPoints.isNotEmpty) + PolylineLayer( + polylines: [ + for (var point in _markedPoints) + Polyline( + points: [_mapCenter, point], // 中心标 ↔ 历史打点 + color: Colors.orange.withOpacity( + 0.5, + ), // 降低透明度,模拟虚线视觉效果 + strokeWidth: 1.5, // 调细一点,更接近虚线 + // 去掉 dashArray,直接用实线 + ), + ], + ), + /// 当前定位 Marker if (_currentLatLng != null) MarkerLayer( markers: [ Marker( point: _currentLatLng!, - width: 40, - height: 40, + width: 20, + height: 20, child: const Icon( Icons.my_location, color: Colors.blue, @@ -162,76 +181,128 @@ class _MapPageEnterpriseState extends State { ), ], ), + + /// ========== 新增:历史打点的绿色标记 ========== + MarkerLayer( + markers: _markedPoints.asMap().entries.map((entry) { + int index = entry.key + 1; // 打点序号(从1开始) + LatLng point = entry.value; + + return Marker( + point: point, + width: 80, + height: 40, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + // 绿色打点标记 + Container( + width: 16, + height: 16, + decoration: const BoxDecoration( + color: Color(0xFF00C853), // 绿色主题色 + shape: BoxShape.circle, + boxShadow: [ + BoxShadow(color: Colors.black12, blurRadius: 2), + ], + ), + child: Center( + child: Text( + '$index', + style: const TextStyle( + color: Colors.white, + fontSize: 10, + fontWeight: FontWeight.bold, + ), + ), + ), + ), + ], + ), + ); + }).toList(), + ), ], ), + /// ========== 核心:地图正中心固定定位标 ========== + const Positioned( + left: 0, + right: 0, + top: 0, + bottom: 0, + child: Center( + child: Icon( + Icons.location_pin, // 定位标图标 + color: Colors.red, // 红色醒目 + size: 30, + shadows: [BoxShadow(color: Colors.white, blurRadius: 2)], + ), + ), + ), + + // 右侧悬浮菜单 Positioned( height: 336, right: 16, - top: maxTop > 10 ? 11 : maxTop, // 确保不超出屏幕范围 + top: maxTop > 10 ? 11 : maxTop, child: FloatingActionButton( onPressed: _moveToCurrentLocation, child: new VerticalFloatMenu( onEditTap: (bool isOpen) { - // 关键:接收子组件的回调,修改外部的_isPanelOpen setState(() { _isPanelOpen = isOpen; }); }, onWorkModeSelected: (mode) { - // 接收作业模式选择结果 _currentWorkMode = mode; debugPrint('外部收到作业模式:$mode'); }, ), ), ), + + // 底部操作面板 if (_isPanelOpen) Positioned( left: 0, right: 0, bottom: 0, child: BottomOperationPanel( - // 传入初始值 initialRobotMode: RobotMode.point, initialAreaMode: AreaMode.work, - // 接收面板的事件回调 onComplete: () { - // 完成按钮点击:关闭面板 setState(() => _isPanelOpen = false); }, onRobotModeChanged: (mode) { - // 接收机器人模式变更 setState(() => _currentRobotMode = mode); debugPrint('外部收到机器人模式:$mode'); }, onAreaModeChanged: (mode) { - // 接收作业区域模式变更 setState(() => _currentAreaMode = mode); debugPrint('外部收到区域模式:$mode'); }, + // ========== 绑定加号打点事件 ========== onAddTap: () { - // 加号按钮自定义逻辑 - _addMapMarker(); - debugPrint('外部处理加号按钮点击'); + _addMarkedPoint(); // 点击加号打点 + debugPrint('外部处理加号按钮点击,已添加打点'); }, onSettingTap: () { - // 设置按钮自定义逻辑 - debugPrint('外部处理设置按钮点击'); setState(() { _directionBoxOpen = true; }); + debugPrint('外部处理设置按钮点击'); }, onLandTap: () { - // 地块标签自定义逻辑 debugPrint('外部处理地块标签点击'); }, onRouteTap: () { - // 航线标签自定义逻辑 debugPrint('外部处理航线标签点击'); }, ), ), + + // 航线方向面板 if (_directionBoxOpen) Positioned( left: 0, @@ -241,14 +312,12 @@ class _MapPageEnterpriseState extends State { initialOptimalHeading: true, initialDirection: 0.0, onConfirm: (result) { - // 处理确认结果 debugPrint( '最优航向:${result['optimalHeading']},角度:${result['direction']}', ); setState(() => _directionBoxOpen = false); }, onCancel: () { - // 关闭面板 setState(() => _directionBoxOpen = false); }, ), @@ -263,7 +332,6 @@ class _MapPageEnterpriseState extends State { /// ======================================================= /// 坐标转换:WGS84 -> GCJ02(国内高德/腾讯通用) /// ======================================================= - const double _pi = 3.14159265358979324; const double _a = 6378245.0; const double _ee = 0.00669342162296594323; From 0b936f50aa7571bfb4230e00ffb6d44714183ee2 Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Wed, 25 Feb 2026 20:36:46 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=89=93=E7=82=B9=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widgets/map/CenterLocation.dart | 44 ++++++++++++++ .../widgets/map/HeadingPointer.dart | 57 ++++++++++++++++++ .../widgets/map/testmap_pages.dart | 58 ++++++++++++------- 3 files changed, 137 insertions(+), 22 deletions(-) create mode 100644 lib/features/home/presentation/widgets/map/CenterLocation.dart create mode 100644 lib/features/home/presentation/widgets/map/HeadingPointer.dart diff --git a/lib/features/home/presentation/widgets/map/CenterLocation.dart b/lib/features/home/presentation/widgets/map/CenterLocation.dart new file mode 100644 index 00000000..5e1923c7 --- /dev/null +++ b/lib/features/home/presentation/widgets/map/CenterLocation.dart @@ -0,0 +1,44 @@ +import 'package:flutter/material.dart'; + +class CrosshairPainter extends CustomPainter { + @override + void paint(Canvas canvas, Size size) { + // 十字中心坐标(精准对齐容器中心) + final centerX = size.width / 2; + final centerY = size.height / 2; + + // 十字画笔样式(红色醒目,匹配原有定位标风格) + final paint = Paint() + ..color = Colors.red + ..strokeWidth = + 2.0 // 十字线条宽度 + ..strokeCap = StrokeCap.round; // 线条端点圆润,更美观 + + // ========== 绘制水平横线(─) ========== + canvas.drawLine( + Offset(0, centerY), // 左端点 + Offset(size.width, centerY), // 右端点 + paint, + ); + + // ========== 绘制垂直竖线(│) ========== + canvas.drawLine( + Offset(centerX, 0), // 上端点 + Offset(centerX, size.height), // 下端点 + paint, + ); + + // 可选:中心小圆点(强化中心定位) + final centerDotPaint = Paint() + ..color = Colors.white + ..style = PaintingStyle.fill; + canvas.drawCircle( + Offset(centerX, centerY), + 1.5, // 中心圆点半径 + centerDotPaint, + ); + } + + @override + bool shouldRepaint(covariant CrosshairPainter oldDelegate) => false; +} diff --git a/lib/features/home/presentation/widgets/map/HeadingPointer.dart b/lib/features/home/presentation/widgets/map/HeadingPointer.dart new file mode 100644 index 00000000..1253c9d1 --- /dev/null +++ b/lib/features/home/presentation/widgets/map/HeadingPointer.dart @@ -0,0 +1,57 @@ +import 'dart:math'; +import 'package:flutter/material.dart'; + +class HeadingMarkerPainter extends CustomPainter { + final double headingAngle; // 航向角(度) + + HeadingMarkerPainter({required this.headingAngle}); + + @override + void paint(Canvas canvas, Size size) { + // 中心点坐标(对应SVG的cx=20, cy=20) + final center = Offset(size.width / 2, size.height / 2); + // 圆圈半径(对应SVG的r=10) + final circleRadius = 10.0; + + // ========== 1. 绘制绿色半透明圆圈(SVG的circle) ========== + final circlePaint = Paint() + ..color = const Color(0xFF1AFA29) + .withOpacity(0.7) // #1afa29 70%透明度 + ..style = PaintingStyle.fill; + canvas.drawCircle(center, circleRadius, circlePaint); + + // 绘制白色描边(SVG的stroke="#fff" stroke-width="2") + final strokePaint = Paint() + ..color = Colors.white + ..style = PaintingStyle.stroke + ..strokeWidth = 2.0; + canvas.drawCircle(center, circleRadius, strokePaint); + + // ========== 2. 绘制航向箭头(SVG的path) ========== + // 保存画布状态(旋转后恢复) + canvas.save(); + // 平移+旋转:以圆心为旋转中心,根据航向角旋转(对应SVG的transform) + canvas.translate(center.dx, center.dy); + canvas.rotate(headingAngle * pi / 180); // 角度转弧度 + + // 箭头路径(对应SVG的d="M0,-8 L4,4 L0,1 L-4,4 Z") + final arrowPath = Path() + ..moveTo(0, -8) // 顶部顶点 + ..lineTo(4, 4) // 右侧点 + ..lineTo(0, 1) // 中下点 + ..lineTo(-4, 4) // 左侧点 + ..close(); // 闭合路径 + + final arrowPaint = Paint()..color = Colors.white; + canvas.drawPath(arrowPath, arrowPaint); + + // 恢复画布状态 + canvas.restore(); + } + + @override + bool shouldRepaint(covariant HeadingMarkerPainter oldDelegate) { + // 航向角变化时重新绘制 + return oldDelegate.headingAngle != headingAngle; + } +} diff --git a/lib/features/home/presentation/widgets/map/testmap_pages.dart b/lib/features/home/presentation/widgets/map/testmap_pages.dart index 8515d381..2d2df9ea 100644 --- a/lib/features/home/presentation/widgets/map/testmap_pages.dart +++ b/lib/features/home/presentation/widgets/map/testmap_pages.dart @@ -6,6 +6,8 @@ import 'package:geolocator/geolocator.dart'; import 'package:latlong2/latlong.dart'; import 'package:maibu_satabot_v2/features/home/presentation/widgets/BottomDirectionLine.dart'; import 'package:maibu_satabot_v2/features/home/presentation/widgets/common/enum.dart'; +import 'package:maibu_satabot_v2/features/home/presentation/widgets/map/CenterLocation.dart'; +import 'package:maibu_satabot_v2/features/home/presentation/widgets/map/HeadingPointer.dart'; import 'package:maibu_satabot_v2/features/home/presentation/widgets/startpoint_area.dart'; import '../path_list_pages.dart'; @@ -33,6 +35,7 @@ class _MapPageEnterpriseState extends State { // ========== 核心新增状态 ========== List _markedPoints = []; // 存储所有打点坐标 LatLng get _mapCenter => _mapController.center; // 实时获取地图中心坐标 + double _headingAngle = 0.0; // 航向角(单位:度) // ================================= @override @@ -150,18 +153,26 @@ class _MapPageEnterpriseState extends State { ), /// ========== 新增:中心标与历史打点的虚线连线 ========== + /// + /// if (_markedPoints.length >= 2) + PolylineLayer( + polylines: [ + for (int i = 0; i < _markedPoints.length - 1; i++) + Polyline( + points: [_markedPoints[i], _markedPoints[i + 1]], + color: Colors.orange.withOpacity(0.5), + strokeWidth: 1.5, + ), + ], + ), if (_markedPoints.isNotEmpty) PolylineLayer( polylines: [ - for (var point in _markedPoints) - Polyline( - points: [_mapCenter, point], // 中心标 ↔ 历史打点 - color: Colors.orange.withOpacity( - 0.5, - ), // 降低透明度,模拟虚线视觉效果 - strokeWidth: 1.5, // 调细一点,更接近虚线 - // 去掉 dashArray,直接用实线 - ), + Polyline( + points: [_mapCenter, _markedPoints.last], + color: Colors.blue.withOpacity(0.5), + strokeWidth: 1.5, + ), ], ), @@ -171,12 +182,13 @@ class _MapPageEnterpriseState extends State { markers: [ Marker( point: _currentLatLng!, - width: 20, - height: 20, - child: const Icon( - Icons.my_location, - color: Colors.blue, - size: 30, + width: 40, + height: 40, + child: CustomPaint( + size: const Size(40, 40), + painter: HeadingMarkerPainter( + headingAngle: _headingAngle, + ), ), ), ], @@ -195,6 +207,7 @@ class _MapPageEnterpriseState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ + const SizedBox(height: 8), // 向下偏移8px(抵消默认的顶部对齐) // 绿色打点标记 Container( width: 16, @@ -226,21 +239,22 @@ class _MapPageEnterpriseState extends State { ), /// ========== 核心:地图正中心固定定位标 ========== - const Positioned( + Positioned( left: 0, right: 0, top: 0, bottom: 0, child: Center( - child: Icon( - Icons.location_pin, // 定位标图标 - color: Colors.red, // 红色醒目 - size: 30, - shadows: [BoxShadow(color: Colors.white, blurRadius: 2)], + // 自定义十字标(中心精准对齐地图中心) + child: SizedBox( + width: 16, // 十字整体宽度 + height: 16, // 十字整体高度 + child: CustomPaint( + painter: CrosshairPainter(), // 自定义十字画笔 + ), ), ), ), - // 右侧悬浮菜单 Positioned( height: 336,