I would like to know that is it possible to have android project without Application module (app or any other name) in Android studio?
Means i can create package and res
app/
build.gradle
src
jni
AndroidManefest.xml
build.gradle
settings.gradle
It's doable and here is how I did it:
1) Import the eclipse project from Android Studio.
*if you have a android studio project already, skip this step.
2) Open build.gradle under sub dir app/ and copy the contents and append/paste it to build.gradle of the top level.
3) Move all files under app/ to top level.
*if you don't have these files in top level yet.
4) Remove settings.gradle.
* you don't need it any more since you don't have app as a submodules.
5) Added the following lines to build.gradle
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
Note:
If you have other submodules in additional to "app", you will need keep settings.gradle and remove:
include ":app"
from it and keep other submodules.
See my project layout here:
The final build gradle is a combination of two together:
Hope it helps.
David