09/25
2019

Android Dev Tools 5.5.6 is Online Now

English Version:
Android Dev Tools 5.5.6 is online now, You can download it from Google play: https://play.google.com/store/apps/details?id=cn.trinea.android.developertools , Features includes:

1. LayoutViewer: Add tips if no ‘Start in background’ permission when save layout file
2. Decompile: Fix cannot share decompile files
3. Shortcut: Fix cannot add shortcut on some phones
4. Shortcut: Fix canot open from notification bar on some phones
5. Other: Fix cannot open about page on XiaoMi Phone
6. Other: Fix 5.5.5 can’t be installed on lower Android version

 

中文版:
Android 开发助手 5.5.6 上线,可以从 Google Play应用宝酷安及各大商店下载,主要功能包含:

1. 布局查看:保存布局文件时增加无”后台弹出界面”权限提示
2. 反编译:修复分享反编译内容异常问题
3. 快捷方式:修复部分机型添加静态快捷方式异常问题
4. 快捷方式:修复部分机型打开通知栏快捷方式错误问题
5. 其他:修复小米手机打开手机关于页面错误问题
6. 其他:修复 5.5.5 无法在低版本 Android 手机安装问题

 

周末大清早 5.5.5 版本上去后就有朋友反馈无法安装,安装时提示解析失败”解析包时出现问题”,当时没太在意,因为这几乎是一个不太可能的问题,或者至少说不是新版本引起的。

后来热心的朋友发来了更详细的信息,Android 6.0 以上可以正常安装,6.0 及以下不行,安装时异常 INSTALL_PARSE_FAILED_MANIFEST_MALFORMED 或 INSTALL_FAILED_USER_RESTRICTED,并且给出了详细的 Manifest 中出错的代码段,这才想起来有个新增的功能还没完全开发完(比较忙,零散的开发了数个周末还没搞完哭瞎),在 5.5.5 发布前临时将该部分代码 stash,但 Manifest 比较早就添加了组件(activity、service),导致 5.5.5 版本中这几个组件实际并没有对应的类引发问题。应该是比较早的 Android 版本安装时对 Manifest 中组件做了更严格的校验导致,Manifest 中去掉该部分组件信息即可。当然也可能是 Mainifest 中注册的组件包名用了大写导致。
当应用切换到后台后,在小米机器上点击 Window 进行操作无法弹出 Activity,需要授权”后台弹出界面”权限,关于如何在小米手机上判断是否授权了 ‘后台弹出界面’ 权限,可参考如下代码:

public static boolean isCanBeStartedFromBackground(Context context) {
    if (AndroidVersionUtils.isNotLessThan(Build.VERSION_CODES.KITKAT)) {
        if (isXiaoMi()) {
            try {
                AppOpsManager ops = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
                int op = 10021; // >= 23
                Method method = ops.getClass().getMethod("checkOpNoThrow", new Class[]{int.class, int.class, String.class});
                Integer result = (Integer) method.invoke(ops, op, Process.myUid(), context.getPackageName());
                return result == AppOpsManager.MODE_ALLOWED;
            } catch (Exception e) {
                EventReport.report("isCanBeStartedFromBackground", e);
            }
        }
    }
    return true;
}

 

 

繁体版:
Android 開發助手 5.5.6 上線,可以從 Google Play應用寶酷安及各大商店下載,主要功能包含:

1. 布局查看:保存布局文件時增加無”後台彈出界面”權限提示
2. 反編譯:修複分享反編譯內容異常問題
3. 快捷方式:修複部分機型添加靜態快捷方式異常問題
4. 快捷方式:修複部分機型打開通知欄快捷方式錯誤問題
5. 其他:修複小米手機打開手機關于頁面錯誤問題
6. 其他:修複 5.5.5 無法在低版本 Android 手機安裝問題

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

One thought on “Android Dev Tools 5.5.6 is Online Now