Android异常

2018-03-05  本文已影响0人  奔跑的图腾

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,刷新一下就可以

  1. 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];

上一篇下一篇

猜你喜欢

热点阅读