Questions tagged [android-module]

146 questions
48
votes
2 answers

(Dis-) Advantage of having multiple modules in an Android Studio Project?

Is it advantageously to have multiple modules in an Android Studio Project over having only a single large app-module? I know about Android Modules in general and the advantages of SOLID so my focus is especially considering build performance. As…
29
votes
4 answers

"Dependent features configured but no package ID was set." When creating a new module Android

I am trying to create a new module. Elements of this module should be visible to the first module.That is why I add implementation project(":messanger") to Build.gradle(:app) but it gives the following error: Dependent features configured but no…
26
votes
2 answers

Phone and tablet Module vs Android Library

I want to make a separate module so I can share it between projects. The module is going to have android components. So upon creating a new module the options are Phone & Tablet module and Android Library. I wanted to know what's the difference…
Zeyad Gasser
  • 1,516
  • 21
  • 39
20
votes
9 answers

java.lang.RuntimeException: Unable to instantiate activity in Flutter

Flutter newly created app gives error when using fire base. How should i fix this problem as it is asking flutter app main activity cannot be cast to android app activity. 04-05 21:16:07.570 27391-27391/? E/AndroidRuntime: FATAL EXCEPTION: main …
demitri kozlov
  • 247
  • 1
  • 3
  • 14
15
votes
2 answers

Hilt in non-android module clean architecture setup

I have a multi modular android app setup which consists of a Data, Domain and Presentation module. The Domain module is java-only. I know it's possible to support hilt in non-android modules by adding: Domain build.gradle implementation…
Tim
  • 669
  • 1
  • 8
  • 27
14
votes
4 answers

Android dynamic feature module, resource not found

I'm having a problem starting an activity in a downloaded feature module when it's published to the play store. It always crashes on setContentView() in the downloaded modules activity. java.lang.RuntimeException: Unable to start activity…
Mattias
  • 301
  • 3
  • 9
10
votes
2 answers

Gradle error debugCompileClasspath' to contain exactly one file, however, it contains no files, when adding a new Dynamic Feature Module

Created a new Dynamic Feature Module: dynamic, build fails with the below exception: Execution failed for task ':dynamic:processDebugManifest'. Expected configuration ':dynamic:debugCompileClasspath' to contain exactly one file, however, it…
Gauri Gadkari
  • 237
  • 4
  • 12
9
votes
3 answers

In Dynamic Feature Module can not access Resource file

I am trying to implement Dynamic delivery type App. First I create new project after that create Module for dynamic steps for this Select File > New > New Module from the menu bar and Create New Module dialog, select Dynamic Feature Module and…
8
votes
4 answers

java.lang.NoSuchMethodError: No static method 'myMethod'

I have a extension method: fun StoresClientFragment?.onClickButtonBack(){ this?.listener?.onStoresFragmentClickBtnMenu() } The app installs without any errors; but when the method is invoked at runtime it gives me the following…
7
votes
1 answer

Best way to extract and translate multiple strings.xml files from a big Android project

I have a huge Android project, composed of several modules. Ideally, I would like a fully automated way to extract all current strings.xml files, from all submodules and all resource qualifiers - to be put in a separate folder, but remaining under…
7
votes
2 answers

How to avoid duplicate dependencies in multiple module android application

I have 2 modules in my android app. Core module and one feature module. Currently I have 3 dependencies common for these 2 modules and I am adding it in both modules gradle file (Which leads to more app size and redundancy). How to share these…
V I J E S H
  • 7,464
  • 10
  • 29
  • 37
7
votes
0 answers

How to override gradle subproject config in module?

My modularized Android project makes use of subprojects in the root build.gradle in order to minimize the configuration needed in each submodule's build.gradle. For example I can use it to add our custom buildType to each module subprojects …
aaronmarino
  • 3,723
  • 1
  • 23
  • 36
7
votes
0 answers

Error after building instrumentation tests with 'com.android.test' plugin

For the last little while, I am attempting to change a multi-module Android app to use the new com.android.dynamic-feature plugin. Part of this change is moving my instrumentation tests out of the base module and have them test multiple features.…
laenger
  • 991
  • 1
  • 10
  • 20
6
votes
2 answers

Android navigation. Pop up from nested graph fragment to outer fragment

I have an app module with main navigation graph and feature module with it's own navigation graph. Feature navigation is included to main navigation graph. So feature fragments and navigation graph knows nothing about app module navigation graph. I…
6
votes
1 answer

Gradle Android "Duplicate class foo found in module bar" error

I have android module named A. I added dependency to another module B like so: implementation project(':B'). While the module A builds without an issue, when I try to build (and run) integration tests, I get Duplicate class…
Comfy Cat
  • 131
  • 11
1
2 3
9 10