我正在尝试构建我的 flutter 应用程序及其抛出编译错误,根据错误,它似乎是 flutter 文件而不是我的代码的内容。知道如何解决这个问题吗?
PS C:\Users\FlutterProject\tirthankar> flutter build web
Target dart2js failed: Exception: /C:/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-3.4.0+1/lib/src/X509Certificate/asn1_decoder.dart:163:25:
Error: The integer literal 9223372036854775807 can't be represented exactly in JavaScript.
int int64MaxValue = 9223372036854775807;
^^^^^^^^^^^^^^^^^^^
Error: Compilation failed.
Compiling lib\main.dart for the Web... 18.3s
Exception: Failed to compile application for the Web.
PS C:\Users\FlutterProject\tirthankar>
Run Code Online (Sandbox Code Playgroud)
下面是 dart/flutter 中失败的代码。
static List<int> loadSubContent({@required Iterator<int> iterator}) {
var len = getContentLength(iterator: iterator);
int int64MaxValue = 9223372036854775807;
if (len >= BigInt.from(int64MaxValue)) {
return <int>[];
}
var byteArray = <int>[]; …Run Code Online (Sandbox Code Playgroud) 我花了一天时间试图解决这个问题,最后找到了解决方案.由于谷歌没有任何关于这个Eclipse错误的答案,我想把它放在每个人身上.
问题:当我尝试通过eclipse发布项目时,我收到此错误消息:
没有指定运行时.WLS Web服务项目需要为大多数工具提供运行时.
如何解决这个问题呢?
我正在尝试使用 flutter_fullpdfview 1.0.12 打开 PDF 文件,我的 PDF 文件位于 asset 文件夹下,但不知何故我收到错误,无法找到文件。我尝试了几个选项,但没有一个有效,并且都返回相同的错误。以下是我尝试加载文件的函数,但它们都因相同的错误而失败。
Future<File> copyAsset() async {
Directory tempDir = await getTemporaryDirectory();
String tempPath = tempDir.path;
File tempFile = File('$tempPath/copy.pdf');
ByteData bd = await rootBundle.load('assets/jainaarti.pdf');
await tempFile.writeAsBytes(bd.buffer.asUint8List(), flush: true);
return tempFile;
}
Future<File> fromAsset(String asset, String filename) async {
// To open from assets, you can copy them to the app storage folder, and the access them "locally"
Completer<File> completer = Completer();
try {
var dir = await getApplicationDocumentsDirectory();
File file = File("${dir.path}/$filename"); …Run Code Online (Sandbox Code Playgroud) 我一直在寻找解决这个问题的答案,找不到任何东西,所以只需将答案发给别人.
如果您尝试打开JAVA桌面应用程序并获取"BadFieldException [必须为nativelib或installer-desc支持启用缓存,http"异常.
flutter ×2
java ×2
dart ×1
eclipse ×1
flutter-web ×1
jnlp ×1
pdf-viewer ×1
swing ×1
weblogic ×1