Android project does not build apk file

Hello all,

ich tried my first Android project with IntelliJ 13 EAP and set up a test project (Gradle Android Application) with almost all default settings. When I tried to deploy/launch the build in the emulator I notice that no apk file can be found in the local folder. Furthermore the output path "build/apk" is not generated. No apk file can be found in the whole build directory at all.
In the project settings there seems to be a missing setting in the "Artifacts" section, am I right?
If I add an artifact "Android application" I get an Internal Error...
Has anybody experienced the same issues or can help me?
Currently as a workaround I build my project with gradle on the command line manually.

Thanks.

13 comments

I got the same problem. I tried Android Project instead of Android Gradle Project. It worked. But which is not what I want. There is no any log about why apk is not generated.

0

I've downloaded the new version (build 1045) today. But the problem is still there.Is it a bug or I did something wrong?

There is no problem if I create an Android Application project. But got this error when I create an Android Gradle project.

0

Nobody care about this problem ? Or only I have this problem?

0

Seems very unsatisfying... we'are both the only ones with that problem.
What I noticed in addition: in the project settings of my project the Android facet views are completely empty. There is no content on the right hand side.
Perhaps this is related to the original problem.

0

That's too bad. I have to use back my Android Studio again. The reason I use Intellij Idea is because I can use it for almost everything I need, php, javascript, html,css, Android, etc. But apparently it doesn't support Android well in current version.

0

Sorry about the delay. Please report the problem to the issue tracker. The feature of creating "Android-Gradle" project was added recently and probably few people uses it.

0

Glad to hear that. At least somebody will take care of this.

0

I am also having this issue. I've tried changing a whole lot of settings. I'll post solution if I'm able to find it. Was there a ticket opened for this? (I'm also on EAP 132.1045)

0

Sadly, my only solution so far is to build in terminal first then run from Intellij. I suppose if I'm already running in the terminal I should just adb install myself, but I'm lazy.

0

Can you share how you use the terminal to install the apk? I'm new to Gradle. Thanks

0

Installing apk doesn't necessarily require gradle. See: http://developer.android.com/tools/help/adb.html for more info.

My workflow for this right now is to:

  1. run `gradle build` or even `gradle clean build`
  2. run or debug from Intellij


I don't know if there's a lifecycle command for running an apk from gradle. There is one for installing: `gradle build installDebug` or just `gradle installDebug`

Hope this helps.

0

Thanks for the reply. I suppose to run the command in terminal:

gradle build

But my gradle is not in my path. Where can I find the gradle command? Should I use gradlew instead?

(I tested with gradlew, yes it will create the apk file.)

0

Please sign in to leave a comment.