Does the ADT plugin automatically create an ant build file?

喜欢而已 提交于 2019-12-04 07:20:28

The ADT plugin doesn't generate an Ant file.

The android command will generate an Ant file when you create a new project from the command line by calling android create project. You could create an example project and copy the build.xml, build.properties and local.properties files from that directory.

Alternatively, you can just copy the build.xml template directly from $ANDROID_HOME/tools/lib/build.template then just change the project name.

Then just create a build.properties file — it's where you place any Ant property overrides.
Also you need a local.properties file, but don't check that into source control — this is where you specify your $ANDROID_HOME directory by setting the sdk.dir property.

The following will generate a build.xml file as well as a local.properties file if one does not exist in your project.

android update project --path <path to your project directory>

user2644878

You can use these steps below:

  • Open command line
  • Go to: <path/to/android sdk/tools>
  • Run: $ android update project --path /path/to/my-project => it will generate build.xml and local.properties
  • Create file: ant.properties with two line below

    key.store=path/to/keystore
    key.alias=alias name
    
  • Open build.xml and rename project name if need

  • Run as ant build (debug, release, etc...)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!