Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a gradle based android project via command line

Tags:

android

gradle

I need to use a low end machine for android dev. I successfully created a test project using the command line:

   android create project --target <target-id> --name MyFirstApp \
   --path <path-to-workspace>/MyFirstApp --activity MyActivity \
   --package com.example.myfirstapp

However I see that it does not create any gradle files and the structure seems different that when I create a project in Studio. How do I create a project from the command line so that it includes the build.gradle files as well? Currently I do see a build.xml file that must be ant but I haven't used ant before.

like image 694
user2399453 Avatar asked Nov 26 '25 16:11

user2399453


1 Answers

Use the -g option when creating the project. For more details, try

android create project -h

like image 106
keno Avatar answered Nov 29 '25 04:11

keno



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!