Build Android project on command line on OSX: Task 'assembleDebug' not found in root project

前端 未结 3 2189
一生所求
一生所求 2021-02-20 01:31

I\'m trying to build Android projects on the OSX (Mavericks 10.9.5) command line using this how-to: http://developer.android.com/tools/building/building-cmdline.html.

Th

相关标签:
3条回答
  • 2021-02-20 01:47

    try This: ./android create project -p AppPAKTGV -a Main -k com.example.apppaktgv -t android-23 -g -v 0.11.+

    it's works but when i try target 24 or 25 not work i don't now

    0 讨论(0)
  • 2021-02-20 01:58

    android create project does not create a gradle friendly structure. It creates an ant friendly structure. You have two options depending on your intentions.

    1. use ant to build your project ( not currently supported by Android team )
    2. use Android Studio to generate a gradle friendly project structure.

    num 2 is the recommended approach by the Android team. It's as simple as dl'ing Android Studio and creating a new project. From there you should be able to create a new project that can be built with ./gradlew build

    0 讨论(0)
  • 2021-02-20 02:01

    Try to do this and note

    a) you need to type tools/android under Step 3 (like step 2: Execute) -- but as said the ant structure is not helpful -- not sure I can go from there

    b) I follow the advice and also ensure get the platform-tools -- I can build -- I can get that .apk -- I can adb install (I rename any existing .apk)

    Seems working!

    0 讨论(0)
提交回复
热议问题