我正在使用 Android Studio,当我在 chrome 或 Edge 上运行项目时,我会看到启动屏幕,然后,通常我会看到以下内容:
编辑 - 添加后发生await Firebase.initializeApp();
在 mac m2 max 上,我使用安装了 podman brew intsall podman,然后运行podman machine init --disk-size 150,然后运行podman start。它卡在“正在等待虚拟机...”上。我从 qemu 看到此错误:同步异常位于 0x00000000BC562000
我正在使用 Navigation 2 并setUrlStrategy(PathUrlStrategy());
添加了它WillPopScope,但onWillPop单击浏览器的后退按钮时不会调用 。
Widget build(context) {
return WillPopScope(
onWillPop: () async {
print('here');
if (currentStep == 0) {
return false;
}
return true;
},
child: Scaffold(...
Run Code Online (Sandbox Code Playgroud) 我在 user_bloc.dart 中有这段代码:
\nUserBloc(this._userRepository, UserState userState) : super(userState) {\n on<RegisterUser>(_onRegisterUser);\n }\n\nvoid _onRegisterUser(RegisterUser event, Emitter<UserState> emit) async {\n emit(UserRegistering());\n try {\n // detect when the user is registered\n FirebaseAuth.instance.authStateChanges().listen((User? user) async {\n if (state is UserRegistering && user != null) {\n // save user to db\n try {\n await _userRepository.addUpdateUserInfo(user.uid, userInfo);\n } catch (e) {\n emit(UserRegisteringError("Could not save user"));\n }\n emit(UserLoggedIn(user));\n }\n });\n ... call FirebaseAuth.instance.createUserWithEmailAndPassword\nRun Code Online (Sandbox Code Playgroud)\n这是 _userRepository.addUpdateUserInfo:
\nFuture<void> addUpdateUserInfo(String userId, UserInfo userInfo) async {\n try {\n var …Run Code Online (Sandbox Code Playgroud) 当我调用startActivityForResult(或startActivity)时,即使在创建新活动之前,也会调用MainActivity的"onCreate".其他意图不会发生这种情况.
这是listview中按钮的代码内部单击处理程序,它具有适配器(在SherlockActionBar选项卡内的片段内):
((MainActivity)context).setVideoId(v.getTag().toString());
Intent videoIntent = YouTubeStandalonePlayer.createVideoIntent((Activity) context, "AIzaSyC1sF6kq9hHGrQvRSiU8Ks5iYfVCbdg7zA", v.getTag().toString(), 0, true, false);
((Activity)context).startActivityForResult(videoIntent, 12);
Run Code Online (Sandbox Code Playgroud)
这是适配器的构造函数:
public ItemAdapter(Context c, int textViewResourceId) {
super(c, textViewResourceId);
this.layoutResourceId = textViewResourceId;
this.context = c;
Run Code Online (Sandbox Code Playgroud) android android-intent actionbarsherlock start-activity android-youtube-api
flutter-web ×2
android ×1
async-await ×1
back-button ×1
browser ×1
crash ×1
dart ×1
flutter ×1
flutter-bloc ×1
macos ×1
podman ×1
qemu ×1