V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
vilppu
V2EX  ›  Android

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

  •  
  •   vilppu · 2015-11-15 16:38:59 +08:00 · 5825 次点击
    这是一个创建于 3084 天前的主题,其中的信息可能已经有所发展或是发生改变。
    最近学习 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 条回复    2015-11-16 17:28:29 +08:00
    laocp
        1
    laocp  
       2015-11-15 17:02:00 +08:00   ❤️ 1
    试试 BugHD ,或者 Fabric
    em70
        2
    em70  
       2015-11-15 17:49:57 +08:00   ❤️ 1
    多换几个 5.11 的机器试试,不一定是版本兼容问题,也许是某个手机的问题
    KevinChan
        3
    KevinChan  
       2015-11-15 19:04:27 +08:00   ❤️ 1
    找一台基于安卓 5.1.1 的魅族 Flyme 手机,如果它成功运行,那么你离成功就不远了
    Bown
        4
    Bown  
       2015-11-15 19:08:43 +08:00   ❤️ 1
    得看 crash log 崩溃出在哪儿啊
    wy315700
        5
    wy315700  
       2015-11-15 19:09:01 +08:00   ❤️ 1
    @KevinChan 魅族过后还有酷派大王
    anthonyeef
        6
    anthonyeef  
       2015-11-15 19:42:25 +08:00 via Android   ❤️ 1
    我觉得是 buildtool version 没有设置好…
    方便的话可以扔上 GitHub ,我 down 下来帮你看看 ;)
    vilppu
        7
    vilppu  
    OP
       2015-11-15 19:49:45 +08:00
    感谢楼上各位回答,手上并没有安卓 5 的实机,模拟器又没这问题……

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

    请问兼容安卓 5 需要什么特别的方法么?
    vilppu
        8
    vilppu  
    OP
       2015-11-15 19:52:28 +08:00
    @anthonyeef

    compileSdkVersion 22
    buildToolsVersion "20.0.0"

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

    buildToolsVersion 是这些了,代码目前没办法放出来……感谢回答
    jinyang656
        9
    jinyang656  
       2015-11-15 19:57:09 +08:00
    敢不敢上错误日志
    anthonyeef
        10
    anthonyeef  
       2015-11-15 20:00:28 +08:00
    @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
       2015-11-15 20:10:18 +08:00
    我手上的设备和模拟器都没问题……所以并没有错误日志

    请问魅族的 Flyme 是不是最蛋疼的系统了?
    是的话我就去搞一台回来测试用……
    vilppu
        12
    vilppu  
    OP
       2015-11-15 20:15:00 +08:00
    @KevinChan 请问魅族 note2 可以么…… MX5 有点小贵,只用来测试的话
    jinyang656
        13
    jinyang656  
       2015-11-15 20:48:48 +08:00   ❤️ 1
    把应用发过来,帮你抓 log
    [email protected]
    bf68
        14
    bf68  
       2015-11-15 20:49:44 +08:00
    搭车同问这个 Material Design 问题 http://v2ex.com/t/236376#reply0
    jinyang656
        15
    jinyang656  
       2015-11-15 21:02:40 +08:00
    @bf68 原帖回你了
    bf68
        16
    bf68  
       2015-11-15 21:17:54 +08:00
    @jinyang656 多谢搭车问才找到答案:))
    KevinChan
        17
    KevinChan  
       2015-11-15 21:59:59 +08:00   ❤️ 1
    @vilppu flyme5 好多了,但现在除了 MX5 和 Pro5 有测试版, metal 有基于 YunOS 的 flyme5 ,其他都是 bugme
    hqs123
        18
    hqs123  
       2015-11-15 23:39:21 +08:00
    断点调试 代码问题
    leeyuzhe
        19
    leeyuzhe  
       2015-11-16 11:08:52 +08:00
    难道不用 nexus 测试吗?
    shengyu
        20
    shengyu  
       2015-11-16 14:47:07 +08:00 via Android
    百度众测跑一遍
    wwqgtxx
        21
    wwqgtxx  
       2015-11-16 17:28:29 +08:00 via Android
    @leeyuzhe 在国内用亲儿子测试有用?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4974 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:45 · PVG 17:45 · LAX 02:45 · JFK 05:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.