Android 调试的环境问题

创建时间:2018/6/9 17:33:27
关键字:

魅族手机安装,提示安装失败,更新包不兼容

解决方法如下:

设置->指纹和安全->访客模式,清除访客数据,即可。

或者(锁屏, 输入访客密码,进入访客模式 ,删除里面对应的App。

1.Android USB调试不能安装apk遇到的一个坑 INSTALL_FAILED_USER_RESTRICTED

用户拒绝了USB安装,关闭usb安装管理

魅族手机:手机管家–权限管理–USB安装管理–关闭USB安装管理 
小米手机:开发者选项—打开USB安装(允许通过USB安装应用) 

 

2.Unable to resolve dependency for :constraint-layout: Could not resolve constraint-layout:1.0.2;

setting->System setting->android SDK->SDK Tools 最下面关于constraint-layout的依赖都导入;

3. android Unresolved reference: refreshlayout

缺少布局文件

 

4. Installation failed with message INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1878498074.tmp/base.apk (at Binary XML file line #28): 
Invalid process name klfront:cms in package com.klfront.arch: bad character ':'.

android:process="klfront:cms" 改成 android:process=":cms"

5. Installation failed with message INSTALL_PARSE_FAILED_MANIFEST_MALFORMED.

It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing

 

6.Instant Run detected that you are running on a target device that has a work profile or multiple user accounts.

Launching the app under a work profile or another user account on the target device will result in a crash. Learn more about how to run your app under a work profile.

 

7. Could not connect to remote process. Aborting debug session.

小米5X 开发者选项中,关闭miui优化。

其他参考:

1、打开了多个IED,关闭其它的留下一个。就是打开了两个模拟设备,比如:一个手机,一个夜神模拟器。

2、重启adb, 运行命名 adb kill-server 再 adb start-server。

3、adb端口5073被占用,只要结束掉占用的进程就行了。去任务管理器中找到对应的相同的端口号,将其关闭就行。

4、手机上的360手机助手会影响,会抢占 adb ;

5、电脑上的电脑管家,360安全卫士等杀毒软件有影响;