时间:2017年7月20日 14:00左右,重新编译了一下Android Studio,报出了一个匪夷所思的错误:
> Could not resolvecom.tencent.mm.opensdk:wechat-sdk-android-with-mta:+.
Required by:
project :LibraryFromWeChat
> Could not resolvecom.tencent.mm.opensdk:wechat-sdk-android-with-mta:+.
> Failed to list versions forcom.tencent.mm.opensdk:wechat-sdk-android-with-mta.
> Could not list versions using M2 pattern 'https://raw.githubusercontent.com/Pgyer/mvn_repo_pgyer/master/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'.
> Could not GET 'https://raw.githubusercontent.com/Pgyer/mvn_repo_pgyer/master/com/tencent/mm/opensdk/wechat-sdk-android-with-mta/'. Received status code 400 from server: Bad Request
早上还好好的,为啥下午就莫名其妙报出这个错误呢。看错误内容,应该是AS找不到指定的依赖库,但是之前也编译缓存过啊,这种情况应该就是as发现了新版本,才会主动连接版本服务器获取的。
于是翻查了微信的在线文档:
在使用方法上并没什么变化。这时注意到微信是使用jcenter管理的,于是上jcenter找到wechat-sdk-android-with-mta
发现:
果然是有新版本,而且是2017年7月20日,也就是今天更新的!!
估计问题就出在这里,于是手动将
compile 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+'
更改为
compile'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:1.3.4'
也就是降回1.3.4版本,as编译通过!!
看来是1.3.5版本遇到发布问题了,希望微信开放平台sdk有关同学看看是什么问题了。