25

I've opened my Android project. But before run it, I have to Edit Configuration and choose the module. But anyone module appears in the Edit Configuration window. It is a project using Gradle.

EDIT:

When I open the Edit Configuration window, in the bottom it is showed the following message: "Error: Module not specified"

What I have to do?

3 Answers 3

34

I got the same problem after renaming the project. In the Edit Configuration window, there should be the option Use classpath of module. After I set the right module, it worked. enter image description here

Sign up to request clarification or add additional context in comments.

4 Comments

Thank you. The most confusing thing about this error is that when trying to run the configuration, IDEA opens the property sheet and places the focus on the VM options text box. So I get an error message I don't understand and are left with an empty text box I have no idea how to fill in. In hindsight I guess you need to either select a module or specify a classpath, but IDEA doesn't tell you that :|
@mtyurt answer finally accepted (better late than never). The funny thing here is: I've encountered the same problem today, this time I was editing a configuration for JUnit. Then had a similar problem, but the error message was a little bit different: (Error: Module to choose classpath from is not specified), then I googled and found this question. When I saw the answer, I realized it was asked by me. haha Thanks for your answer. Sorry for the later acceptance.
this option is note shown. Even this tab is not visible. I have "General" Tab.
how do you know what module to use exactly?
5

I had a bad module, so I removed the old module and imported a new module from my project folder. (it doesn't delete any files) File > Project Structure > Modules > Add > Import Module > Location of your project

Comments

1

I have same problem,

But when i download gradle and set GRADLE_HOME in environment, it successful,

You should try this instead.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.