gpt4 book ai didi

firebase - 无法加载providerinstaller模块: No acceptable module found.本地版本为0远程版本为0错误flutter

转载 作者:行者123 更新时间:2023-12-03 02:41:21 35 4
gpt4 key购买 nike

我在运行控制台中收到此警告。 Baically,我的chatRoomTile 没有显示在屏幕上。它只是显示空白屏幕,即使在我与 10 人聊天之后。
它只是显示主屏幕和红色容器 2 秒,如条件语句中所示。
这是运行中的输出 -

Performing hot restart...
Syncing files to device sdk gphone x86...
Restarted application in 1,522ms.
W/eyansh.whatsap( 6057): Accessing hidden method Ldalvik/system/CloseGuard;->close()V (greylist,core-platform-api, linking, allowed)
W/DynamiteModule( 6057): Local module descriptor class for providerinstaller not found.
I/DynamiteModule( 6057): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller( 6057): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
Lost connection to device.
这是我的代码 -
import 'package:flutter/material.dart';
import 'package:whatsapp/helper/authenticate.dart';
import 'package:whatsapp/helper/constants.dart';
import 'package:whatsapp/helper/helperFunctions.dart';
import 'package:whatsapp/screens/search.dart';
import 'package:whatsapp/services/auth.dart';
import 'package:whatsapp/services/database.dart';

class ChatRoom extends StatefulWidget {
@override
_ChatRoomState createState() => _ChatRoomState();
}

class _ChatRoomState extends State<ChatRoom> {

AuthMethods authMethods = new AuthMethods();
DatabaseMethods databaseMethods = new DatabaseMethods();
Stream chatRoomStream;

Widget chatRoomList(){
return StreamBuilder(
stream: chatRoomStream,
builder: (context, snapshot) {
return snapshot.hasData ? ListView.builder(
itemCount: snapshot.data.documents.length,
itemBuilder: (context, index) {
return ChatRoomTile(
snapshot.data.documents[index]["chatRoomId"],
);
}) : Container(color: Colors.red,);
},
);
}

@override
void initState() {
getUserInfo();
super.initState();
}

getUserInfo() async{
Constants.myName = await HelperFunctions.getUserNameSharedPreference();
databaseMethods.getChatRooms(Constants.myName).then((val){
setState(() {
chatRoomStream = val;
});
});
setState(() {

});
}

@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
appBar: AppBar(
backgroundColor: Color(0xff161517),
title: Text(
'WhatsApp',
style: TextStyle(
color: Colors.white54,
fontSize: 20.0,
),
),
actions: [
Container(
height: 25.0,
width: 25.0,
child: FloatingActionButton(
heroTag: "btn1",
backgroundColor: Color(0xff161517),
child: Icon(Icons.search, color: Colors.white54,),
onPressed: (){
},
),
),
GestureDetector(
onTap: (){
authMethods.signOut();
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => Authenticate()));
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 15.0),
child: Icon(
Icons.exit_to_app,
color: Colors.white54,
),
),
),
GestureDetector(
onTap: (){
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 1.0),
child: Icon(
Icons.more_vert,
color: Colors.white54,
),
),
),
],
),
body: chatRoomList(),
floatingActionButton: FloatingActionButton(
heroTag: "btn2",
backgroundColor: Colors.green[700],
onPressed: (){
Navigator.push(context, MaterialPageRoute(builder: (context) => SearchScreen()));
},
child: Icon(
Icons.message,
color: Colors.white,
),
),
),
);
}
}

class ChatRoomTile extends StatelessWidget {

final String userName;
ChatRoomTile(this.userName);

@override
Widget build(BuildContext context) {
return Container(
child: Row(
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
image: DecorationImage(
image: AssetImage("assets/images/DefaultPhoto.png"),
fit: BoxFit.fill,
),
borderRadius: BorderRadius.circular(40.0),
),
),
SizedBox(width: 8.0,),
Text(
userName,
style: TextStyle(
color: Colors.white,

),
),
],
),
);
}
}
如果有人想要任何小部件的详细信息,你可以问我。

最佳答案

将以下权限添加到 android/app/src/main/AndroidManifest.xml ,
之前 <application>开始:

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

关于firebase - 无法加载providerinstaller模块: No acceptable module found.本地版本为0远程版本为0错误flutter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64343699/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com