Android 异常封装,Android异常

com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request

{

"error":"invalid_grant",

"error_description" : "Invalid JWT: Token must be a short-lived token and in a reasonable timeframe"

}

与服务器时间不一致

2 .apk does not exist on disk.

打开Gradle,刷新一下就可以

com.android.org.bouncycastle.jce.exception.ExcertPathValidatorException:

此报错因为https是操作和时间戳有关,系统时间和服务器时间不对,导致过期。。。。。

4.java.security.cert.CertPathValidatorException:Trust anchor for certification path not found

使用okhttp3请求网络,证书校验不通过导致

5.The final local variable xxx cannot be assigned, since it is defined in an enclosing type“,其中xxx是一个局部变量名

解决的办法:将xxx 作一下封装,用集合或者数组,如果xxx是基本数据类型一般用数组。

如:xxx为 String类型的话,

可以封装成 String[] xxx=null;

然后在接下来用到 xxx 变量的地方, 将xxx 写成 xxx[0];

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值