zoukankan      html  css  js  c++  java
  • Android studio开发中遇到的错误

    (1)编译时发生

    Error:(25, 0) Gradle DSL method not found: 'compile()'
    Possible causes:<ul><li>The project 'AP' may be using a version of Gradle that does not contain the method.
    <a href="openGradleSettings">Gradle settings</a></li><li>The build file may be missing a Gradle plugin.
    <a href="apply.gradle.plugin">Apply Gradle plugin</a></li>

    解决方法:

    1、在最外层的Gradle中,删除如下的语句

    dependencies {
    compile files('libs/xUtils-2.6.14.jar')
    }


    (2)编译时发生

    Error:(25, 0) Gradle DSL method not found: 'android()'
    Possible causes:<ul><li>The project 'AP' may be using a version of Gradle that does not contain the method.
    <a href="openGradleSettings">Gradle settings</a></li><li>The build file may be missing a Gradle plugin.
    <a href="apply.gradle.plugin">Apply Gradle plugin</a></li>


    解决方法:

    1、在最外层的Gradle中,删除如下的语句

    android {
    compileSdkVersion 23
    buildToolsVersion '23.0.2'
    }


    (3)编译时发生

    Error:(1, 0) Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details. This warning can be disabled by using the command line flag -Dcom.android.build.gradle.overridePathCheck=true, or adding the line com.android.build.gradle.overridePathCheck=true' to gradle.properties file in the project directory.
    <a href="openFile:D:workspacebackup我的框架APappuild.gradle">Open File</a>


    解决方法:

    1、你的项目中存在中文命名,将项目中对应的中文命名改为英文即可

  • 相关阅读:
    python中将汉字转换成拼音
    关于拉格朗日和内维尔插值算法的python实现
    hdoj1874 (优先队列+Dijkstra)
    hdoj1325 Is It A Tree?
    poj2299 二分思想
    nyoj89 汉诺塔(二)
    nyoj914Yougth的最大化(二分搜索 + 贪心)
    nyoj832 合并游戏(状态压缩DP)
    zoj2432 hdoj1423 最长公共上升子序列(LCIS)
    poj1308 Is It A Tree?(并查集)详解
  • 原文地址:https://www.cnblogs.com/mjhjl/p/14901903.html
Copyright © 2011-2022 走看看