linux - Re-initialize and build Android project from the command line? -


i have once built android project on linux machine; that, downloaded android sdk , used gradlew build it, worked fine.

now, got zip containing android project source code; however, i'm not experienced this, have no idea project made in, nor how built. directory structure looks this:

. ├── androidmanifest.xml ├── assets ├── bin │   ├── androidmanifest.xml │   ├── classes │   │   └── com # ... .class files here ... │   ├── jarlist.cache │   └── res ├── gen │   └── com     # ... buildconfig.java here ... │   └── android-support-v4.jar ├── lint.xml ├── proguard-project.txt ├── project.properties ├── res │   ├── drawable       # ... .png files here ... │   ├── drawable-hdpi  # many similar dirs, launcher.png file ... │   ├── layout         # main.xml , other .xml files ... │   ├── raw            # .json files here ... │   ├── values         # values-v11, values-v14 dirs; has styles.xml ... └── src     └── com            # .java source files here ... 

i have tried how/when generate gradle wrapper files? in directory (that is, gradlew wrapper , gradlew init), if gradle-specific files generated, cannot build - since cannot run gradlew assemble or gradlew build, "task 'assemble' not found in root project".

after finding build android project on command line on osx: task 'assembledebug' not found in root project, thought maybe has compiled ant, fails "buildfile: build.xml not exist!" (and indeed, such file doesn't exist).

from read around, guess 1 should download android studio , try opening project there -- i'd rather not download/learn/use yet ide (i use standalone text editor , don't use, say, eclipse), , rather done through command line.

so how "re-initialize" project, can build command line tools on linux (gradle or ant, though guess gradle preferred, apparently ant not supported android team)?

ok, found there hidden file in project, .project, has instance:

<buildcommand>   <name>com.android.ide.eclipse.adt.resourcemanagerbuilder</name>   <arguments>   </arguments> </buildcommand> 

... means had been built eclipse adt plugin ( http://developer.android.com/sdk/installing/installing-adt.html ), support discontinued in favor of android studio ( migrating android studio | android developers ).

knowing this, found how create build.xml android project? , ant command not generating apk file, tried command:

/path/to/sdk/tools/android update project -p $pwd 

... did create build.xml used ant system - seemed pass (but build failed due unresolved library dependencies, different topic).

there seems no easy way convert ant based project gradle 1 command line - , migration path through android studio may/will require manual changes.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -