V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
vilppu
V2EX  ›  Android

请问 APP 如何兼容 5.1.1 的系统?

  •  
  •   vilppu · Nov 15, 2015 · 14241 views
    This topic created in 3824 days ago, the information mentioned may be changed or developed.
    最近学习 android 开发,已经写出来一个 APP ,大部分机器测试正常的,现在发现在 5.1.1 的系统上会导致闪退问题,自己装了个 5.1.1 的模拟器却没事。
    APP最低设置的是4.0

    dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v4:21.0.2'
    compile 'com.android.support:appcompat-v7:22.2.0'
    compile files('libs/xUtils-2.6.14.jar')
    compile 'com.squareup.okhttp:okhttp:2.4.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.google.code.gson:gson:2.3.1'
    compile project(':pulltorefresh')
    compile 'com.github.JayFang1993:DropDownMenu:3e8620dc99'

    compile 'de.hdodenhof:circleimageview:1.3.0'
    }

    这是需要的包,请问这种兼容问题应该从何入手?
    21 replies    2015-11-16 17:28:29 +08:00
    laocp
        1
    laocp  
       Nov 15, 2015   ❤️ 1
    试试 BugHD ,或者 Fabric
    em70
        2
    em70  
       Nov 15, 2015   ❤️ 1
    多换几个 5.11 的机器试试,不一定是版本兼容问题,也许是某个手机的问题
    KevinChan
        3
    KevinChan  
       Nov 15, 2015   ❤️ 1
    找一台基于安卓 5.1.1 的魅族 Flyme 手机,如果它成功运行,那么你离成功就不远了
    Bown
        4
    Bown  
       Nov 15, 2015   ❤️ 1
    得看 crash log 崩溃出在哪儿啊
    wy315700
        5
    wy315700  
       Nov 15, 2015   ❤️ 1
    @KevinChan 魅族过后还有酷派大王
    anthonyeef
        6
    anthonyeef  
       Nov 15, 2015 via Android   ❤️ 1
    我觉得是 buildtool version 没有设置好…
    方便的话可以扔上 GitHub ,我 down 下来帮你看看 ;)
    vilppu
        7
    vilppu  
    OP
       Nov 15, 2015
    感谢楼上各位回答,手上并没有安卓 5 的实机,模拟器又没这问题……

    闪退的各种机型都有:索尼 Z5 ,小米 4C , LG V10 等等,还有 5.0.1 的 MX5 也崩
    同样是 5.1.1 系统的 Z2,Z3 就没问题,有点头大该如何找到问题所在

    请问兼容安卓 5 需要什么特别的方法么?
    vilppu
        8
    vilppu  
    OP
       Nov 15, 2015
    @anthonyeef

    compileSdkVersion 22
    buildToolsVersion "20.0.0"

    defaultConfig {
    applicationId "xxx.com"
    minSdkVersion 14
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
    }

    buildToolsVersion 是这些了,代码目前没办法放出来……感谢回答
    yufz
        9
    yufz  
       Nov 15, 2015
    敢不敢上错误日志
    anthonyeef
        10
    anthonyeef  
       Nov 15, 2015
    @vilppu 真的以我仅有的开发经验,不觉得这是兼容性问题……而且没有 log 可以看吗?

    附上我最近小项目的 build.gradle:
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
    applicationId "io.github.anthonyeef.example"
    minSdkVersion 14
    targetSdkVersion 23
    versionCode 1
    versionName "0.9.2"

    }


    下面是 dependencies:

    dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:design:23.0.1'
    compile 'com.android.support:recyclerview-v7:23.0.1'
    compile 'com.android.support:cardview-v7:23.0.+'

    compile 'com.squareup.picasso:picasso:2.4.0'
    compile 'de.hdodenhof:circleimageview:2.0.0'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile 'com.mcxiaoke.volley:library:1.0.18'
    compile 'de.greenrobot:eventbus:2.4.0'

    }
    vilppu
        11
    vilppu  
    OP
       Nov 15, 2015
    我手上的设备和模拟器都没问题……所以并没有错误日志

    请问魅族的 Flyme 是不是最蛋疼的系统了?
    是的话我就去搞一台回来测试用……
    vilppu
        12
    vilppu  
    OP
       Nov 15, 2015
    @KevinChan 请问魅族 note2 可以么…… MX5 有点小贵,只用来测试的话
    yufz
        13
    yufz  
       Nov 15, 2015   ❤️ 1
    把应用发过来,帮你抓 log
    [email protected]
    bf68
        14
    bf68  
       Nov 15, 2015
    搭车同问这个 Material Design 问题 http://v2ex.com/t/236376#reply0
    yufz
        15
    yufz  
       Nov 15, 2015
    @bf68 原帖回你了
    bf68
        16
    bf68  
       Nov 15, 2015
    @jinyang656 多谢搭车问才找到答案:))
    KevinChan
        17
    KevinChan  
       Nov 15, 2015   ❤️ 1
    @vilppu flyme5 好多了,但现在除了 MX5 和 Pro5 有测试版, metal 有基于 YunOS 的 flyme5 ,其他都是 bugme
    hqs123
        18
    hqs123  
       Nov 15, 2015
    断点调试 代码问题
    ThisDay
        19
    ThisDay  
       Nov 16, 2015
    难道不用 nexus 测试吗?
    29EtwXn6t5wgM3fD
        20
    29EtwXn6t5wgM3fD  
       Nov 16, 2015 via Android
    百度众测跑一遍
    wwqgtxx
        21
    wwqgtxx  
       Nov 16, 2015 via Android
    @leeyuzhe 在国内用亲儿子测试有用?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4030 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 51ms · UTC 05:13 · PVG 13:13 · LAX 22:13 · JFK 01:13
    ♥ Do have faith in what you're doing.