最近在跑Android的程序,出现以下有关gradle的错误:
The tar might be corrupted or it is compressed in an unexpected way.
By default the tar tree tries to guess the compression based on the file extension.
If you need to specify the compression explicitly please refer to the DSL reference.
原因是之前在不同的设备上运行过projct,gradle会下载编译关于此设备的包,导致不兼容。方法是把./app/cache
目录下的tar.gz
包清空,连接新设备后运行程序让gradle重新下载编译一遍就ok了。