Gradle FAQ Summary

Source: Internet
Author: User

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 a Android project that requires 1.10 version of the Gradle while using 2.0 version of it as native.

Solution: Using Gradle Wrapper

Steps:

  1. Make sure the distributionurl are specified as gradle-1.10-all.zip at the gradle-wrapper properties file Within the Android project. The file path would is 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) is 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-master\app"): CreateProcess error=2

A2:

Assuming you is running from a window OS ...

Try changing from:d:\android-ndk-r7c\ndk-build to:d:\android-ndk-r7c\ndk-build.cmd

Q3:

A3:

The path to Ndk.dir in local.properties cannot contain spaces

Attached local.properties:

sdk.dir=d\:\\program files\\android\\sdkndk.dir=d\:\\android-ndk-r10e

Gradle FAQ Summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.