增加bugly插件,收集程序bug日志
This commit is contained in:
parent
39220fc37f
commit
0b20ed0927
@ -58,6 +58,12 @@ android {
|
||||
keyPassword 'leyuan'
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
// 如打包出现Failed to transform libs.jar to match attributes
|
||||
checkReleaseBuilds false
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "com.leyuan.app"
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
PODS:
|
||||
- audioplayers_darwin (0.0.1):
|
||||
- Flutter
|
||||
- Bugly (2.5.93)
|
||||
- camera_avfoundation (0.0.1):
|
||||
- Flutter
|
||||
- connectivity (0.0.1):
|
||||
@ -51,6 +52,9 @@ PODS:
|
||||
- Flutter (1.0.0)
|
||||
- flutter_apns_only (0.0.1):
|
||||
- Flutter
|
||||
- flutter_bugly (0.0.1):
|
||||
- Bugly
|
||||
- Flutter
|
||||
- flutter_image_compress (1.0.0):
|
||||
- Flutter
|
||||
- Mantle
|
||||
@ -169,6 +173,7 @@ DEPENDENCIES:
|
||||
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
||||
- Flutter (from `Flutter`)
|
||||
- flutter_apns_only (from `.symlinks/plugins/flutter_apns_only/ios`)
|
||||
- flutter_bugly (from `.symlinks/plugins/flutter_bugly/ios`)
|
||||
- flutter_image_compress (from `.symlinks/plugins/flutter_image_compress/ios`)
|
||||
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
|
||||
- flutter_plugin_record_plus (from `.symlinks/plugins/flutter_plugin_record_plus/ios`)
|
||||
@ -199,6 +204,7 @@ DEPENDENCIES:
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- Bugly
|
||||
- DKImagePickerController
|
||||
- DKPhotoGallery
|
||||
- FMDB
|
||||
@ -235,6 +241,8 @@ EXTERNAL SOURCES:
|
||||
:path: Flutter
|
||||
flutter_apns_only:
|
||||
:path: ".symlinks/plugins/flutter_apns_only/ios"
|
||||
flutter_bugly:
|
||||
:path: ".symlinks/plugins/flutter_bugly/ios"
|
||||
flutter_image_compress:
|
||||
:path: ".symlinks/plugins/flutter_image_compress/ios"
|
||||
flutter_native_splash:
|
||||
@ -292,6 +300,7 @@ EXTERNAL SOURCES:
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
|
||||
Bugly: b8715e6ec4004b7f7fbffab0643ba80545aee3da
|
||||
camera_avfoundation: 3125e8cd1a4387f6f31c6c63abb8a55892a9eeeb
|
||||
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
|
||||
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
|
||||
@ -303,6 +312,7 @@ SPEC CHECKSUMS:
|
||||
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
|
||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||
flutter_apns_only: 3d91c0ca9dbef4439874858590909a19f8ed06a4
|
||||
flutter_bugly: c9800f4d5bc5bdc27ffdde3417a26ba44266e0c3
|
||||
flutter_image_compress: 5a5e9aee05b6553048b8df1c3bc456d0afaac433
|
||||
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
|
||||
flutter_plugin_record_plus: 79b8e13ee7ed9a94f6c067018653599528cee1fc
|
||||
|
||||
@ -14,6 +14,7 @@ import 'package:circle_app/util/device.dart';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_bugly/flutter_bugly.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
@ -36,14 +37,23 @@ final TUIChatSeparateViewModel chatSeparateViewModel =
|
||||
TUIChatSeparateViewModel();
|
||||
|
||||
void main() {
|
||||
|
||||
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
|
||||
FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
|
||||
runApp(const MyApp());
|
||||
FlutterBugly.postCatchedException(() {
|
||||
// 如果需要 ensureInitialized,请在这里运行。
|
||||
// WidgetsFlutterBinding.ensureInitialized();
|
||||
runApp(MyApp());
|
||||
FlutterBugly.init(
|
||||
androidAppId: "8509314e11",
|
||||
iOSAppId: "51e7b4e472",
|
||||
);
|
||||
});
|
||||
if (Platform.isAndroid) {
|
||||
getLostData();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Future<void> getLostData() async {
|
||||
final ImagePicker picker = ImagePicker();
|
||||
final LostDataResponse response = await picker.retrieveLostData();
|
||||
@ -57,14 +67,15 @@ Future<void> getLostData() async {
|
||||
_handleError(response.exception);
|
||||
}
|
||||
}
|
||||
|
||||
void _handleLostFiles(List<XFile> file) {}
|
||||
Future<void> _handleError(dynamic error) async {
|
||||
// 处理错误,例如记录错误或显示错误消息
|
||||
print('Error occurred: $error');
|
||||
// 在界面上显示错误消息
|
||||
showToast('内存异常,请重新上传');
|
||||
|
||||
}
|
||||
|
||||
int IM_SDK_APP_ID = 1400799631;
|
||||
|
||||
String IOS_APP_ID = "";
|
||||
@ -81,8 +92,12 @@ loginIM(String userId, String sig) async {
|
||||
.v2TIMManager
|
||||
.getMessageManager()
|
||||
.setC2CReceiveMessageOpt(
|
||||
userIDList: ['qpqz_dev_10_10000000000','qpqz_prod_10_10000000000'], // 需要设置的用户id列表
|
||||
opt: ReceiveMsgOptEnum.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE); // 用户消息接收选项属性
|
||||
userIDList: [
|
||||
'qpqz_dev_10_10000000000',
|
||||
'qpqz_prod_10_10000000000'
|
||||
], // 需要设置的用户id列表
|
||||
opt: ReceiveMsgOptEnum
|
||||
.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE); // 用户消息接收选项属性
|
||||
if (setC2CReceiveMessageOptRes.code == 0) {
|
||||
//设置成功
|
||||
}
|
||||
@ -305,7 +320,6 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
||||
initIM();
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
|
||||
|
||||
// uploadBuzIDAndToken();
|
||||
loadBgImage();
|
||||
super.initState();
|
||||
@ -354,7 +368,6 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
||||
@override
|
||||
Future<V2TimCallback> setOfflinePushStatus(
|
||||
{required AppStatus status, int? totalCount}) {
|
||||
|
||||
if (status == AppStatus.foreground) {
|
||||
// 当应用status为前台时,上报doForeground()
|
||||
return TencentImSDKPlugin.v2TIMManager
|
||||
@ -458,7 +471,6 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
||||
await precacheImage(precacheImages(_guideList.last), context);
|
||||
await precacheImage(AssetImage(getCircleImage('circle_bg')), context,
|
||||
size: Size(Get.width, Get.height));
|
||||
|
||||
}
|
||||
|
||||
precacheImages(String image) {
|
||||
@ -474,12 +486,12 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
||||
minTextAdapt: true,
|
||||
splitScreenMode: true,
|
||||
builder: (context, child) {
|
||||
return
|
||||
RefreshConfiguration(
|
||||
return RefreshConfiguration(
|
||||
footerBuilder: () => CustomLoadFooter(),
|
||||
child: OKToast(
|
||||
// 2-A: wrap your app with OKToast
|
||||
textStyle: const TextStyle(fontSize: 19.0, color: Colors.white),
|
||||
textStyle:
|
||||
const TextStyle(fontSize: 19.0, color: Colors.white),
|
||||
backgroundColor: Colors.grey,
|
||||
animationCurve: Curves.easeIn,
|
||||
// animationBuilder: const Miui10AnimBuilder(),
|
||||
@ -492,13 +504,11 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
||||
home: SplashPage(),
|
||||
builder: FlutterSmartDialog.init(),
|
||||
debugShowCheckedModeBanner: false,
|
||||
)))
|
||||
;
|
||||
)));
|
||||
});
|
||||
}
|
||||
|
||||
void addPayNotifi() {
|
||||
IOSPayment.instance.startSubscription();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -574,6 +574,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.0"
|
||||
flutter_bugly:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_bugly
|
||||
sha256: a2d13cb35bedb907cb020ea4862264dcc9044675a49a8313bb3ab2e61af79c77
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.4.4"
|
||||
flutter_cache_manager:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
@ -106,8 +106,8 @@ dependencies:
|
||||
qr_flutter: ^4.0.0
|
||||
#本地目录
|
||||
path_provider: ^2.1.0
|
||||
#第三方分享平台
|
||||
# sharesdk_plugin: 1.3.6
|
||||
#腾讯bugly
|
||||
flutter_bugly: ^0.4.4
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user