diff --git a/.sentry-native/034a4ca6-41b7-4a5b-59ce-ceee930f65b7.run.lock b/.sentry-native/034a4ca6-41b7-4a5b-59ce-ceee930f65b7.run.lock new file mode 100644 index 00000000..e69de29b diff --git a/.sentry-native/034a4ca6-41b7-4a5b-59ce-ceee930f65b7.run/__sentry-breadcrumb1 b/.sentry-native/034a4ca6-41b7-4a5b-59ce-ceee930f65b7.run/__sentry-breadcrumb1 new file mode 100644 index 00000000..e5750ae9 --- /dev/null +++ b/.sentry-native/034a4ca6-41b7-4a5b-59ce-ceee930f65b7.run/__sentry-breadcrumb1 @@ -0,0 +1 @@ +„©timestamp¸2026-01-21T02:30:45.965Z§message±Bloc State Change¨category¬DevicesCubit¥level¤info„©timestamp¸2026-01-21T02:30:47.487Z§message±Bloc State Change¨category¬DevicesCubit¥level¤info„©timestamp¸2026-01-21T02:31:06.232Z§message±Bloc State Change¨category²RemoteControlCubit¥level¤info \ No newline at end of file diff --git a/.sentry-native/034a4ca6-41b7-4a5b-59ce-ceee930f65b7.run/__sentry-breadcrumb2 b/.sentry-native/034a4ca6-41b7-4a5b-59ce-ceee930f65b7.run/__sentry-breadcrumb2 new file mode 100644 index 00000000..e69de29b diff --git a/.sentry-native/034a4ca6-41b7-4a5b-59ce-ceee930f65b7.run/__sentry-event b/.sentry-native/034a4ca6-41b7-4a5b-59ce-ceee930f65b7.run/__sentry-event new file mode 100644 index 00000000..0c91ca11 --- /dev/null +++ b/.sentry-native/034a4ca6-41b7-4a5b-59ce-ceee930f65b7.run/__sentry-event @@ -0,0 +1 @@ +Ѝevent_idÙ$709a4f2d-cd3d-458c-e80f-a9cba0425332¥level¥fatal¨platform¦native§release¸maibu_satabot_v2@1.0.0+1¤dist¡1«environment£dev£sdk„¤nameµsentry.native.flutter§version¦0.12.3¨packages‘‚¤name¾github:getsentry/sentry-native§version¦0.12.3¬integrations‘¨crashpad¤tags€¥extra€¨contexts‚¢os„¤name§Windows®kernel_version¯10.0.26100.7623§versionª10.0.26200¥build¤7623¥traceƒ¨trace_idÙ be1adb8b6f544f5503b93be1d08a18f4§span_id°239fbdcb568d4d61«sample_randË?ìr>f¶FÁ \ No newline at end of file diff --git a/.sentry-native/034a4ca6-41b7-4a5b-59ce-ceee930f65b7.run/session.json b/.sentry-native/034a4ca6-41b7-4a5b-59ce-ceee930f65b7.run/session.json new file mode 100644 index 00000000..0564d9cc --- /dev/null +++ b/.sentry-native/034a4ca6-41b7-4a5b-59ce-ceee930f65b7.run/session.json @@ -0,0 +1 @@ +{"init":true,"sid":"eecc3202-8da3-4dc3-029b-163ce45aa4e5","status":"ok","errors":0,"started":"2026-01-21T02:30:45.355553Z","duration":3.9e-05,"attrs":{"release":"maibu_satabot_v2@1.0.0+1","environment":"dev"}} \ No newline at end of file diff --git a/.sentry-native/attachments/c24fd2f4-3978-4c5f-a305-bda998989b14/__sentry-breadcrumb1 b/.sentry-native/attachments/c24fd2f4-3978-4c5f-a305-bda998989b14/__sentry-breadcrumb1 new file mode 100644 index 00000000..393748eb --- /dev/null +++ b/.sentry-native/attachments/c24fd2f4-3978-4c5f-a305-bda998989b14/__sentry-breadcrumb1 @@ -0,0 +1 @@ +„©timestamp¸2026-01-21T02:18:37.049Z§message±Bloc State Change¨categoryªLoginCubit¥level¤info„©timestamp¸2026-01-21T02:18:37.699Z§message±Bloc State Change¨categoryªLoginCubit¥level¤info„©timestamp¸2026-01-21T02:18:37.795Z§message±Bloc State Change¨category¬DevicesCubit¥level¤info„©timestamp¸2026-01-21T02:18:39.116Z§message±Bloc State Change¨category¬DevicesCubit¥level¤info„©timestamp¸2026-01-21T02:18:43.247Z§message±Bloc State Change¨category²RemoteControlCubit¥level¤info \ No newline at end of file diff --git a/.sentry-native/attachments/c24fd2f4-3978-4c5f-a305-bda998989b14/__sentry-breadcrumb2 b/.sentry-native/attachments/c24fd2f4-3978-4c5f-a305-bda998989b14/__sentry-breadcrumb2 new file mode 100644 index 00000000..e69de29b diff --git a/.sentry-native/attachments/c24fd2f4-3978-4c5f-a305-bda998989b14/__sentry-event b/.sentry-native/attachments/c24fd2f4-3978-4c5f-a305-bda998989b14/__sentry-event new file mode 100644 index 00000000..b306ed17 --- /dev/null +++ b/.sentry-native/attachments/c24fd2f4-3978-4c5f-a305-bda998989b14/__sentry-event @@ -0,0 +1 @@ +‹¨event_idÙ$5096be53-cd0a-472c-a65f-d4a8ef540f0a©timestamp»2026-01-21T02:19:04.069949Z¨platform¦native¥level¥fatal§release¸maibu_satabot_v2@1.0.0+1¤dist¡1«environment£dev£sdk„¤nameµsentry.native.flutter§version¦0.12.3¨packages‘‚¤name¾github:getsentry/sentry-native§version¦0.12.3¬integrations‘¨crashpad¤tags€¥extra€¨contexts‚¢os„¤name§Windows®kernel_version¯10.0.26100.7623§versionª10.0.26200¥build¤7623¥traceƒ¨trace_idÙ 615025365992442f6062478eea0ee0bf§span_id°36fcbd26139942a2«sample_randË?ͧ±G  \ No newline at end of file diff --git a/.sentry-native/last_crash b/.sentry-native/last_crash new file mode 100644 index 00000000..e41fdb00 --- /dev/null +++ b/.sentry-native/last_crash @@ -0,0 +1 @@ +2026-01-21T02:19:04.070843Z \ No newline at end of file diff --git a/.sentry-native/metadata b/.sentry-native/metadata new file mode 100644 index 00000000..664d287e Binary files /dev/null and b/.sentry-native/metadata differ diff --git a/.sentry-native/reports/c24fd2f4-3978-4c5f-a305-bda998989b14.dmp b/.sentry-native/reports/c24fd2f4-3978-4c5f-a305-bda998989b14.dmp new file mode 100644 index 00000000..efdba065 Binary files /dev/null and b/.sentry-native/reports/c24fd2f4-3978-4c5f-a305-bda998989b14.dmp differ diff --git a/.sentry-native/settings.dat b/.sentry-native/settings.dat new file mode 100644 index 00000000..cb61b30d Binary files /dev/null and b/.sentry-native/settings.dat differ diff --git a/android/.kotlin/errors/errors-1768874436348.log b/android/.kotlin/errors/errors-1768874436348.log new file mode 100644 index 00000000..7a603b35 --- /dev/null +++ b/android/.kotlin/errors/errors-1768874436348.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\Flutter\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\Flutter\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\CC\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\flutter_webrtc-1.2.1\android\src\main\java\com\cloudwebrtc\webrtc\SimulcastVideoEncoderFactoryWrapper.kt and D:\Code\Flutter\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\CC\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\flutter_webrtc-1.2.1\android\src\main\java\com\cloudwebrtc\webrtc\SimulcastVideoEncoderFactoryWrapper.kt and D:\Code\Flutter\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\CC\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\flutter_webrtc-1.2.1\android\src\main\java\com\cloudwebrtc\webrtc\SimulcastVideoEncoderFactoryWrapper.kt and D:\Code\Flutter\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\Flutter\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\CC\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\flutter_webrtc-1.2.1\android\src\main\java\com\cloudwebrtc\webrtc\SimulcastVideoEncoderFactoryWrapper.kt and D:\Code\Flutter\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\CC\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\flutter_webrtc-1.2.1\android\src\main\java\com\cloudwebrtc\webrtc\SimulcastVideoEncoderFactoryWrapper.kt and D:\Code\Flutter\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\Flutter\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\CC\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\flutter_webrtc-1.2.1\android\src\main\java\com\cloudwebrtc\webrtc\SimulcastVideoEncoderFactoryWrapper.kt and D:\Code\Flutter\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-1768901667936.log b/android/.kotlin/errors/errors-1768901667936.log new file mode 100644 index 00000000..797819c3 --- /dev/null +++ b/android/.kotlin/errors/errors-1768901667936.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\Flutter\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\Flutter\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\CC\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\Flutter\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\CC\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\Flutter\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\CC\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\Flutter\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\Flutter\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\CC\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\Flutter\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\CC\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\Flutter\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\Flutter\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\CC\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\Flutter\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-1768901667996.log b/android/.kotlin/errors/errors-1768901667996.log new file mode 100644 index 00000000..81f5600b --- /dev/null +++ b/android/.kotlin/errors/errors-1768901667996.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\Flutter\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\Flutter\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\CC\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\Flutter\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\CC\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\Flutter\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\CC\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\Flutter\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\Flutter\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\CC\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\Flutter\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\CC\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\Flutter\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\Flutter\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\CC\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\Flutter\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-1768901668021.log b/android/.kotlin/errors/errors-1768901668021.log new file mode 100644 index 00000000..dab80af4 --- /dev/null +++ b/android/.kotlin/errors/errors-1768901668021.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\Flutter\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\Flutter\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\CC\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\sentry_flutter-9.10.0\android\src\main\kotlin\io\sentry\flutter\ReplayRecorderCallbacks.kt and D:\Code\Flutter\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\CC\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\sentry_flutter-9.10.0\android\src\main\kotlin\io\sentry\flutter\ReplayRecorderCallbacks.kt and D:\Code\Flutter\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\CC\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\sentry_flutter-9.10.0\android\src\main\kotlin\io\sentry\flutter\ReplayRecorderCallbacks.kt and D:\Code\Flutter\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\Flutter\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\CC\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\sentry_flutter-9.10.0\android\src\main\kotlin\io\sentry\flutter\ReplayRecorderCallbacks.kt and D:\Code\Flutter\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\CC\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\sentry_flutter-9.10.0\android\src\main\kotlin\io\sentry\flutter\ReplayRecorderCallbacks.kt and D:\Code\Flutter\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\Flutter\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\CC\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\sentry_flutter-9.10.0\android\src\main\kotlin\io\sentry\flutter\ReplayRecorderCallbacks.kt and D:\Code\Flutter\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/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index ba8b796c..c4862729 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,10 +1,21 @@ - + + + + + + + + + - - + fill="none" + stroke="black" + stroke-width="2" + stroke-linecap="round" + stroke-linejoin="round"> + + \ No newline at end of file diff --git a/devtools_options.yaml b/devtools_options.yaml index fa0b357c..37857c44 100644 --- a/devtools_options.yaml +++ b/devtools_options.yaml @@ -1,3 +1,4 @@ description: This file stores settings for Dart & Flutter DevTools. documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states extensions: + - get_it: true \ No newline at end of file diff --git a/lib/core/di/injection.dart b/lib/core/di/injection.dart index 3634f0d0..cc106048 100644 --- a/lib/core/di/injection.dart +++ b/lib/core/di/injection.dart @@ -1,6 +1,8 @@ import 'package:dio/dio.dart'; import 'package:get_it/get_it.dart'; import 'package:go_router/go_router.dart'; +import 'package:maibu_satabot_v2/core/infrastructure/logging/sentry_logger_impl.dart'; +import 'package:maibu_satabot_v2/core/logging/i_logger_service.dart'; import 'package:maibu_satabot_v2/features/devices/data/datasources/impl/device_http_datasource_impl.dart'; import 'package:maibu_satabot_v2/features/devices/domain/repositories/device_repository.dart'; import 'package:maibu_satabot_v2/features/devices/domain/usecases/get_user_device_usecase.dart'; @@ -54,6 +56,9 @@ Future init() async { () => UserStorageImpl(sl()), ); + /// 1.3 Log工具Sentry + sl.registerLazySingleton(() => SentryLoggerImpl()); + /// 2. 数据源 (DataSource) sl.registerLazySingleton( () => AuthHttpDataSourceImpl(sl()), diff --git a/lib/core/env/env_config.dart b/lib/core/env/env_config.dart new file mode 100644 index 00000000..5859fc23 --- /dev/null +++ b/lib/core/env/env_config.dart @@ -0,0 +1,16 @@ +class EnvConfig { + static const String environment = String.fromEnvironment( + 'ENV', + defaultValue: 'dev', + ); + + static String get sentryDsn { + // 根据环境切换 DSN(去 Sentry 后台创建两个项目:Test 和 Prod) + if (environment == 'prod') { + return 'https://your_prod_dsn@sentry.io/123'; + } + return 'https://your_test_dsn@sentry.io/456'; + } + + static bool get isProduction => environment == 'prod'; +} diff --git a/lib/core/error/exception_logger.dart b/lib/core/error/exception_logger.dart new file mode 100644 index 00000000..048a39f2 --- /dev/null +++ b/lib/core/error/exception_logger.dart @@ -0,0 +1,18 @@ +// lib/core/error/exception_logger.dart +abstract class ExceptionLogger { + Future init(); + // 捕获异常 + Future captureException(dynamic exception, {dynamic stackTrace}); + // 捕获普通消息(Debug 用) + Future captureMessage(String message, {bool isWarning = false}); + // 设置用户信息 + Future setUserContext(String userId, {String? username}); + // 设置设备/环境标签 + Future setTag(String key, String value); + // 添加行为足迹 + void addBreadcrumb( + String message, { + String? category, + Map? data, + }); +} diff --git a/lib/core/infrastructure/logging/app_bloc_observer.dart b/lib/core/infrastructure/logging/app_bloc_observer.dart new file mode 100644 index 00000000..7a084594 --- /dev/null +++ b/lib/core/infrastructure/logging/app_bloc_observer.dart @@ -0,0 +1,22 @@ +import 'package:flutter_bloc/flutter_bloc.dart'; +import '../../logging/i_logger_service.dart'; + +class AppBlocObserver extends BlocObserver { + final ILoggerService logger; + AppBlocObserver(this.logger); + + @override + void onError(BlocBase bloc, Object error, StackTrace stackTrace) { + super.onError(bloc, error, stackTrace); + logger.captureException(error, stackTrace: stackTrace); + } + + @override + void onChange(BlocBase bloc, Change change) { + super.onChange(bloc, change); + logger.addBreadcrumb( + 'Bloc State Change', + category: bloc.runtimeType.toString(), + ); + } +} diff --git a/lib/core/infrastructure/logging/sentry_logger_impl.dart b/lib/core/infrastructure/logging/sentry_logger_impl.dart new file mode 100644 index 00000000..e7112fdb --- /dev/null +++ b/lib/core/infrastructure/logging/sentry_logger_impl.dart @@ -0,0 +1,111 @@ +// lib/core/infrastructure/logging/sentry_logger_impl.dart +import 'dart:io'; +import 'package:device_info_plus/device_info_plus.dart'; +import 'package:flutter/foundation.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:sentry_flutter/sentry_flutter.dart'; +import '../../env/env_config.dart'; +import '../../logging/i_logger_service.dart'; +import 'package:intl/intl.dart'; + +class SentryLoggerImpl implements ILoggerService { + File? _localLogFile; + + @override + Future init() async { + await SentryFlutter.init((options) { + options.dsn = EnvConfig.sentryDsn; + options.environment = EnvConfig.environment; + // 生产环境只采样 20% 的性能数据,测试环境全开 + options.tracesSampleRate = EnvConfig.isProduction ? 0.2 : 1.0; + }); + await _collectDeviceInfo(); + + await _prepareLocalFile(); + } + + // 准备本地文件路径 + Future _prepareLocalFile() async { + try { + final directory = await getApplicationDocumentsDirectory(); + // 按天生成文件名,例如: 2024-05-20_logs.txt + final fileName = + "${DateFormat('yyyy-MM-dd').format(DateTime.now())}_logs.txt"; + _localLogFile = File('${directory.path}/$fileName'); + + if (!await _localLogFile!.exists()) { + await _localLogFile!.create(recursive: true); + } + } catch (e) { + debugPrint("无法创建本地日志文件: $e"); + } + } + + Future _collectDeviceInfo() async { + final deviceInfo = DeviceInfoPlugin(); + Sentry.configureScope((scope) async { + if (Platform.isAndroid) { + final android = await deviceInfo.androidInfo; + scope.setTag('device_model', android.model); + scope.setTag('os_version', android.version.release); + } else if (Platform.isIOS) { + final ios = await deviceInfo.iosInfo; + scope.setTag('device_model', ios.utsname.machine); + scope.setTag('os_version', ios.systemVersion); + } + }); + } + + @override + void captureException(dynamic exception, {dynamic stackTrace}) { + Sentry.captureException(exception, stackTrace: stackTrace); + } + + @override + void log( + String message, { + bool isWarning = false, + Map? data, + }) { + final timestamp = DateTime.now().toIso8601String(); + final level = isWarning ? 'WARNING' : 'INFO'; + final logEntry = "[$timestamp] [$level] $message ${data ?? ''}\n"; + + // 1.发送日志到 Sentry + Sentry.captureMessage( + message, + level: isWarning ? SentryLevel.warning : SentryLevel.info, + ); + + // 2.写入本地文件 + _writeToLocalFile(logEntry); + + if (kDebugMode) { + debugPrint(logEntry); + } + } + + Future _writeToLocalFile(String entry) async { + try { + // 使用追加模式写入 + await _localLogFile?.writeAsString(entry, mode: FileMode.append); + } catch (e) { + // 本地写入失败不应崩溃 + } + } + + // 增加一个获取本地日志文件路径的方法,方便你以后做“导出日志”功能 + Future getLocalLogPath() async { + return _localLogFile?.path; + } + + @override + void addBreadcrumb(String message, {String? category}) { + Sentry.addBreadcrumb(Breadcrumb(message: message, category: category)); + } + + @override + void setUser(String userId) { + Sentry.configureScope((scope) => scope.setUser(SentryUser(id: userId))); + } +} diff --git a/lib/core/logging/i_logger_service.dart b/lib/core/logging/i_logger_service.dart new file mode 100644 index 00000000..6314cb86 --- /dev/null +++ b/lib/core/logging/i_logger_service.dart @@ -0,0 +1,11 @@ +abstract class ILoggerService { + Future init(); + void captureException(dynamic exception, {dynamic stackTrace}); + void log( + String message, { + bool isWarning = false, + Map? data, + }); + void addBreadcrumb(String message, {String? category}); + void setUser(String userId); +} diff --git a/lib/features/remote_control/data/models/running_status_model.dart b/lib/features/remote_control/data/models/running_status_model.dart new file mode 100644 index 00000000..a9988801 --- /dev/null +++ b/lib/features/remote_control/data/models/running_status_model.dart @@ -0,0 +1,103 @@ +class RunningStatusModel { + final String voltage; + final String leftTargetSpeed; + final String rightTargetSpeed; + final String leftMeasureSpeed; + final String rightMeasureSpeed; + final String leftCurrent; + final String rightCurrent; + final String leftMotorTemp; + final String rightMotorTemp; + final String chipTemp; + final String yaw; + final String pitch; + final String roll; + final String satelliteCnt; + final String qual; + final String headingStatus; + final String latitude; + final String longitude; + final String time; + final String knifeCuttingSpeed; + final String controlMode; + final String workingArea; + final String battery; + + RunningStatusModel({ + this.voltage = '', + this.leftTargetSpeed = '', + this.rightTargetSpeed = '', + this.leftMeasureSpeed = '', + this.rightMeasureSpeed = '', + this.leftCurrent = '', + this.rightCurrent = '', + this.leftMotorTemp = '', + this.rightMotorTemp = '', + this.chipTemp = '', + this.yaw = '', + this.pitch = '', + this.roll = '', + this.satelliteCnt = '', + this.qual = '', + this.headingStatus = '', + this.latitude = '', + this.longitude = '', + this.time = '', + this.knifeCuttingSpeed = '', + this.controlMode = '', + this.workingArea = '', + this.battery = '', + }); + + RunningStatusModel copyWith({ + String? voltage, + String? leftTargetSpeed, + String? rightTargetSpeed, + String? leftMeasureSpeed, + String? rightMeasureSpeed, + String? leftCurrent, + String? rightCurrent, + String? leftMotorTemp, + String? rightMotorTemp, + String? chipTemp, + String? yaw, + String? pitch, + String? roll, + String? satelliteCnt, + String? qual, + String? headingStatus, + String? latitude, + String? longitude, + String? time, + String? knifeCuttingSpeed, + String? controlMode, + String? workingArea, + String? battery, + }) { + return RunningStatusModel( + voltage: voltage ?? this.voltage, + leftTargetSpeed: leftTargetSpeed ?? this.leftTargetSpeed, + rightTargetSpeed: rightTargetSpeed ?? this.rightTargetSpeed, + leftMeasureSpeed: leftMeasureSpeed ?? this.leftMeasureSpeed, + rightMeasureSpeed: rightMeasureSpeed ?? this.rightMeasureSpeed, + leftCurrent: leftCurrent ?? this.leftCurrent, + rightCurrent: rightCurrent ?? this.rightCurrent, + leftMotorTemp: leftMotorTemp ?? this.leftMotorTemp, + rightMotorTemp: rightMotorTemp ?? this.rightMotorTemp, + chipTemp: chipTemp ?? this.chipTemp, + yaw: yaw ?? this.yaw, + pitch: pitch ?? this.pitch, + roll: roll ?? this.roll, + satelliteCnt: satelliteCnt ?? this.satelliteCnt, + qual: qual ?? this.qual, + headingStatus: headingStatus ?? this.headingStatus, + latitude: latitude ?? this.latitude, + longitude: longitude ?? this.longitude, + time: time ?? this.time, + knifeCuttingSpeed: knifeCuttingSpeed ?? this.knifeCuttingSpeed, + controlMode: controlMode ?? this.controlMode, + workingArea: workingArea ?? this.workingArea, + battery: battery ?? this.battery, + ); + } +} diff --git a/lib/features/remote_control/domain/entities/running_status_entity.dart b/lib/features/remote_control/domain/entities/running_status_entity.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/features/remote_control/presentation/bloc/remote_control_cubit.dart b/lib/features/remote_control/presentation/bloc/remote_control_cubit.dart index 179f9047..c66176fb 100644 --- a/lib/features/remote_control/presentation/bloc/remote_control_cubit.dart +++ b/lib/features/remote_control/presentation/bloc/remote_control_cubit.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:maibu_satabot_v2/features/remote_control/data/models/running_status_model.dart'; import 'package:maibu_satabot_v2/features/remote_control/presentation/bloc/remote_control_state.dart'; import '../../domain/entities/machine_control_status_entity.dart'; @@ -11,7 +12,12 @@ class RemoteControlCubit extends Cubit { Timer? _timer; RemoteControlCubit(this._repository) - : super(RemoteControlState(controlEntity: MachineControlStatusEntity())) { + : super( + RemoteControlState( + controlEntity: MachineControlStatusEntity(), + runningStatusModel: RunningStatusModel(), + ), + ) { _initPacketListener(); } @@ -78,6 +84,10 @@ class RemoteControlCubit extends Cubit { // _sendProtocolData(0x12, ...); } + void toggleLeftPip() => emit(state.copyWith(showLeftPip: !state.showLeftPip)); + void toggleRightPip() => + emit(state.copyWith(showRightPip: !state.showRightPip)); + @override Future close() { _timer?.cancel(); // 退出页面时务必销毁定时器 diff --git a/lib/features/remote_control/presentation/bloc/remote_control_state.dart b/lib/features/remote_control/presentation/bloc/remote_control_state.dart index 82612b4c..6226ee83 100644 --- a/lib/features/remote_control/presentation/bloc/remote_control_state.dart +++ b/lib/features/remote_control/presentation/bloc/remote_control_state.dart @@ -1,21 +1,31 @@ import 'package:equatable/equatable.dart'; +import 'package:maibu_satabot_v2/features/remote_control/data/models/running_status_model.dart'; import '../../domain/entities/machine_control_status_entity.dart'; enum RemoteControlStatus { initial, controlling, error } +enum ControlMode { TCP, BLE, LOCAL, NONE, OTHER } + class RemoteControlState extends Equatable { final RemoteControlStatus status; - final MachineControlStatusEntity controlEntity; // 之前的业务实体 + final MachineControlStatusEntity controlEntity; // 控制业务实体 + final RunningStatusModel runningStatusModel; + //状态业务实体 final String? errorMessage; final bool hasPermission; // 是否获得了 0x12 权限 final bool isEmergency; final bool isLocked; final int ping; final int battery; + final int voltage; final String permissionPlatform; final String currentPlatform; final bool showPermissionRequestDialog; + final bool showLeftPip; + final bool showRightPip; + + final String obstacleFlag; //障碍物标志位 const RemoteControlState({ this.status = RemoteControlStatus.initial, @@ -26,9 +36,14 @@ class RemoteControlState extends Equatable { this.isLocked = false, this.ping = 0, this.battery = 0, + this.voltage = 0, this.permissionPlatform = '', this.currentPlatform = '', this.showPermissionRequestDialog = false, + this.showLeftPip = true, + this.showRightPip = true, + this.obstacleFlag = '', + required this.runningStatusModel, }); // 方便 UI 更新部分属性 @@ -41,9 +56,14 @@ class RemoteControlState extends Equatable { bool? isLocked, int? ping, int? battery, + int? voltage, String? permissionPlatform, String? currentPlatform, bool? showPermissionRequestDialog, + bool? showLeftPip, + bool? showRightPip, + RunningStatusModel? runningStatusModel, + String? obstacleFlag, }) { return RemoteControlState( status: status ?? this.status, @@ -54,10 +74,15 @@ class RemoteControlState extends Equatable { isLocked: isLocked ?? this.isLocked, ping: ping ?? this.ping, battery: battery ?? this.battery, + voltage: voltage ?? this.voltage, permissionPlatform: permissionPlatform ?? this.permissionPlatform, currentPlatform: currentPlatform ?? this.currentPlatform, showPermissionRequestDialog: showPermissionRequestDialog ?? this.showPermissionRequestDialog, + showLeftPip: showLeftPip ?? this.showLeftPip, + showRightPip: showRightPip ?? this.showRightPip, + runningStatusModel: runningStatusModel ?? this.runningStatusModel, + obstacleFlag: obstacleFlag ?? this.obstacleFlag, ); } @@ -71,8 +96,13 @@ class RemoteControlState extends Equatable { isLocked, ping, battery, + voltage, permissionPlatform, currentPlatform, showPermissionRequestDialog, + showLeftPip, + showRightPip, + runningStatusModel, + obstacleFlag, ]; } diff --git a/lib/features/remote_control/presentation/pages/remote_control_page.dart b/lib/features/remote_control/presentation/pages/remote_control_page.dart index 55930ca5..00422643 100644 --- a/lib/features/remote_control/presentation/pages/remote_control_page.dart +++ b/lib/features/remote_control/presentation/pages/remote_control_page.dart @@ -11,9 +11,9 @@ import '../bloc/remote_control_state.dart'; import '../widgets/center_control_area.dart'; import '../widgets/emergency_overlay.dart'; import '../widgets/left_joystick_area.dart'; -import '../widgets/my_video_player.dart'; import '../widgets/right_joystick_area.dart'; import '../widgets/top_status_bar.dart'; +import '../widgets/webrtc/webrtc_local_player.dart'; class RemoteControlPage extends StatefulWidget { const RemoteControlPage({super.key}); @@ -57,24 +57,35 @@ class _RemoteControlPageState extends State { backgroundColor: Colors.black, body: Stack( children: [ - // 【优化层 1】底层视频:传入固定参数,加上 RepaintBoundary + // 在 Stack 的最底层替换: Positioned.fill( - child: MyVideoPlayer( - deviceIp: TCPConsts.TCP_IP, - device: currentDevice, - user: userState.user!, + child: BlocBuilder( + // 只有当显示隐藏状态改变时才重构,内部的拖拽由组件自身 State 处理,不影响这里 + buildWhen: (p, c) => + p.showLeftPip != c.showLeftPip || + p.showRightPip != c.showRightPip, + builder: (context, state) { + return WebRTCLocalPlayer( + // 这里的 URL 拼接根据你的后端规则 + // streamUrl: "webrtc://${TCPConsts.TCP_IP}/live/livestream/${currentDevice.deviceName}?token=${userState.user!.token}", + streamUrl: + "webrtc://${TCPConsts.TCP_IP}/live/livestream/111?token=${userState.user!.token}", + showLeftPip: state.showLeftPip, // 从 Cubit 状态中读取 + showRightPip: state.showRightPip, // 从 Cubit 状态中读取 + ); + }, ), ), - // 【优化层 2】中层:急停效果(只在 isEmergency 变化时才触发显示/隐藏) BlocBuilder( buildWhen: (p, c) => p.isEmergency != c.isEmergency, builder: (context, state) { - return state.isEmergency ? const Positioned.fill(child: EmergencyOverlay()) : const SizedBox.shrink(); + return state.isEmergency + ? const Positioned.fill(child: EmergencyOverlay()) + : const SizedBox.shrink(); }, ), - // 【优化层 3】顶层:UI 控制层 SafeArea( child: Column( children: [ @@ -86,7 +97,10 @@ class _RemoteControlPageState extends State { final double centerAreaWidth = constraints.maxWidth * 0.5; // 关键:使用 BlocBuilder 局部刷新摇杆,不要 watch 整个 Page - return BlocBuilder( + return BlocBuilder< + RemoteControlCubit, + RemoteControlState + >( // 只有 isLocked 改变时才重构摇杆区域,摇杆坐标改变由内部处理 buildWhen: (p, c) => p.isLocked != c.isLocked, builder: (context, remoteState) { @@ -113,7 +127,9 @@ class _RemoteControlPageState extends State { width: centerAreaWidth, child: Align( alignment: Alignment.bottomCenter, - child: CenterControlArea(totalWidth: centerAreaWidth), + child: CenterControlArea( + totalWidth: centerAreaWidth, + ), ), ), @@ -142,7 +158,8 @@ class _RemoteControlPageState extends State { // 权限弹窗 BlocBuilder( - buildWhen: (p, c) => p.showPermissionRequestDialog != c.showPermissionRequestDialog, + buildWhen: (p, c) => + p.showPermissionRequestDialog != c.showPermissionRequestDialog, builder: (context, state) { if (state.showPermissionRequestDialog) { return _buildPermissionDialog(context, state); diff --git a/lib/features/remote_control/presentation/widgets/center_control_area.dart b/lib/features/remote_control/presentation/widgets/center_control_area.dart index 0ce1c3aa..5e2b1e02 100644 --- a/lib/features/remote_control/presentation/widgets/center_control_area.dart +++ b/lib/features/remote_control/presentation/widgets/center_control_area.dart @@ -27,14 +27,24 @@ class CenterControlArea extends StatelessWidget { final double emergencyStopButtonWidth = constraints.maxWidth * 0.5; return Container( - height: 180, // 这里不再使用 Row 包装三个 Expanded,而是直接固定宽度 child: Row( //mainAxisSize: MainAxisSize.min, // 极其重要:防止在 spaceBetween 下挤压 crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.end, children: [ // 左摇杆 (3份) - _buildSliderBox(expandedWidth, "底盘", true), + // _buildSliderBox(expandedWidth, "底盘", true), + SizedBox( + width: expandedWidth, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + _buildSliderBox(expandedWidth, "底盘", true), + SizedBox(height: totalWidth * 0.01), + ], + ), + ), // 急停 (2份) SizedBox( @@ -48,17 +58,21 @@ class CenterControlArea extends StatelessWidget { const Text( '双击空白处切换视角', - style: TextStyle( - fontSize: 8, - color: Colors.grey, - ), + style: TextStyle(fontSize: 8, color: Colors.grey), ), ], ), ), // 右摇杆 (3份) - _buildSliderBox(expandedWidth, "备用", false), + // _buildSliderBox(expandedWidth, "备用", false), + SizedBox( + width: expandedWidth, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [_buildSliderBox(expandedWidth, "备用", false)], + ), + ), ], ), ); @@ -78,9 +92,9 @@ class CenterControlArea extends StatelessWidget { svgStart: "assets/svgs/remote_up.svg", svgCenter: "assets/svgs/remote_layers.svg", svgEnd: "assets/svgs/remote_down.svg", - onStart: () => print("$label start"), - onCenter: () => print("$label center"), - onEnd: () => print("$label end"), + onStart: () => debugPrint("$label start"), + onCenter: () => debugPrint("$label center"), + onEnd: () => debugPrint("$label end"), iconSize: boxWidth * 0.6 * 0.35, ), ), diff --git a/lib/features/remote_control/presentation/widgets/my_video_player.dart b/lib/features/remote_control/presentation/widgets/my_video_player.dart deleted file mode 100644 index d1a849da..00000000 --- a/lib/features/remote_control/presentation/widgets/my_video_player.dart +++ /dev/null @@ -1,105 +0,0 @@ -import 'dart:io'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_inappwebview/flutter_inappwebview.dart'; -import 'package:maibu_satabot_v2/core/domain/entities/user_entity.dart'; -import 'package:maibu_satabot_v2/features/devices/domain/entities/device_entity.dart'; - -class MyVideoPlayer extends StatefulWidget { - final String deviceIp; - final DeviceEntity device; - final UserEntity user; - - const MyVideoPlayer({ - Key? key, - required this.deviceIp, - required this.device, - required this.user, - }) : super(key: key); - - @override - State createState() => _MyVideoPlayerState(); -} - -class _MyVideoPlayerState extends State { - InAppLocalhostServer? _localServer; - InAppWebViewController? _webViewController; - bool _isServerRunning = false; - int? actualPort; - - @override - void initState() { - super.initState(); - _startServer(); - } - - Future _startServer() async { - int availablePort = 0; - try { - var socket = await ServerSocket.bind(InternetAddress.loopbackIPv4, 0); - availablePort = socket.port; - await socket.close(); - } catch (e) { - availablePort = 8080; - } - - _localServer = InAppLocalhostServer(port: availablePort); - await _localServer!.start(); - actualPort = availablePort; - - if (mounted) { - setState(() { - _isServerRunning = true; - }); - } - } - - @override - void dispose() { - _localServer?.close(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - // 防止父级因其他状态 setState 导致视频闪烁 - if (!_isServerRunning) { - return const Center(child: CircularProgressIndicator(color: Colors.white)); - } - - // [性能关键] RepaintBoundary 必须包裹渲染密集型的 WebView - return RepaintBoundary( - child: InAppWebView( - initialUrlRequest: URLRequest( - url: WebUri("http://localhost:$actualPort/assets/www/webrtc/playwebrtc.html"), - ), - initialSettings: InAppWebViewSettings( - javaScriptEnabled: true, - mediaPlaybackRequiresUserGesture: false, - allowsInlineMediaPlayback: true, - preferredContentMode: UserPreferredContentMode.MOBILE, - // 优化性能:禁用滚动,开启硬件加速 - supportZoom: false, - disableHorizontalScroll: true, - disableVerticalScroll: true, - hardwareAcceleration: true, - ), - onWebViewCreated: (controller) => _webViewController = controller, - onPermissionRequest: (controller, request) async { - return PermissionResponse( - resources: request.resources, - action: PermissionResponseAction.GRANT, - ); - }, - onLoadStop: (controller, url) { - _initWebRTC(widget.deviceIp, widget.device.deviceName, widget.user.token); - }, - ), - ); - } - - void _initWebRTC(String deviceIp, String deviceId, String token) { - final streamUrl = "webrtc://$deviceIp/live/livestream/$deviceId?token=$token"; - _webViewController?.evaluateJavascript(source: "setStreamUrl('$streamUrl')"); - } -} \ No newline at end of file diff --git a/lib/features/remote_control/presentation/widgets/status_chip.dart b/lib/features/remote_control/presentation/widgets/status_chip.dart index 878403a2..dff9a171 100644 --- a/lib/features/remote_control/presentation/widgets/status_chip.dart +++ b/lib/features/remote_control/presentation/widgets/status_chip.dart @@ -1,20 +1,25 @@ import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; class StatusChip extends StatefulWidget { final String text; final Color color; - final IconData icon; - final bool breathing; // 是否开启呼吸灯特效 + final IconData? icon; + final String? svgPath; + final Color? svgColor; + final bool breathing; final VoidCallback? onTap; const StatusChip({ super.key, required this.text, required this.color, - required this.icon, + this.icon, + this.svgPath, + this.svgColor, this.breathing = false, this.onTap, - }); + }) : assert(icon != null || svgPath != null, '必须提供 icon 或 svgPath 其中之一'); @override State createState() => _StatusChipState(); @@ -34,10 +39,19 @@ class _StatusChipState extends State ); if (widget.breathing) _controller.repeat(reverse: true); + // 动画区间从 0.3 到 1.0 _opacityAnimation = Tween( - begin: 0.4, + begin: 0.3, end: 1.0, - ).animate(CurvedAnimation(parent: _controller, curve: Curves.linear)); + ).animate(CurvedAnimation(parent: _controller, curve: Curves.easeInOut)); + } + + @override + void didUpdateWidget(StatusChip oldWidget) { + super.didUpdateWidget(oldWidget); + if (widget.breathing != oldWidget.breathing) { + widget.breathing ? _controller.repeat(reverse: true) : _controller.stop(); + } } @override @@ -48,33 +62,56 @@ class _StatusChipState extends State @override Widget build(BuildContext context) { + // 【关键】获取颜色传入时的透明度(比如你传了 0.6,baseOpacity 就是 0.6) + final double baseOpacity = widget.color.opacity; + return AnimatedBuilder( animation: _opacityAnimation, builder: (context, child) { - final currentAlpha = widget.breathing ? _opacityAnimation.value : 0.6; + // 【关键】如果不呼吸,直接用 baseOpacity,不再强制给 1.0 + final currentAlpha = widget.breathing + ? _opacityAnimation.value * baseOpacity + : baseOpacity; + return GestureDetector( onTap: widget.onTap, child: Container( padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6), decoration: BoxDecoration( + // 这里应用计算后的透明度 color: widget.color.withOpacity(currentAlpha), - borderRadius: BorderRadius.circular(10), + borderRadius: BorderRadius.circular(12), border: Border.all( - color: widget.color.withOpacity(0.35), + color: Colors.white.withOpacity(0.15), width: 0.5, ), ), child: Row( mainAxisSize: MainAxisSize.min, children: [ - Icon(widget.icon, color: Colors.white, size: 14), - const SizedBox(width: 6), + if (widget.svgPath != null) + SvgPicture.asset( + widget.svgPath!, + width: 14, + height: 14, + colorFilter: ColorFilter.mode( + widget.svgColor ?? Colors.white, + BlendMode.srcIn, + ), + ) + else + Icon( + widget.icon, + color: widget.svgColor ?? Colors.white, + size: 14, + ), + const SizedBox(width: 5), Text( widget.text, style: const TextStyle( color: Colors.white, - fontSize: 12, - fontWeight: FontWeight.bold, + fontSize: 13, + fontWeight: FontWeight.w600, ), ), ], diff --git a/lib/features/remote_control/presentation/widgets/top_status_bar.dart b/lib/features/remote_control/presentation/widgets/top_status_bar.dart index 8df07450..b23881a2 100644 --- a/lib/features/remote_control/presentation/widgets/top_status_bar.dart +++ b/lib/features/remote_control/presentation/widgets/top_status_bar.dart @@ -1,6 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_svg/svg.dart'; import 'package:go_router/go_router.dart'; +import 'package:maibu_satabot_v2/features/remote_control/presentation/bloc/remote_control_state.dart'; import 'package:maibu_satabot_v2/features/remote_control/presentation/widgets/status_chip.dart'; import '../../../devices/presentation/bloc/devices_cubit.dart'; @@ -23,7 +25,7 @@ class TopStatusBar extends StatelessWidget { child: Row( children: [ // 1. 返回按钮 (对应 SimpleSmallFunctionButton) - _buildIconButton(Icons.arrow_back_ios_new, () => context.pop()), + _buildIconButton("assets/svgs/remote_back.svg", () => context.pop()), const SizedBox(width: 16), // 2. 控制状态 (对应 StatusChipLeft) @@ -45,38 +47,47 @@ class TopStatusBar extends StatelessWidget { // 3. 锁定状态 (对应 SmallFunctionButton) _buildIconButton( - remoteState.isLocked ? Icons.lock : Icons.lock_open, + remoteState.isLocked + ? "assets/svgs/remote_lock.svg" + : "assets/svgs/remote_lock_open.svg", () => context.read().toggleLock(), isSelected: remoteState.isLocked, ), const SizedBox(width: 8), // 4. 刷新按钮 - _buildIconButton(Icons.refresh, () { - // 刷新 WebView 逻辑 - }), + _buildIconButton("assets/svgs/remote_refresh.svg", () {}), const Spacer(), + // TODO + _buildControlModeChip(,remoteState.runningStatusModel.controlMode), + + const SizedBox(width: 8), + + _buildVoltageChip(remoteState.voltage), + + const SizedBox(width: 8), + // 5. 信号延迟 (对应 pingStatusChip) _buildPingChip(remoteState.ping), const SizedBox(width: 8), // 6. 电量 (对应 StatusChipRight) - _buildBatteryChip(remoteState?.battery ?? 0), + _buildBatteryChip(remoteState.battery), ], ), ); } - // 对应 Android 里的 SimpleSmallFunctionButton 样式 Widget _buildIconButton( - IconData icon, + String svgAsset, // 改为 String 路径,例如 'assets/icons/stop.svg' VoidCallback onTap, { bool isSelected = false, }) { return InkWell( onTap: onTap, + borderRadius: BorderRadius.circular(10), child: Container( width: 32, height: 32, @@ -87,7 +98,12 @@ class TopStatusBar extends StatelessWidget { borderRadius: BorderRadius.circular(10), border: Border.all(color: Colors.white.withOpacity(0.3), width: 0.5), ), - child: Icon(icon, color: Colors.white, size: 18), + padding: const EdgeInsets.all(7), + child: SvgPicture.asset( + svgAsset, + // 这里可以使用 colorFilter 来改变 SVG 的颜色(如果需要根据选中状态变色) + colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn), + ), ), ); } @@ -98,18 +114,81 @@ class TopStatusBar extends StatelessWidget { : (ping < 200 ? Colors.orange : Colors.red); return StatusChip( text: "$ping ms", - color: color, + color: color.withValues(alpha: 0.6), + svgColor: color, icon: Icons.network_check, ); } + Widget _buildControlModeChip(ControlMode mode) { + String displayText; + switch (mode) { + case ControlMode.BLE: + displayText = '蓝牙模式'; + break; + case ControlMode.LOCAL: + displayText = '本地模式'; + break; + case ControlMode.TCP: + displayText = 'TCP模式'; + break; + case ControlMode.NONE: + displayText = '无模式'; + break; + case ControlMode.OTHER: + displayText = '其他模式'; + break; + default: + displayText = '未知模式'; + } + + return StatusChip( + text: displayText, + color: Colors.blue.withValues(alpha: 0.6), + svgColor: Colors.blue, + svgPath: "assets/svgs/remote_net.svg", + ); + } + + Widget _buildVoltageChip(int voltage) { + return StatusChip( + text: "$voltage V", + color: Color(0xFFFACC15).withValues(alpha: 0.6), + svgColor: Color(0xFFFACC15), + svgPath: "assets/svgs/remote_zap.svg", + ); + } + Widget _buildBatteryChip(int level) { - IconData icon = level > 80 - ? Icons.battery_full - : (level > 20 ? Icons.battery_3_bar : Icons.battery_alert); - Color color = level > 80 - ? Colors.green - : (level > 30 ? Colors.orange : Colors.red); - return StatusChip(text: "$level%", color: color, icon: icon); + // 1. 根据数值判断图片路径 (逻辑与之前一致) + String svgPath; + Color color; + + if (level >= 90) { + svgPath = "assets/svgs/remote_battery_full.svg"; + color = Colors.green; + } else if (level >= 50) { + svgPath = "assets/svgs/remote_battery_middle.svg"; + color = Colors.greenAccent; + } else if (level >= 20) { + svgPath = "assets/svgs/remote_battery_low.svg"; + color = Colors.orange; + } else if (level >= 10) { + svgPath = "assets/svgs/remote_battery_warning.svg"; + color = Colors.redAccent; + } else { + svgPath = "assets/svgs/remote_battery_none.svg"; + color = Colors.red; + } + + // 2. 使用 StatusChip 包装,但 icon 传入 SvgPicture + return StatusChip( + text: "$level%", + color: color.withValues(alpha: 0.6), + svgColor: color, + // 如果你的 StatusChip 已经改为接受 Widget,则直接传 SvgPicture + // 如果 StatusChip 目前只接受 IconData,你需要按我之前的建议给它加个 leading 参数 + svgPath: svgPath, + ); } } diff --git a/lib/features/remote_control/presentation/widgets/webrtc/my_video_player.dart.backup b/lib/features/remote_control/presentation/widgets/webrtc/my_video_player.dart.backup new file mode 100644 index 00000000..ee5b11b3 --- /dev/null +++ b/lib/features/remote_control/presentation/widgets/webrtc/my_video_player.dart.backup @@ -0,0 +1,118 @@ +// import 'dart:io'; +// import 'package:flutter/foundation.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter_inappwebview/flutter_inappwebview.dart'; +// import 'package:maibu_satabot_v2/core/domain/entities/user_entity.dart'; +// import 'package:maibu_satabot_v2/features/devices/domain/entities/device_entity.dart'; +// +// class MyVideoPlayer extends StatefulWidget { +// final String deviceIp; +// final DeviceEntity device; +// final UserEntity user; +// +// const MyVideoPlayer({ +// Key? key, +// required this.deviceIp, +// required this.device, +// required this.user, +// }) : super(key: key); +// +// @override +// State createState() => _MyVideoPlayerState(); +// } +// +// class _MyVideoPlayerState extends State { +// InAppLocalhostServer? _localServer; +// InAppWebViewController? _webViewController; +// bool _isServerRunning = false; +// int? actualPort; +// +// @override +// void initState() { +// super.initState(); +// _startServer(); +// } +// +// Future _startServer() async { +// int availablePort = 0; +// try { +// var socket = await ServerSocket.bind(InternetAddress.loopbackIPv4, 0); +// availablePort = socket.port; +// await socket.close(); +// } catch (e) { +// availablePort = 8080; +// } +// +// _localServer = InAppLocalhostServer(port: availablePort); +// await _localServer!.start(); +// actualPort = availablePort; +// +// if (mounted) { +// setState(() { +// _isServerRunning = true; +// }); +// } +// } +// +// @override +// void dispose() { +// _localServer?.close(); +// super.dispose(); +// } +// +// @override +// Widget build(BuildContext context) { +// // 防止父级因其他状态 setState 导致视频闪烁 +// if (!_isServerRunning) { +// return const Center(child: CircularProgressIndicator(color: Colors.white)); +// } +// +// // [性能关键] RepaintBoundary 必须包裹渲染密集型的 WebView +// return RepaintBoundary( +// child: InAppWebView( +// initialUrlRequest: URLRequest( +// url: WebUri("http://localhost:$actualPort/assets/www/webrtc/playwebrtc.html"), +// ), +// initialSettings: InAppWebViewSettings( +// // 1. 基础播放设置 +// javaScriptEnabled: true, +// mediaPlaybackRequiresUserGesture: false, +// allowsInlineMediaPlayback: true, +// preferredContentMode: UserPreferredContentMode.MOBILE, +// +// // 2. 性能与重绘优化 +// supportZoom: false, +// disableHorizontalScroll: true, +// disableVerticalScroll: true, +// hardwareAcceleration: true, // 开启硬件加速 +// offscreenPreRaster: false, // 禁用离屏预渲染以节省内存 +// useHybridComposition: true, +// // 3. 内存与日志优化 (6.x 正确配置) +// isInspectable: false, // 生产环境关闭 Web 检查器 +// cacheMode: CacheMode.LOAD_NO_CACHE, // 禁用缓存,WebRTC 不需要缓存 +// useShouldInterceptRequest: false, // 减少 Dart 与 Native 桥接通信 +// ), +// onWebViewCreated: (controller) => _webViewController = controller, +// onPermissionRequest: (controller, request) async { +// return PermissionResponse( +// resources: request.resources, +// action: PermissionResponseAction.GRANT, +// ); +// }, +// onLoadStop: (controller, url) { +// _initWebRTC(widget.deviceIp, widget.device.deviceName, widget.user.token); +// }, +// // --- 彻底屏蔽 Console 日志,防止垃圾产生 --- +// onConsoleMessage: (controller, consoleMessage) { +// // 这里什么都不写,直接拦截并消耗掉 JS 层的日志 +// // 防止海量 WebRTC 日志传回 Flutter 触发 GC +// }, +// ), +// ); +// } +// +// void _initWebRTC(String deviceIp, String deviceId, String token) { +// final streamUrl = "webrtc://$deviceIp/live/livestream/$deviceId?token=$token"; +// _webViewController?.evaluateJavascript(source: "setStreamUrl('$streamUrl')"); +// } +// } \ No newline at end of file diff --git a/lib/features/remote_control/presentation/widgets/webrtc/webrtc_local_player.dart b/lib/features/remote_control/presentation/widgets/webrtc/webrtc_local_player.dart new file mode 100644 index 00000000..4603d6ef --- /dev/null +++ b/lib/features/remote_control/presentation/widgets/webrtc/webrtc_local_player.dart @@ -0,0 +1,331 @@ +import 'dart:convert'; +import 'dart:ui'; +import 'package:flutter/material.dart'; +import 'package:flutter_webrtc/flutter_webrtc.dart'; +import 'package:http/http.dart' as http; + +class WebRTCLocalPlayer extends StatefulWidget { + final String streamUrl; + final bool showLeftPip; + final bool showRightPip; + + const WebRTCLocalPlayer({ + super.key, + required this.streamUrl, + this.showLeftPip = true, + this.showRightPip = true, + }); + + @override + State createState() => _WebRTCLocalPlayerState(); +} + +class _WebRTCLocalPlayerState extends State { + final RTCVideoRenderer _renderer = RTCVideoRenderer(); + RTCPeerConnection? _peerConnection; + + bool _isInitialized = false; + bool _isFrontMain = true; + + // 使用 ValueNotifier 配合局部刷新,提升拖拽性能 + final ValueNotifier _leftPosNotifier = ValueNotifier( + const Offset(20, 80), + ); + final ValueNotifier _rightPosNotifier = ValueNotifier( + const Offset(200, 80), + ); + bool _isPosInitialized = false; + + @override + void initState() { + super.initState(); + _prepareAndConnect(); + } + + Future _prepareAndConnect() async { + try { + await _renderer.initialize(); + if (!mounted) return; + await _initWebRTCConnection(); + setState(() => _isInitialized = true); + } catch (e) { + debugPrint("初始化失败: $e"); + } + } + + Future _initWebRTCConnection() async { + _peerConnection = await createPeerConnection({ + "sdpSemantics": "unified-plan", + "iceServers": [ + {"urls": "stun:stun.l.google.com:19302"}, + ], + }); + + await _peerConnection!.addTransceiver( + kind: RTCRtpMediaType.RTCRtpMediaTypeVideo, + init: RTCRtpTransceiverInit(direction: TransceiverDirection.RecvOnly), + ); + + _peerConnection!.onTrack = (RTCTrackEvent event) { + if (event.track.kind == 'video' && event.streams.isNotEmpty) { + if (mounted) setState(() => _renderer.srcObject = event.streams[0]); + } + }; + + try { + RTCSessionDescription offer = await _peerConnection!.createOffer({ + 'offerToReceiveVideo': 1, + }); + await _peerConnection!.setLocalDescription(offer); + + Uri uri = Uri.parse( + widget.streamUrl.replaceFirst('webrtc://', 'http://'), + ); + String apiUrl = "http://${uri.host}:1985/rtc/v1/play/"; + + final response = await http.post( + Uri.parse(apiUrl), + headers: {'Content-Type': 'application/json'}, + body: jsonEncode({ + "api": apiUrl, + "streamurl": widget.streamUrl, + "clientip": null, + "sdp": offer.sdp, + }), + ); + + if (response.statusCode == 200) { + final data = jsonDecode(response.body); + await _peerConnection!.setRemoteDescription( + RTCSessionDescription(data['sdp'], 'answer'), + ); + } + } catch (e) { + debugPrint("信令错误: $e"); + } + } + + @override + void dispose() { + _peerConnection?.dispose(); + _renderer.srcObject = null; + _renderer.dispose(); + _leftPosNotifier.dispose(); + _rightPosNotifier.dispose(); + super.dispose(); + } + + // 四分屏裁剪视图 + Widget _buildQuadrantView({required Alignment alignment}) { + if (!_isInitialized || _renderer.srcObject == null) + return Container(color: Colors.black); + + return RepaintBoundary( + child: ClipRect( + child: FractionallySizedBox( + widthFactor: 2.0, + heightFactor: 2.0, + alignment: alignment, + child: RTCVideoView( + _renderer, + objectFit: RTCVideoViewObjectFit.RTCVideoViewObjectFitCover, + mirror: false, + ), + ), + ), + ); + } + + // 主视角的矩形边缘羽化效果 + Widget _buildMainViewWithFeathering() { + return ShaderMask( + shaderCallback: (Rect bounds) { + return const LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + Colors.transparent, + Colors.white, + Colors.white, + Colors.transparent, + ], + stops: [0.0, 0.15, 0.85, 1.0], + ).createShader(bounds); + }, + blendMode: BlendMode.dstIn, + child: ShaderMask( + shaderCallback: (Rect bounds) { + return const LinearGradient( + begin: Alignment.centerLeft, + end: Alignment.centerRight, + colors: [ + Colors.transparent, + Colors.white, + Colors.white, + Colors.transparent, + ], + stops: [0.0, 0.05, 0.95, 1.0], + ).createShader(bounds); + }, + blendMode: BlendMode.dstIn, + child: _buildQuadrantView( + alignment: _isFrontMain ? Alignment.topLeft : Alignment.topRight, + ), + ), + ); + } + + @override + Widget build(BuildContext context) { + if (!_isInitialized) + return const Scaffold( + backgroundColor: Colors.black, + body: Center(child: CircularProgressIndicator()), + ); + + return Scaffold( + backgroundColor: Colors.black, + body: LayoutBuilder( + builder: (context, constraints) { + final double pipW = constraints.maxWidth / 5; + final double pipH = pipW * 9 / 16; + + // 核心:处理 Windows 窗口大小变化时的坐标修正 + Future.microtask(() { + if (!mounted) return; + _correctPosition(_leftPosNotifier, constraints, pipW, pipH); + _correctPosition(_rightPosNotifier, constraints, pipW, pipH); + }); + + if (!_isPosInitialized) { + _leftPosNotifier.value = const Offset(20, 80); + _rightPosNotifier.value = Offset( + constraints.maxWidth - pipW - 20, + 80, + ); + _isPosInitialized = true; + } + + return Stack( + children: [ + // ① 背景虚化层(背景两侧模糊,模拟视觉聚焦) + Positioned.fill( + child: Stack( + children: [ + _buildQuadrantView( + alignment: _isFrontMain + ? Alignment.topLeft + : Alignment.topRight, + ), + Positioned.fill( + child: BackdropFilter( + filter: ImageFilter.blur(sigmaX: 45, sigmaY: 45), + child: Container(color: Colors.black.withOpacity(0.55)), + ), + ), + ], + ), + ), + + // ② 主视频层 + Center( + child: GestureDetector( + onDoubleTap: () => + setState(() => _isFrontMain = !_isFrontMain), + child: AspectRatio( + aspectRatio: 16 / 9, + child: _buildMainViewWithFeathering(), + ), + ), + ), + + // ③ 悬浮小窗 - 解决阻尼感的 1:1 稳定拖拽 + if (widget.showLeftPip) + _buildFastPip( + _leftPosNotifier, + Alignment.bottomLeft, + constraints, + pipW, + pipH, + ), + if (widget.showRightPip) + _buildFastPip( + _rightPosNotifier, + Alignment.bottomRight, + constraints, + pipW, + pipH, + ), + ], + ); + }, + ), + ); + } + + void _correctPosition( + ValueNotifier notifier, + BoxConstraints constraints, + double w, + double h, + ) { + double maxX = (constraints.maxWidth - w).clamp(0.0, double.infinity); + double maxY = (constraints.maxHeight - h).clamp(0.0, double.infinity); + double newX = notifier.value.dx.clamp(0.0, maxX); + double newY = notifier.value.dy.clamp(0.0, maxY); + if (notifier.value.dx != newX || notifier.value.dy != newY) { + notifier.value = Offset(newX, newY); + } + } + + // 极致丝滑的局部刷新组件 + Widget _buildFastPip( + ValueNotifier notifier, + Alignment align, + BoxConstraints constraints, + double w, + double h, + ) { + return ValueListenableBuilder( + valueListenable: notifier, + builder: (context, pos, child) { + return Positioned( + left: pos.dx, + top: pos.dy, + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onPanUpdate: (details) { + // 关键修正:使用 notifier.value.dx 替换 pos.dx,消除位移丢失导致的阻尼感 + final double nextX = (notifier.value.dx + details.delta.dx).clamp( + 0.0, + (constraints.maxWidth - w).clamp(0.0, double.infinity), + ); + final double nextY = (notifier.value.dy + details.delta.dy).clamp( + 0.0, + (constraints.maxHeight - h).clamp(0.0, double.infinity), + ); + notifier.value = Offset(nextX, nextY); + }, + child: child!, + ), + ); + }, + child: Container( + width: w, + height: h, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.5), + blurRadius: 20, + offset: const Offset(0, 8), + ), + ], + ), + clipBehavior: Clip.antiAlias, + child: _buildQuadrantView(alignment: align), + ), + ); + } +} diff --git a/lib/main.dart b/lib/main.dart index 636173db..b9f78ba0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,9 +1,12 @@ +import 'dart:async'; import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:go_router/go_router.dart'; import 'package:maibu_satabot_v2/core/app/app_user_cubit.dart'; +import 'package:maibu_satabot_v2/core/infrastructure/logging/app_bloc_observer.dart'; +import 'package:maibu_satabot_v2/core/logging/i_logger_service.dart'; import 'package:maibu_satabot_v2/core/theme/AppTheme.dart'; import 'package:maibu_satabot_v2/features/auth/presentation/bloc/auth_cubit.dart'; import 'package:maibu_satabot_v2/features/devices/presentation/bloc/devices_cubit.dart'; @@ -12,9 +15,28 @@ import 'core/di/injection.dart'; import 'features/auth/presentation/bloc/login_cubit.dart'; void main() async { - WidgetsFlutterBinding.ensureInitialized(); - await init(); - runApp(const MyApp()); + // 1. 使用 runZonedGuarded 捕获所有未处理的异步错误 + runZonedGuarded( + () async { + WidgetsFlutterBinding.ensureInitialized(); + + // 2. 初始化依赖注入 (这里面应包含 ILoggerService 的注册) + await init(); + + // 3. 从 sl 中获取 logger 实例并初始化 Sentry + final logger = sl(); + await logger.init(); + + // 4. 设置全局 Bloc 观察者,自动上报 Bloc 错误 + Bloc.observer = AppBlocObserver(logger); + + runApp(const MyApp()); + }, + (error, stack) { + // 5. 捕获顶级错误并上报 + sl().captureException(error, stackTrace: stack); + }, + ); } class MyApp extends StatelessWidget { @@ -41,5 +63,4 @@ class MyApp extends StatelessWidget { ), ); } - -} \ No newline at end of file +} diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index bf7b89b2..e13d69c2 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -6,10 +6,18 @@ #include "generated_plugin_registrant.h" +#include #include +#include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) flutter_webrtc_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterWebRTCPlugin"); + flutter_web_r_t_c_plugin_register_with_registrar(flutter_webrtc_registrar); g_autoptr(FlPluginRegistrar) isar_community_flutter_libs_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "IsarFlutterLibsPlugin"); isar_flutter_libs_plugin_register_with_registrar(isar_community_flutter_libs_registrar); + g_autoptr(FlPluginRegistrar) sentry_flutter_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "SentryFlutterPlugin"); + sentry_flutter_plugin_register_with_registrar(sentry_flutter_registrar); } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 921d30ca..e5d24820 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -3,10 +3,13 @@ # list(APPEND FLUTTER_PLUGIN_LIST + flutter_webrtc isar_community_flutter_libs + sentry_flutter ) list(APPEND FLUTTER_FFI_PLUGIN_LIST + jni ) set(PLUGIN_BUNDLED_LIBRARIES) diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 9954c3b6..6ff70be1 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,14 +5,20 @@ import FlutterMacOS import Foundation -import flutter_inappwebview_macos +import device_info_plus +import flutter_webrtc import isar_community_flutter_libs +import package_info_plus import path_provider_foundation +import sentry_flutter import shared_preferences_foundation func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin")) + DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) + FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin")) IsarFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "IsarFlutterLibsPlugin")) + FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + SentryFlutterPlugin.register(with: registry.registrar(forPlugin: "SentryFlutterPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index 2abb4ae1..aec7f63a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -208,6 +208,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "3.1.3" + dart_webrtc: + dependency: transitive + description: + name: dart_webrtc + sha256: "51bcda4ba5d7dd9e65a309244ce3ac0b58025e6e1f6d7442cee4cd02134ef65f" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.6.0" dartx: dependency: transitive description: @@ -216,6 +224,22 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0" + device_info_plus: + dependency: "direct main" + description: + name: device_info_plus + sha256: "4df8babf73058181227e18b08e6ea3520cf5fc5d796888d33b7cb0f33f984b7c" + url: "https://pub.flutter-io.cn" + source: hosted + version: "12.3.0" + device_info_plus_platform_interface: + dependency: transitive + description: + name: device_info_plus_platform_interface + sha256: e1ea89119e34903dca74b883d0dd78eb762814f97fb6c76f35e9ff74d261a18f + url: "https://pub.flutter-io.cn" + source: hosted + version: "7.0.3" dio: dependency: "direct main" description: @@ -285,70 +309,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "9.1.1" - flutter_inappwebview: - dependency: "direct main" - description: - name: flutter_inappwebview - sha256: "80092d13d3e29b6227e25b67973c67c7210bd5e35c4b747ca908e31eb71a46d5" - url: "https://pub.flutter-io.cn" - source: hosted - version: "6.1.5" - flutter_inappwebview_android: - dependency: transitive - description: - name: flutter_inappwebview_android - sha256: "62557c15a5c2db5d195cb3892aab74fcaec266d7b86d59a6f0027abd672cddba" - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.1.3" - flutter_inappwebview_internal_annotations: - dependency: transitive - description: - name: flutter_inappwebview_internal_annotations - sha256: "787171d43f8af67864740b6f04166c13190aa74a1468a1f1f1e9ee5b90c359cd" - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.2.0" - flutter_inappwebview_ios: - dependency: transitive - description: - name: flutter_inappwebview_ios - sha256: "5818cf9b26cf0cbb0f62ff50772217d41ea8d3d9cc00279c45f8aabaa1b4025d" - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.1.2" - flutter_inappwebview_macos: - dependency: transitive - description: - name: flutter_inappwebview_macos - sha256: c1fbb86af1a3738e3541364d7d1866315ffb0468a1a77e34198c9be571287da1 - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.1.2" - flutter_inappwebview_platform_interface: - dependency: transitive - description: - name: flutter_inappwebview_platform_interface - sha256: cf5323e194096b6ede7a1ca808c3e0a078e4b33cc3f6338977d75b4024ba2500 - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.3.0+1" - flutter_inappwebview_web: - dependency: transitive - description: - name: flutter_inappwebview_web - sha256: "55f89c83b0a0d3b7893306b3bb545ba4770a4df018204917148ebb42dc14a598" - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.1.2" - flutter_inappwebview_windows: - dependency: transitive - description: - name: flutter_inappwebview_windows - sha256: "8b4d3a46078a2cdc636c4a3d10d10f2a16882f6be607962dbfff8874d1642055" - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.6.0" flutter_launcher_icons: dependency: "direct dev" description: @@ -383,6 +343,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_webrtc: + dependency: "direct main" + description: + name: flutter_webrtc + sha256: "71a38363a5b50603e405c275f30de2eb90f980b0cc94b0e1e9d8b9d6a6b03bf0" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.2.1" fpdart: dependency: "direct main" description: @@ -479,6 +447,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "4.7.2" + intl: + dependency: "direct main" + description: + name: intl + sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.20.2" io: dependency: transitive description: @@ -511,6 +487,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "3.3.0" + jni: + dependency: transitive + description: + name: jni + sha256: d2c361082d554d4593c3012e26f6b188f902acd291330f13d6427641a92b3da1 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.14.2" js: dependency: transitive description: @@ -559,6 +543,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "6.0.0" + logger: + dependency: transitive + description: + name: logger + sha256: a7967e31b703831a893bbc3c3dd11db08126fe5f369b5c648a36f821979f5be3 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.6.2" logging: dependency: transitive description: @@ -615,6 +607,22 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.2.0" + package_info_plus: + dependency: transitive + description: + name: package_info_plus + sha256: f69da0d3189a4b4ceaeb1a3defb0f329b3b352517f52bed4290f83d4f06bc08d + url: "https://pub.flutter-io.cn" + source: hosted + version: "9.0.0" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: "202a487f08836a592a6bd4f901ac69b3a8f146af552bbd14407b6b41e1c3f086" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.2.1" path: dependency: transitive description: @@ -632,7 +640,7 @@ packages: source: hosted version: "1.1.0" path_provider: - dependency: transitive + dependency: "direct main" description: name: path_provider sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" @@ -743,6 +751,22 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.5.0" + sentry: + dependency: transitive + description: + name: sentry + sha256: fa14b2177d2cd4489ec78817ec4e52affe1be9f595718de970a5e4ed2bccc530 + url: "https://pub.flutter-io.cn" + source: hosted + version: "9.10.0" + sentry_flutter: + dependency: "direct main" + description: + name: sentry_flutter + sha256: "00d168260c9be3777e4f1c9ca7a2e4f2c48566926ec22a64bbacae5a94ff72a3" + url: "https://pub.flutter-io.cn" + source: hosted + version: "9.10.0" shared_preferences: dependency: "direct main" description: @@ -868,6 +892,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.4.1" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: c254ade258ec8282947a0acbbc90b9575b4f19673533ee46f2f6e9b3aeefd7c0 + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.4.0" term_glyph: dependency: transitive description: @@ -908,6 +940,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.4.0" + uuid: + dependency: transitive + description: + name: uuid + sha256: a11b666489b1954e01d992f3d601b1804a33937b5a8fe677bd26b8a9f96f96e8 + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.5.2" vector_graphics: dependency: transitive description: @@ -980,6 +1020,30 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "3.0.3" + webrtc_interface: + dependency: transitive + description: + name: webrtc_interface + sha256: "2e604a31703ad26781782fb14fa8a4ee621154ee2c513d2b9938e486fa695233" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.0" + win32: + dependency: transitive + description: + name: win32 + sha256: d7cb55e04cd34096cd3a79b3330245f54cb96a370a1c27adb3c84b917de8b08e + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.15.0" + win32_registry: + dependency: transitive + description: + name: win32_registry + sha256: "6f1b564492d0147b330dd794fee8f512cec4977957f310f9951b5f9d83618dae" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.0" xdg_directories: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index c80ee226..9129b9ef 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: maibu_satabot_v2 description: "A new Flutter project." # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev +publish_to: "none" # Remove this line if you wish to publish to pub.dev # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 @@ -43,7 +43,6 @@ dependencies: # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.8 - # MY PACKAGES cc_ui_kit: path: ./packages/cc_ui_kit @@ -79,14 +78,27 @@ dependencies: google_fonts: ^6.2.1 # ===== WebView ===== - flutter_inappwebview: ^6.1.5 + # flutter_inappwebview: ^6.1.5 # ===== 图片 ===== flutter_svg: ^2.2.3 # ===== 屏幕适配,高刷等 ===== -# flutter_displaymode: ^0.7.0 + # flutter_displaymode: ^0.7.0 + # ===== WebRTC ===== + flutter_webrtc: ^1.2.1 + + # ===== 日志存储 ===== + sentry_flutter: ^9.10.0 + + # ===== 设备信息 ===== + device_info_plus: ^12.3.0 + + # ===== 文件存储 ===== + path_provider: ^2.1.5 + + intl: ^0.20.2 dev_dependencies: flutter_test: @@ -107,13 +119,11 @@ dev_dependencies: flutter_launcher_icons: ^0.13.1 - # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec # The following section is specific to Flutter packages. flutter: - # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 581c8d50..4c7a7825 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,12 +6,15 @@ #include "generated_plugin_registrant.h" -#include +#include #include +#include void RegisterPlugins(flutter::PluginRegistry* registry) { - FlutterInappwebviewWindowsPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("FlutterInappwebviewWindowsPluginCApi")); + FlutterWebRTCPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FlutterWebRTCPlugin")); IsarFlutterLibsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("IsarFlutterLibsPlugin")); + SentryFlutterPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("SentryFlutterPlugin")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 3e1a8f80..0683793d 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,11 +3,13 @@ # list(APPEND FLUTTER_PLUGIN_LIST - flutter_inappwebview_windows + flutter_webrtc isar_community_flutter_libs + sentry_flutter ) list(APPEND FLUTTER_FFI_PLUGIN_LIST + jni ) set(PLUGIN_BUNDLED_LIBRARIES)