• android studio使用中遇到的问题


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

      

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

    win8系统下,打开C:Users用户名.gradlewrapperdistsgradle-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:关闭,然后再重新打开该项目,会自动添加该文件。^……^

  • 相关阅读:
    廖大python实战项目第六天
    廖大python实战教程第七天
    廖大python实战项目第五天
    Map的遍历方法及字符计数
    事务详解
    java设计模式详解
    程序员常见一些英文缩写
    Hibernate小笔记
    Myeclipse有关的问题
    hibernate对象的三种状态及转换
  • 原文地址:https://www.cnblogs.com/suxiaoqi/p/7155968.html
Copyright © 2020-2023  润新知