I previously had a working android project when I was using IntelliJ IDEA 14. I could run the project by pressing the play button, and it would install and start the application on my device.
I recently updated to 14.1. The code still appears to compile fine, I can see that it generates an APK and I can view it in the output folder (out/production/myapp/myapp.apk), but now I get an error when I attempt to run the project:
Error:No main class for module: app
I've tried creating two new projects, one based on the Android->Application Module template and another based on the Android->Gradle: Application Module template, and both have the same issue - they spit out the error above with the default configuration.
I assume that this must work on other users boxes, particularly because I haven't found anything online or any bug reports about it, but I guess there is a very minute possibility that I'm the first one to find this.
Is this an issue with IntelliJ IDEA 14.1 or just my box? Any ideas on how to fix it or where to start would be greatly appreciated.
-
If you created it new with "Android->Gradle: Application Module" then it should work out of the box using the same gradle based setup that Android Studio uses. Be sure you are creating it cleanly. Check the run configuration (Run->Edit Configurations) and make sure the project is setup to be an Android project rather than just an "Application" as the latter will require a main class.Larry Schiefer– Larry Schiefer2015年04月07日 02:05:55 +00:00Commented Apr 7, 2015 at 2:05
-
Yeah, I've tried letting IntelliJ create an empty Gradle project and it still generated the same error. It looks like this may be a broader issue, as I'm also developing a Play Framework application in Scala and just ran into the same error. I'm fairly certain it's something specific to my setup, but I haven't been able to track down the issue yet.user949286– user9492862015年04月07日 06:20:39 +00:00Commented Apr 7, 2015 at 6:20
-
1Do you have haxe plugin installed? Try to uninstall and try after that.VendettaDroid– VendettaDroid2015年04月08日 01:15:46 +00:00Commented Apr 8, 2015 at 1:15
-
@VendettaDroid - Wow, that was it! I uninstalled the Haxe plugin and now it starts right up. Strange that it just started happening recently, I've had it installed for a while. Can you post your comment as an answer so I can mark it resolved?user949286– user9492862015年04月08日 04:15:41 +00:00Commented Apr 8, 2015 at 4:15
-
Sure, added as an answer. Glad that helped out, i was having similar issue.VendettaDroid– VendettaDroid2015年04月09日 18:18:50 +00:00Commented Apr 9, 2015 at 18:18
1 Answer 1
I was having similar issue.
Do you have haxe plugin installed? Try to uninstall and try after that and it should work.
2 Comments
Explore related questions
See similar questions with these tags.