Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TeamCity doesn't generate apk when building an Idea Android project

What I have: An IntelliJ Idea Android project stored on a Git server; TeamCity is configured to have an "IntelliJ Idea project" as a Runner type. The project itself is stored on Git with all project-related iml's and xml's: you can just download it, open and press "run", the project gets compiled, an .apk gets placed in the out/production folder.

What I want: TeamCity to generate an .apk in addition to .class files and place it in the out/production folder

The question: how do I achieve that? Is there a specific setting telling TeamCity that this is an Android project, apart from Idea's project configs?

P.S. Android SDK, dependencies, JDK are all configured correctly, as the project gets compiled successfully. The only issue is that the .apk doesn't get generated.

like image 531
Alex Timonin Avatar asked Dec 26 '22 11:12

Alex Timonin


1 Answers

In case anyone faces the same problem: You have to explicitly declare an artifact (Project Settings -> Artifacts) of an "Android Application" type, and then list its name in TeamCity's Build Step Config.

like image 73
Alex Timonin Avatar answered Dec 31 '22 12:12

Alex Timonin