Answer the question
In order to leave comments, you need to log in
What is the correct way to create new modules in Android Studio?
Welcome all!
There is an application, part of its functionality is placed in a separate module. Initially, a separate project was created for this module, from there I collected it into aar and then connected this same aar to the current application. All this worked, but then I thought that it would be easier for me to work with both the module and the application from the same project and decided to transfer the sources.
In the project, I clicked File->new->New module->Phone & Tablet module
Specified the name, everything was created, I transferred the class files to the folder of the newly created module and tried to add a dependency to it. implementation project(":basiccore")
When trying to synchronize, I got an error that the dependency could not be resolved. I don't see, he says, I'm your basiccore. I searched on the Internet, they advised me to clear the cache. (Invalidate Caches / Restart)
I did, when loading the project I got:
Compilation is not supported for following modules: tszhcore. Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project.
Answer the question
In order to leave comments, you need to log in
I don't really use this wizard, but, it seems, Phone & Tablet module is an application module, an application cannot depend on another application. You need a library module, choose Android Library in this step.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question