我试图运行我的Flitter应用程序,结果显示:
Compiler message:
lib/main.dart:1:8: Error: Not found: 'dart:html'
import 'dart:html';
^
Invalid depfile: C:\Users\IMBA\AndroidStudioProjects\mi_card_flutter-master\.dart_tool\flutter_build\410385fb4867e1d74565d68665ecb577\kernel_snapshot.d
Invalid depfile: C:\Users\IMBA\AndroidStudioProjects\mi_card_flutter-master\.dart_tool\flutter_build\410385fb4867e1d74565d68665ecb577\kernel_snapshot.d
...
Compiler message:
lib/main.dart:1:8: Error: Not found: 'dart:html'
import 'dart:html';
^
Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ahtml; message=StandardFileSystem only supports file:* and data:* URIs)
#0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:33:7)
#1 asFileUri (package:vm/kernel_front_end.dart:567:37)
#2 writeDepfile (package:vm/kernel_front_end.dart:760:21)
<asynchronous suspension>
#3 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:536:15)
<asynchronous suspension>
#4 _FlutterFrontendCompiler.compile (package:flutter_frontend_server/server.dart:40:22)
#5 starter (package:flutter_frontend_server/server.dart:178:27)
#6 main (file:///C:/b/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:8:30)
#7 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#8 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\IMBA\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 882
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\IMBA\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 16s
Exception: Gradle task assembleDebug failed with exit code 1
在我使用问题部分的--can
标志后,出现了其他内容。
java.lang.ClassNotFoundException: com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.intellij.util.indexing.counters.IndexCounters.<clinit>(IndexCounters.java:34)
at com.intellij.util.indexing.impl.MapReduceIndex.<init>(MapReduceIndex.java:94)
at com.intellij.util.indexing.impl.MapReduceIndex.<init>(MapReduceIndex.java:110)
at org.jetbrains.jps.backwardRefs.index.CompilerReferenceIndex$CompilerMapReduceIndex.<init>(CompilerReferenceIndex.java:248)
at org.jetbrains.jps.backwardRefs.index.CompilerReferenceIndex.<init>(CompilerReferenceIndex.java:84)
at org.jetbrains.jps.backwardRefs.JavaCompilerBackwardReferenceIndex.<init>(JavaCompilerBackwardReferenceIndex.java:12)
at org.jetbrains.jps.backwardRefs.JavaBackwardReferenceIndexWriter.initialize(JavaBackwardReferenceIndexWriter.java:80)
at org.jetbrains.jps.incremental.java.JavaBuilder.buildStarted(JavaBuilder.java:149)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:359)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:178)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:139)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:288)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:121)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:228)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
我从appbrewery颤振课程中获取了这个颤振应用程序的所有材料。这是在我尝试制作MIcard项目时发生的。有没有解决这个问题的想法?
我也遇到了同样的错误,我进一步尝试:
颤振干净
flutter pub在终端中获取
,问题解决了!转到pubspec。yaml文件,尝试执行包get | Pub get,然后再次构建项目。
对我有用的是:删除你的pubspec。锁定,然后在您的pubspec中按“Pub Get”。yaml,它将重新生成pubspec。再次锁定文件,应该可以解决问题。
我对Android Studio完全陌生。我创建了我的第一个项目并设置了emulator,但当我运行应用程序时,出现了以下错误,生成输出:build failed。请帮帮我,谢谢 失败:生成失败,出现异常。 > 错误:任务“:app:mergeDebugResources”的执行失败。 无法解析配置的所有文件:应用程序:\内部\ aapt2\二进制文件'。无法解析com。Android工具。内部版
我已经尝试了多种方法,但都失败了, 失败:构建失败,但有例外。 > 错误:任务:app:compileFlutterBuildDebug的执行失败。 处理“命令”C:\Users\IMBA\flatter\bin\flatter。bat“”以非零退出值1结束 > 尝试:使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。运行--扫描以获得
正在以调试模式在sdk gphone x86上启动lib\main.dart... 失败:生成失败,出现异常。 错误:任务“:app:MergedebugResources”执行失败。 出现多个任务操作失败:执行com.Android.build.gradle.internal.tasks.workers时出错$actionfacade>Android资源编译失败C:\users\asus\doc
这是我的Gradle档案 消息gradle构建后运行项目这个错误 错误:任务“:app:dexDebug”的执行失败。 通用域名格式。Android石斑鱼类。常见的过程ProcessException:org。格拉德尔。过程内部的ExecException:进程“命令”C:\Program Files\Java\jdk1。7.0_80\bin\java。exe“”已完成,退出值为非零2
出了什么问题:任务'执行失败:app: check DebugAarMetadata'。 执行com时发生故障。Android建筑格雷德尔。内部的任务。checkAARMataWorkAction依赖项的AAR元数据(META-INF/com/android/build/gradle/AAR metadata.properties)中指定的minCompileSdk(31)大于此模块的compil
@AndroidEntryPoint类日志片段:片段(){ } /** > 回收站查看适配器的日志列表。适配器 类LogsViewHolder(val textView:textView):RecyclerView。视图持有者(文本视图) override fun onCreateViewHolder(父级:ViewGroup,viewType:Int):LogsViewHolder{return