zoukankan      html  css  js  c++  java
  • gradle常见问题汇总

    Q1:

    Gradle version 1.10 is required. Current version is 2.0

    A1:

    Message: "Gradle version 1.10 is required. Current version is 2.0"

    Occurs when: Attempting to build an Android project that requires 1.10 version of Gradle while using 2.0 version of it as native.

    Solution: Using Gradle Wrapper

    Steps:

    1. Make sure the distributionUrl is specified as gradle-1.10-all.zip at the Gradle-wrapper properties file within the Android project. The file path would be like this:

      MyAndroidProject/gradle/wrapper/gradle-wrapper.properties

    2. Run Gradle Wrapper command at the very top level of the project where the executable scripts (i.e. gradlew and gradlew.bat) are located.

      For Unix-like OS:

      ./gradlew wrapper

      For Windows OS:

      gradlew.bat wrapper

    3. Run build command with Gradle Wrapper.

      For Unix-like OS:

      ./gradlew build

      For Windows OS:

      gradlew.bat build

    Q2:

    Caused by: java.io.IOException: Cannot run program "ndk-build" (in directory "E:AndroidEmulatorDetection-masterapp"): CreateProcess error=2

    A2:

    Assuming you are running from a window OS...

    Try changing from: D:android-ndk-r7c dk-build to: D:android-ndk-r7cndk-build.cmd

    Q3:

     

    A3:

    local.properties中ndk.dir的路径不能包含空格

    附local.properties:

    sdk.dir=D:\Program Files\Android\sdk
    ndk.dir=D:\android-ndk-r10e
  • 相关阅读:
    HTML5结构
    HTML5新增的非主体元素header元素、footer元素、hgroup元素、adress元素
    CF GYM 100703G Game of numbers
    CF GYM 100703I Endeavor for perfection
    CF GYM 100703K Word order
    CF GYM 100703L Many questions
    CF GYM 100703M It's complicate
    HDU 5313 Bipartite Graph
    CF 560e Gerald and Giant Chess
    POJ 2479 Maximum sum
  • 原文地址:https://www.cnblogs.com/luzhiyuan/p/4670054.html
Copyright © 2011-2022 走看看