当我跑步时
$ flutter run
Run Code Online (Sandbox Code Playgroud)
我在移动设备上收到提示,询问是否要在设备上安装该应用程序。我同意,那么什么也没发生!
卡在这里
Launching lib/main.dart on POCO F1 in debug mode...
Initializing gradle... 1.5s
Resolving dependencies... 9.2s
Gradle task 'assembleDebug'... 22.9s
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk... 14.9s
Run Code Online (Sandbox Code Playgroud)
那什么都没有
我正在尝试使用 VSCode 调试 C# 脚本。但是当我按 F5 时它显示
但是我确实在 VSCode 中安装了 C# 扩展
关于我的 VSCode
Version: 1.56.2 (system setup)
Commit: 054a9295330880ed74ceaedda236253b4f39a335
Date: 2021-05-12T17:13:13.157Z
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Windows_NT x64 10.0.19042
Run Code Online (Sandbox Code Playgroud)
我的机器上也安装了 Dotnet
dotnet --version
5.0.203
Run Code Online (Sandbox Code Playgroud)
以前,VSCode 用于解决所有必要的依赖项并创建调试 C# 脚本所需的文件。也许最新的更新有一些问题?
我已经使用 ARFoundation 包在 Unity 中构建了一个 ARCore 应用程序。然后,我按照以下链接中的说明将 Unity 应用程序嵌入到原生 Android 应用程序中:Embedded Unity inside Android App。
AR 应用程序作为独立应用程序运行良好。但是我在将其嵌入本机 Android 应用程序时遇到错误:
E/Unity: Unable to find UnityARCore
E/Unity: DllNotFoundException: UnityARCore
at (wrapper managed-to-native) UnityEngine.XR.ARCore.Api:UnityARCore_setCameraPermissionProvider (UnityEngine.XR.ARCore.Api/CameraPermissionRequestProvider)
at UnityEngine.XR.ARCore.ARCoreCameraExtension.Register () [0x00000] in <filename unknown>:0
Run Code Online (Sandbox Code Playgroud) 我试着
launch("tel://21213123123")
Run Code Online (Sandbox Code Playgroud)
但是,我收到以下错误!
PlatformException (PlatformException(error, Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?, null))
Run Code Online (Sandbox Code Playgroud)
在这个文件中
message_codecs.dart
Run Code Online (Sandbox Code Playgroud)
这是我的错误日志
E/MethodChannel#plugins.flutter.io/url_launcher(26131): Failed to handle method call
E/MethodChannel#plugins.flutter.io/url_launcher(26131): android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
E/MethodChannel#plugins.flutter.io/url_launcher(26131): at android.app.ContextImpl.startActivity(ContextImpl.java:672)
E/MethodChannel#plugins.flutter.io/url_launcher(26131): at android.app.ContextImpl.startActivity(ContextImpl.java:659)
E/MethodChannel#plugins.flutter.io/url_launcher(26131): at android.content.ContextWrapper.startActivity(ContextWrapper.java:331)
E/MethodChannel#plugins.flutter.io/url_launcher(26131): at io.flutter.plugins.urllauncher.UrlLauncherPlugin.onMethodCall(UrlLauncherPlugin.java:61)
E/MethodChannel#plugins.flutter.io/url_launcher(26131): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:200)
E/MethodChannel#plugins.flutter.io/url_launcher(26131): at io.flutter.view.FlutterNativeView.handlePlatformMessage(FlutterNativeView.java:163)
E/MethodChannel#plugins.flutter.io/url_launcher(26131): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#plugins.flutter.io/url_launcher(26131): at android.os.MessageQueue.next(MessageQueue.java:323)
E/MethodChannel#plugins.flutter.io/url_launcher(26131): at …Run Code Online (Sandbox Code Playgroud) 这是我的代码,我创建了一个ExpansionTile并且它有一个 child TextFormField。
import 'package:flutter/material.dart';
class OrderCreatePage extends StatefulWidget {
@override
_OrderCreatePageState createState() => _OrderCreatePageState();
}
class _OrderCreatePageState extends State<OrderCreatePage> {
String _userID;
TextEditingController _controllerl;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: new Text("Create"),
),
body: ExpansionTile(
title: Text("Create"),
children: <Widget>[
TextFormField(
decoration: InputDecoration(
labelText: "User ID",
icon: Icon(Icons.face),
),
validator: (val) {},
controller: _controllerl,
onSaved: (val) => _userID = val,
)
],
),
);
}
}
Run Code Online (Sandbox Code Playgroud)
每当我在 中输入内容TextFormField并折叠 时ExpansionTile, …