日常记录

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”

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值