android studio使用中遇到的问题

1.从SVN上导入一个新项目,第一次building的时候时间很长。

  

使用该设置时,加载的gradle wrapper为项目中\gradle\wrapper\gradle-wrapper.properties里设置的版本,例如,我所同步的项目的该文件的内容为:

win8系统下,打开C:\Users\用户名\.gradle\wrapper\dists\gradle-2.14.1-all,里面有一个文件夹8bnwg5hd3w55iofp58khbp6yv,点击进去,里面有两个文件

这两个文件一定不能删除。接着从网上下载一个gradle-2.14.1-all.zip拷贝到该目录下(注意,压缩包命名一定要与gradle-wrapper.properties里的一致),解压,然后重新打开android studio,就可以很快的building完成。

 

2.导入一个新项目时,出现错误 :SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

   解决方法1:在项目根目录下新建一个文件local.properties,指定sdk的路径,例如SDK路径为D\:\\adt-bundle-windows-x86_64_with_Android_5.0\\sdk时:

## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
sdk.dir=D\:\\adt-bundle-windows-x86_64_with_Android_5.0\\sdk

然后,重试即可。

解决方法2:关闭,然后再重新打开该项目,会自动添加该文件。^……^

转载于:https://www.cnblogs.com/suxiaoqi/p/7155968.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值