Skip to content Skip to sidebar Skip to footer

Android Studio 0.5.3 - Why Doesn't "make Project" Run Build Any More?

'Make Project' in Android Studio doesn't build an apk file for me since I upgraded to 0.5.3. Does anyone know how I can make it do so? I have updated buildToolsVersion to 19.0.3, w

Solution 1:

You need to now run an assemble gradle task to make the apk. Here is a post on Google+ in "Android Developer Tools" community on the subject (By Alex Ruiz).

"Build > Make" behavior changes. In the next version of Android Studio (0.5.3,) we have changed the behavior of the "Build > "Make" menus. Instead of invoking "assemble" Gradle tasks, now they only compile Java code (generating R.java if necessary,) similar to Eclipse ADT's behavior. This change will speed up development workflows (pre-dex, dex, packaging, etc. will be executed only when running/debugging an app or when exporting an APK.) As a side effect the menu "Build > Compile" has been removed, since it is now redundant.

Solution 2:

The "Make" button in Android Studio now runs the gradle android plugin task "compileDebugJava". In order to build the APK file, it needs to run the task "assembleDebug". I'm not sure what the rationale was for changing the behaviour of the button, or how to change it back. The only easy way (i.e. not using the command line) to get the assembleDebug task to run is to have a run configuration which runs a "Gradle-aware Make" before launch. The "gradle-aware Make" is simply the assembleDebug task.

I preferred the old behaviour, but of course, Google knows best.

Edit: I know nobody cares, but I worked around this by adding gradlew to Android Studio as an external tool, with the command line option "assembleDebug" and then adding a custom button to the toolbar to run this external tool. I now use this button instead of the Make Project button as it does what I would like to do (build an APK).

Solution 3:

Here is a simple way to build the APK file:

  1. Open the Gradle Tool window. To find that window, use Help->Find Action, type "Gradle" and select "Gradle" in the "Tool Windows" category;
  2. Double-click "assembleDebug" to build the APK. Or better: right-click "assembleDebug" and choose "Create...", so that this task will be saved for future usage in the configurations menu that appear on the main toolbar.

Post a Comment for "Android Studio 0.5.3 - Why Doesn't "make Project" Run Build Any More?"