У меня проблема с компиляцией приложения Flutter с использованием кода Visual Studio.Android

Форум для тех, кто программирует под Android
Ответить Пред. темаСлед. тема
Гость
 У меня проблема с компиляцией приложения Flutter с использованием кода Visual Studio.

Сообщение Гость »


Он выдает эти сообщения об ошибках, когда я запускаю flutter run:
проект, использующий модульный флаттер, и это свойства свойств градиента:

Код: Выделить всё

org.gradle.jvmargs=-Xmx4608m
android.useAndroidX=true
android.enableJetifier=true
And This is the flutter version :

Код: Выделить всё

Flutter 3.19.2** • channel stable • https://github.com/flutter/flutter.git
Framework • revision 7482962148 (9 days ago) • 2024-02-27 16:51:22 -0500
Engine • revision 04817c99c9
Tools • Dart 3.3.0
• DevTools 2.31.1

Код: Выделить всё

e: Daemon compilation failed: null
java.lang.Exception
at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:109)
at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:114)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
... 3 more

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
e: Daemon compilation failed: null
java.lang.Exception

at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_localization-0.1.13\android\src\main\kotlin\com\mastertipsy\flutter_localization\FlutterLocalizationPlugin.kt and D:\flutter\smartinia\wedort\client\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:22)
at org.jetbrains.kotlin.incremental.storage.ComplementarySourceFilesMap.get(ComplementarySourceFilesMap.kt:22)
at org.jetbrains.kotlin.incremental.AbstractIncrementalCache.getComplementaryFilesRecursive(AbstractIncrementalCache.kt:219)
java:677)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
... 3 more

e: Daemon compilation failed: null
java.lang.Exception

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.dev\fluttertoast-8.2.2\android\src\main\kotlin\io\github\ponnamkarthik\toast\fluttertoast\FlutterToastPlugin.kt and D:\flutter\smartinia\wedort\client\android.
at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117)
at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128)
a:796)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
... 3 more

exception: c:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.dev\facebook_app_events-0.19.0\android\src\main\kotlin\id\oddbit\flutter\facebook_app_events\FacebookAppEventsPlugin.kt:16:48: warning: 'Registrar' is deprecated. Deprecated in Java
exception: import io.flutter.plugin.common.PluginRegistry.Registrar
exception:                                                ^
exception:                                         ^
e: Daemon compilation failed: null
java.lang.Exception

at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.dev\package_info_plus-4.0.2\android\src\main\kotlin\dev\fluttercommunity\plus\packageinfo\PackageInfoPlugin.kt and D:\flutter\smartinia\wedort\client\android.

at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
...  3 more

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
e: Daemon compilation failed: null
java.lang.Exception

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.dev\sign_in_with_apple-5.0.0\android\src\main\kotlin\com\aboutyou\dart_packages\sign_in_with_apple\SignInWithApplePlugin.kt and D:\flutter\smartinia\wedort\client\android.
at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117)
at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128)

at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
... 3 more
e: 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 java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.dev\stripe_android-9.5.0+1\android\src\main\kotlin\com\facebook\react\bridge\BaseActivityEventListener.kt and D:\flutter\smartinia\wedort\client\android.
at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117)
at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128)

at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
... 3 more

exception: c:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.dev\fluttertoast-8.2.2\android\src\main\kotlin\io\github\ponnamkarthik\toast\fluttertoast\FlutterToastPlugin.kt:9:48: warning: 'Registrar' is deprecated. Deprecated in Java
exception: import io.flutter.plugin.common.PluginRegistry.Registrar
exception:                                                ^
exception: c:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.dev\fluttertoast-8.2.2\android\src\main\kotlin\io\github\ponnamkarthik\toast\fluttertoast\MethodCallHandlerImpl.kt:55:40: warning: 'setColorFilter(Int, PorterDuff.Mode): Unit' is deprecated. Deprecated in Java
exception:                     gradientDrawable!!.setColorFilter(bgcolor.toInt(), PorterDuff.Mode.SRC_IN)
exception:                                        ^
exception: c:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.dev\fluttertoast-8.2.2\android\src\main\kotlin\io\github\ponnamkarthik\toast\fluttertoast\MethodCallHandlerImpl.kt:66:29: warning: 'setter for view: View?' is deprecated. Deprecated in Java
exception:                     mToast?.view = layout
exception:                             ^
exception: c:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.dev\fluttertoast-8.2.2\android\src\main\kotlin\io\github\ponnamkarthik\toast\fluttertoast\MethodCallHandlerImpl.kt:71:62: warning: 'getter for view: View?' is deprecated. Deprecated in Java
exception:                             val textView: TextView = mToast?.view!!.findViewById(android.R.id.message)
exception:                                                              ^
exception: c:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.dev\package_info_plus-4.0.2\android\src\main\kotlin\dev\fluttercommunity\plus\packageinfo\PackageInfoPlugin.kt:37:43: warning: 'getPackageInfo(String, Int): PackageInfo!' is deprecated. Deprecated in Java
exception:                 val info = packageManager.getPackageInfo(applicationContext!!.packageName, 0)
exception:                                           ^
exception: c:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.dev\sign_in_with_apple-5.0.0\android\src\main\kotlin\com\aboutyou\dart_packages\sign_in_with_apple\SignInWithApplePlugin.kt:17:48: warning: 'Registrar' is deprecated. Deprecated in Java
exception: import io.flutter.plugin.common.PluginRegistry.Registrar
exception:                                                ^
exception: c:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.dev\sign_in_with_apple-5.0.0\android\src\main\kotlin\com\aboutyou\dart_packages\sign_in_with_apple\SignInWithApplePlugin.kt:54:33: warning: 'Registrar' is deprecated.  Deprecated in Java
exception:     fun registerWith(registrar: Registrar) {
exception:                                 ^
e: Daemon compilation failed: null
java.lang.Exception

at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.dev\sentry_flutter-7.16.1\android\src\main\kotlin\io\sentry\flutter\SentryFlutter.kt and D:\flutter\smartinia\wedort\client\android.
at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117)
at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128)
t.java:796)

at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
... 3 more
exception: warning: language version 1.4 is deprecated and its support will be removed in a future version of Kotlin
Exited (1)
I tried increasing and decreasing jvm size.
I tried changing my phone with virtual phone.
I tried flutter clean
Then I try flutter pub get


Источник: https://stackoverflow.com/questions/781 ... tudio-code
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение
  • Проблемы с компиляцией и запуском проекта OpenCV с CUDA в Visual Studio, net.forward();
    Anonymous » » в форуме C++
    0 Ответы
    40 Просмотры
    Последнее сообщение Anonymous
  • Разница между компиляцией и выпуском/отладкой в ​​Visual Studio
    Anonymous » » в форуме C#
    0 Ответы
    14 Просмотры
    Последнее сообщение Anonymous
  • Проблема с компиляцией библиотеки классов .dll (универсальная Windows) в Visual Studio 2022.
    Anonymous » » в форуме C#
    0 Ответы
    28 Просмотры
    Последнее сообщение Anonymous
  • Проблема с компиляцией библиотеки классов .dll (универсальная Windows) в Visual Studio 2022.
    Anonymous » » в форуме C#
    0 Ответы
    21 Просмотры
    Последнее сообщение Anonymous
  • Проблема с компиляцией библиотеки классов .dll (универсальная Windows) в Visual Studio 2022.
    Anonymous » » в форуме C#
    0 Ответы
    19 Просмотры
    Последнее сообщение Anonymous

Вернуться в «Android»