Code Monkey home page Code Monkey logo

autoex's Introduction

AutoEx

帮助Android开发者,让项目在崩溃时从异常堆栈中,自动寻找Stack Overflow的回答。

AutoEx api+svg sizesvg stackoverflow

项目崩溃后,你的LogCat日志会出现来自Stack Overflow的回答。

像下面这样:

┌—————————————————————AutoEx——————————————————————
├ 错误类型:android.content.res.Resources$NotFoundException: Resource ID #0x7f0b0056 type #0x12 is not valid。↑详细异常请往上滚动查看↑
├ 推荐参考Stack Overflow上4条同类问题。↓点击下方连接查看↓
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
├ 标题:Android Resources$NotFoundException: Resource ID #0x7f030027
├ 链接:https://stackoverflow.com/questions/21269502/android-resourcesnotfoundexception-resource-id-0x7f030027
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
├ 标题:android.content.res.Resources$NotFoundException: Resource ID #0x7f07007e
├ 链接:https://stackoverflow.com/questions/48161713/android-content-res-resourcesnotfoundexception-resource-id-0x7f07007e
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
├ 标题:App crashes when adding an ImageView?
├ 链接:https://stackoverflow.com/questions/47600747/app-crashes-when-adding-an-imageview
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
├ 标题:XML Android app will not load on phone
├ 链接:https://stackoverflow.com/questions/48310838/xml-android-app-will-not-load-on-phone
└—————————————————————AutoEx——————————————————————

用法

  • 1.根build.gradle添加仓库:
allprojects {
    repositories {maven { url 'https://jitpack.io' }}
}
  • 2.添加dependency (低版本的Gradle可以使用 debugCompile releaseCompile)
dependencies {
     debugImplementation 'com.github.BolexLiu.AutoEx:AutoEx-Lib:v1.0.7' //debug包
     releaseImplementation 'com.github.BolexLiu.AutoEx:AutoEx-Lib-No-Op:v1.0.7' //release包
}
  • 3.Application初始化一行搞定
 AutoEx.apply();

或者你也可以自己配参数

    /**
     * @param mApp    Applicatin
     * @param maxSize 最大提示答案数目
     * @param tag     自定义日志 默认 AutoEx
     * @param isDebug 是否开启调试 true为开启 false为关闭 默认开启
     */
    public static void apply(Context mApp, int maxSize, String tag, boolean isDebug)

android support:

  • minSdkVersion 14
  • maxSdkVersion 26+

更新描述

  • 1.0.5 修复小米等手机直接被Kill,添加多进程(感谢静心同学的测试)
  • 1.0.6 最大提示数目、增加日志过滤、调试模式选择
  • 1.0.7 增加无参构造、增加Rlease空包支持(感谢巴神)

后续需求

  • 基于搜索引擎扩展结果,避免精准匹配的异常有时候出不来的问题。要考虑墙的问题(google? bing?)
  • 编译时gradle异常提示,目前只是运行时的,gradle取error的日志我试了一下是没问题的,做成插件就可以用了。等有空再折腾

AutoEx仅不到9kb的大小。为了保持精简干净不给开发者添麻烦,AutoEx放弃依赖第三方库。(比如OKHttp、Gson等)。 所以你不用担心依赖冲突等问题。另外请保持手机是联网状态的。希望能给你带来方便。欢迎pr,么么哒。

autoex's People

Contributors

bolexliu avatar

Watchers

 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.