34 questions
0
votes
1
answer
46
views
Problem dagger with module and component in different libraries
I want to understand how it works.
I have application with three libraries:
:main
:module1
:module2
:di_api
Library :main:
build.gradle.kts:
dependencies {
implementationProjects(
":...
0
votes
1
answer
70
views
How to correctly handle http error code in multi-module compose app?
i'm building a multi-module jetpack-compose login/signup app. My backend is handled using Spring boot and the login/signup function returns a ResponseEntity.
The task: in my frontend i want to display ...
2
votes
2
answers
388
views
Navigation in multi-module Compose project
I have a multi-module compose project where I am still trying to define how the navigation should be done. As far as I know, the following key concepts need to be taken into account (correct me if I ...
0
votes
0
answers
27
views
How to store access token in memory, variable or SavedStateHandle?
Problem with storing Access token in SavedStateHandle is that we are coupling presentation layer with the data layer, as what management of access token is task of data layer.
I haven't found much ...
1
vote
1
answer
168
views
Separate module for activity, broadcast receiver and services?
I am completely new to multi-modular architecture. I am using jetpack compose. Asking flaws in my thinking.
Broadcast receiver and services don't contain ui logic, similar to activity. e can directly ...
2
votes
1
answer
928
views
Apply gradle to Kotlin dsl, but android blocks are not recognized
I'm working on converting an existing project to a multi-module structure and setting up the Gradle configuration. In the process, I've moved the plugins' IDs(excluding the application), the Android ...
0
votes
1
answer
123
views
Android project with Multiple Modules with ProductFlavours in 2 modules
I my project i have multiple modules, like ModuleA, ModuleB, ModuleC, ModuleD, ModuleE, ModuleF
I have different Flavours in ModuleA like( sit, prod, prepord),
same in moduleB have different flavors ...
1
vote
1
answer
357
views
Navigate to any module from any module in 6 module multi module android project
I have 6 modules each module is kind of different app but i make 5 module as a library module and 6th module as the application module to launch activity and other
all module work on one activity and ...
2
votes
1
answer
1k
views
Now in Android Application Structure (kts) need to add Parcelable plugin to some modules and features
I'm using the "Now in Android" multi module application as my "learn by example" base however I've hit another snag from a requirement to my data classes to support Parceable.
As ...
1
vote
0
answers
56
views
How to sequentially start activities across different Android modules in Kotlin?
I have an Android project with two modules, let's call them Module A and Module B. In Module A, I have two activities, A and B. In Module B, I have an activity named X. I'm trying to achieve a ...
11
votes
2
answers
2k
views
Android multi-module architecture: domain depends on data or vice versa
Some Android multi-module architecture examples show that domain layer depends on data. Others are vice versa.
Android Developers site says:
The domain layer is an optional layer that sits between ...
8
votes
1
answer
19k
views
Android App module's build.gradle.kts Unresolved reference error when importing a Kotlin class from an included (composite) module
In the #NowInAndroid sample app a Kotlin file NiaBuildType from an included module is being imported in the app modules build.gradle.kts file.
###build.gradle.kts (:app)
import com.google.samples....
2
votes
0
answers
722
views
Android, Gradle, Kotlin-dsl, multi-module, centralize android blocks for application and library, as well as dependencies?
Gradle - 8.2.1, AGP - 8.0.2, Kotlin - 1.9.0
buildSrc/build.gradle.kts
plugins {
`kotlin-dsl`
}
dependencies {
implementation("com.android.tools.build:gradle-api:8.0.2")
}
gradle/...
1
vote
0
answers
563
views
How to navigate to login module from feature module in multi module compose project
I'm working on a multi module compose project where I'm having difficulty navigating from one module to another the module dependancy is follows as bellow:
common module (common ui component for ...
-2
votes
1
answer
783
views
Hilt Multi-module Cannot create an instance of class ViewModel
I'm trying out a new architecture with multi-module and DI though Hilt, I have the following modules:
app: Contains MainActivity (which does nothing except holding fragment)
featureHome: Contains ...
4
votes
2
answers
917
views
Android - how to migrate from LintOptions to Lint in a plugin of a multi-module app
I have a multi-module app which uses a plugin to handle common settings for modules. One of the things I configure are some lint options. So far this was my implementation:
class MyPlugin : Plugin<...
0
votes
1
answer
266
views
How to use "GoogleSignInApi" in Android Clean Architecture?
How to handle "Google Sign in" using android CLEAN architecture? As we know that we should avoid android code in presentation layer.
i have tried to start an "Activity" where i ...
0
votes
1
answer
454
views
Android Hilt multi-module, do I need to add plugin to each module or only app
This is not clearly explained in official documentation.
Do I need to add the hilt plugin to each module of my app or only to the main module (:app)?
3
votes
1
answer
2k
views
Android Macrobenchmark module doesn't recognise 'com.android.test' plugin
I'm trying to put the MacroBenchmark library in my project, but I'm getting an error to apply com.android.test the plugin. This error happens while syncing Gradle.
I've added the plugin root gradle ...
1
vote
0
answers
887
views
Android Multi Module and Hilt Issue
We have an multi module Android project which has following modules:
Common module
Library module A
Library module B
The Common module needs some dependencies of Type A and Type B for its features. ...
1
vote
0
answers
64
views
How to generate a module with empty res files
Whenever I'm creating a new module I find myself annoyed that it does not come with a generated res directory for colors, strings etc. It is quite annoying that I have to create it within every ...
2
votes
1
answer
4k
views
Unresolved reference BuildConfig.field
I'm working on a multi-module project. In a module called network I'm providing the instance of Retrofit through Hilt dependency injection and works fine, I can compile the app, and run unit and ...
1
vote
1
answer
2k
views
New Module will not use Version catalog information - Android studio Gradle Dependency management
Hi I'm using gradle catalog feature (libs.versions.toml) . this is OK , but when I want to use multiple module in my android project I have an error in build.gradle .
My config :
libs.version.toml
[...
3
votes
1
answer
525
views
Android R.string ids mix in multi-module tests
My app is implemented as a multi-module project (with dynamics module), where there is a shared module with espresso tests. These espresso tests give me different outcomes depending if I run them from ...
1
vote
1
answer
2k
views
Android Room with Dagger 2 in a multi-module
Is there a way or approach to provide a Room DB instance from a module/library which can be consume on any project (app module)?
The problem I am facing is the abstract class that extends RoomDatabase(...
0
votes
1
answer
226
views
Firebase Services as library module
Is there a way to use Firebase services in a library/module? I am planning of creating a module for Firebase only, I know that Firebase services need FirebaseApp instance to identify the app client ...
2
votes
0
answers
2k
views
Hilt dependency injection in multi-module project
I have two modules in my android app, app and data. data module contains retrofit dependency and app module depends on data module.
app/build.gradle:
implementation project(':data')
implementation &...
-5
votes
1
answer
668
views
Android multi module project
I'm trying to setup a multi-module project with bottom navigation fragments and hilt.
Is there any github project I can use to start my project faster?
1
vote
0
answers
76
views
Android Two-way binding and @InverseBindingAdapter doesn't work in Modular Architecture project
Having Modular Architecture project. Reusable custom views are being moved to core-ui module. Features (fragments, sheets, etc) at the moment are still in app module.
Before migrating custom views ...
4
votes
0
answers
464
views
How to make a data class Parcelable in a Kotlin library in multi-module Android project?
I am trying to break my android app into smaller gradle modules (for now data and model modules). I want to keep my model module as a Kotlin library because it will only contains data classes. But ...
0
votes
1
answer
501
views
can I use coroutine in a multi module multi language( kotlin and java ) project app?
lets say there is an android project with module a, b and c all written in java. then I add another module, module d in the project. can I still use coroutine internally in module d?
I know I cannot ...
4
votes
0
answers
742
views
Dagger Multi Module -- ViewModelProvider.Factory cannot be provided without an @Provides-annotated method
I am working on applying the multi module structure with dagger to my project.
I am getting error while working on ViewModelFactory. What I actually want to do for the ViewModelFactory is this:
I want ...
1
vote
0
answers
388
views
Android Studio: Submodules in Project Structure Hierarchy
I am building a multi-module app, and I have included the modules in the project-level settngs.gradle file, in this manner:
include(":sub_module_1")
project(":sub_module_1")....
0
votes
0
answers
1k
views
Gradle: How to get actual module name with grouped modules
I am using a multi-modular architecture for my android app with module grouping i.e. I group my modules under a directory to make it more organised.
The structure is similar to this-
MyApplication
├───...