Reputation: 211
I have just installed Android Studio and when I'm trying to build I get this message:
error running build
target module is undefined
Upvotes: 2
Views: 9269
Reputation: 1264
In Android Studio
Edit Configuration section look for Android Application
. Then in the module select your app name. By default if project is imported this will be DEFAULT
. Change this with your app name rebuild the app with gradle build
and everything else will be good to go. Hope this helps.
Upvotes: 1
Reputation: 1
Try to run the gradlew.bat file. This file will try to build your project. When the execution fail will prompt you the version of building tools your sdk miss. Install this version and your project will build.
gradlew.bat calls the environmental variable ANDROID_HOME which has to have as value the path of the android sdk, See from more information, Android Studio Path (ANDROID-HOME) not able to set?
Upvotes: 0
Reputation: 51
Today I had the same problem, these steps worked for me:
My project has been loaded correctly now, maybe it will also work for others, weird problem ;-)
Upvotes: 2
Reputation: 584
That worked for me
Upvotes: 2