Creating an android project with gradle from the command line is not recommended?

I am trying to create an android project using gradle from the command line using this command:

  android create project \
    --target android-23 \
    --name HelloWorld \
    --path HelloWorld/ \
    --activity MainActivity \
    --package com.example.helloworld \
    --gradle \
    --gradle-version 1.3.0

The project structure was successfully generated, but when I try to start gradlew assembleDebug, I get:

A problem occurred evaluating root project 'HelloWorld'.
> Could not create plugin of type 'AppPlugin'.

I was browsing Google for half a day, and finally I found that using gradle in an android project to create (maybe) was deprecated:

https://code.google.com/p/android/issues/detail?id=160032

Are there supported methods (clean, without hacks) to achieve the goal (on the command line)?

+4
source share
1 answer

As indicated here:

http://eqdn.tech/android-development-on-the-command-line/

" ", . , gradle/wrapper/gradle -wrapper.properties :

distributionUrl = HTTP://services.gradle.org/distributions/ gradle -1.12-all.zip

:

distributionUrl = HTTP://services.gradle.org/distributions/ gradle -2.2.1-all.zip

"runProguard false" "minifyEnabled true" build.gradle.

+2

All Articles