1.beyond compare 4注册过期解决
windows版本: 把beyond Compare 4文件夹下面的BCUnrar.dll文件删掉就行了
2… It is safe to cache the PERMISSION_GRANTED result as the process gets killed if the
user revokes the permission setting. However, PERMISSION_DENIED should not be
cached as the process does not get killed if the user enables the permission setting.
-
- @param slotIndex 0 or 1
- @return text
*/
public static String getOperatorName(int slotIndex) {
String operatorName = “未知”;
String imsi = getIMSI(slotIndex);
if (imsi != null) {
if (imsi.startsWith(“46000”) || imsi.startsWith(“46002”) || imsi.startsWith(“46007”)) {
operatorName = “中国移动”;
} else if (imsi.startsWith(“46001”) || imsi.startsWith(“46006”)) {
operatorName = “中国联通”;
} else if (imsi.startsWith(“46003”) || imsi.startsWith(“46005”) || imsi.startsWith(“46011”)) {
operatorName = “中国电信”;
}
}
return operatorName;
}
4.解决studio Connection refused (Connection refused)
a.设置里gradle offline模式被打开
b.gradle.properties中设置代理
c.Android .gradle目录下的gradle.properties文件被设置代理
第二个问题主要是project目录下的gradle.properties中设置了代理。
这个需要查看一下这个文件中是否真的有代理,如果有一下类似配置,修改一下就好了
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=1080
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=1080
修改为:
systemProp.http.proxyHost=mirrors.opencas.cn
systemProp.http.proxyPort=80
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=1080
没有代理的话直接删除或屏蔽这一部分即可
gradle.properties 文件也是含有两个,但是却是一个是全局,一个是项目的,及第二个问题和第三个问题
4.adb查看当前界面中的Activity
adb shell “dumpsys window | grep mCurrentFocus”