Git Product home page Git Product logo

39_flutter_crash_plugin's Introduction

一个简易版极光Bugly SDK的Flutter插件,支持Crash和Dart异常消息上报。

使用方法:

dependencies:
  flutter_push_plugin:
    git:
      url: https://github.com/cyndibaby905/39_flutter_crash_plugin.git

配置Bugly App:

Bugly 为android、iOS各增加一个App配置,获取对应的app key。

Dart:

//初始化
if(Platform.isAndroid){
  FlutterCrashPlugin.setUp('Android app id');
}else if(Platform.isIOS){
  FlutterCrashPlugin.setUp('iOS app id');
}

//Dart异常上报
FlutterCrashPlugin.postException(error, stackTrace);

Android:

在android目录下App的build.gradle文件中增加下列代码,设置ndk支持架构:

 defaultConfig {
     ...
     ndk {
         abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a'
    }

  }

如果你需要适配Android P,请在res/xml目录下新增network_security_config.xml:

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">android.bugly.qq.com</domain>
    </domain-config>
</network-security-config>

然后在AndroidManifest.xml中新增网络安全配置:

<application
  ...
  android:networkSecurityConfig="@xml/network_security_config"
  ...
  >
</application>

iOS:

没有多余的配置工作

39_flutter_crash_plugin's People

Contributors

cyndibaby905 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.