Questions tagged [android-module]
146 questions
6
votes
1 answer
How to use the GlideApp generated api in the library module?
Building library module. And in the sample application which is using the library module it has
@GlideModule
class DPAppGlideModule : AppGlideModule() {
override fun isManifestParsingEnabled(): Boolean {
return false
}
}
and in the…

lannyf
- 9,865
- 12
- 70
- 152
5
votes
3 answers
java.lang.NoSuchMethodError: No static method for Jetpack Composable
I'm creating an Android Library for basic dialogs. Right now, all I have is a basic-dialogs module along with the app module. I'm calling a composable in the basic-dialogs module from the Activity in the app module, and I keep getting the exception…

Raj Narayanan
- 2,443
- 4
- 24
- 43
5
votes
0 answers
Android sendBroadcast to other module
I have a main application module "app1" and a second module "app2" that starts as "process:SecondActivity". I need to send a message from SecondActivity using a broadcast receiver, but the message does not come in onRecive. Broadcast receiver is in…

idFlorida
- 51
- 1
5
votes
1 answer
Unable to build : How to add Android Build Config for new Module
Now i am converting my android code to modularized architectural approach. Facing issues when trying add a dependency on "app" module from "chat" module.
I have the following build config for the "app" module.
android {
lintOptions {
…

androidbash
- 390
- 1
- 4
- 21
5
votes
1 answer
Multi module project: how to setup Dagger to provide interface but hide implementation-specific dependencies?
In my application, I have two modules: app and repository.
repository depends on Room, and has a GoalRepository interface:
interface GoalRepository
and a GoalRepositoryImpl class that is internal, as I don't want to expose it or the Room…

gpunto
- 2,573
- 1
- 14
- 17
5
votes
0 answers
Transitive gradle depencies not resolved from aar
I have made a custom module and included tensorflow-lite dependency in it with 'api' configuration. I build its aar. Now I create a new project and put the aar in libs folder. But I can access only the classes I created and not the tensorflow api.…

Death14Stroke
- 101
- 1
- 6
5
votes
1 answer
How do I share dependencies that use annotationProcessor between Android modules?
I have an Android application module (A) and an Android library module (B). Both (A) and (B) contain these same dependencies:
dependencies {
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor…

Abdulmalek Dery
- 996
- 2
- 15
- 39
5
votes
2 answers
Android difference between Module vs Flavor
what are the main differences between android modules and flavors?
From module definition https://developer.android.com/studio/projects/add-app-module.html
Modules provide a container for your app's source code, resource files, and app level…

Tomáš Havlíček
- 67
- 7
5
votes
3 answers
Cannot call method from another Module : Android studio
I have two modules in android studio
Standard android app module
domain module
The domain module in been added to both settings.gradle and build.gradle
include ':mobile', ':domain' &
compile project(':domain') respectively like this
Inside…

erluxman
- 18,155
- 20
- 92
- 126
4
votes
0 answers
implementation project ':app' in 'libModule' not working
I need to create module in Android Studio which will contain dependency on the main project. I create new project and module, add implementation to library gradle like next:
implementation project(':app')
but when I try to sync gradle, I got next…

Andriy Antonov
- 1,360
- 2
- 15
- 29
4
votes
3 answers
Android data binding class is not generated in my new module
I added a module to my project and now I want to put there some fragments.
In my fragment I initialize data binding like this
class MyTestFragment : Fragment() {
private lateinit var binding:
MyTestFragmentNewBinding
override fun…

Vitalii
- 10,091
- 18
- 83
- 151
4
votes
5 answers
Can't programmatically get resource from another module
I have an android project with several gradle modules. Dependencies beetween modules look like this:
app <-- coremodule <-- featuremodule
There are a resources in coremodule (strings and colors).
When I use them in layout from featuremodule…

Mikhail Sidorov
- 699
- 2
- 9
- 18
4
votes
1 answer
How to add a View to an app from another app
My app is called MyNiceApp. MyNiceApp is mostly just a core that loads a view called coreView in the MainActivity onCreate. coreView gets populated by views from other plugins which the user downloads as wishes. I define the various areas on the…

Program-Me-Rev
- 6,184
- 18
- 58
- 142
4
votes
1 answer
How to convert android module to java module in android studio
I have created three modules for my android app namely app, domain, and data.
By mistake, I have created domain and data modules as android module instead of Java module. Now I want to replace them to Java modules.
Can anyone suggest how I can…

anshul
- 982
- 1
- 11
- 33
3
votes
0 answers
Run Espresso/Cucumber UI testing for modular project in Android
I wrote a UI test scenario by Cucumber and Espresso for a modular Android project.
This project has a module that depends on the Base module.
When I run the test I got an error in the xml layout, because this module apparently doesn't have access to…

MeNoVa
- 69
- 2
- 7