I have two different `Application` classes, one for `main` and one for `debug` sourceSet. However, h...
k
I have two different
Application
classes, one for
main
and one for
debug
sourceSet. However, hilt complains during compilation that I cannot have multiple app roots:
Cannot process multiple app roots in the same compilation unit
. How can I solve this issue? I use a simple manifest to replace the class used:
Copy code
<manifest xmlns:android="<http://schemas.android.com/apk/res/android>"
    xmlns:tools="<http://schemas.android.com/tools>">

    <application
        tools:replace="android:name"
        android:name=".DebugApplication"/>

</manifest>
h
You should have only one Application entry point, your sourceSets can be approached in a different way, not like this.
m
To differentiate between
debug
and
release
builds, you need to place your
Application
class within the respective
debug
and
release
source sets. When you move a class to a different source set, such as
debug
or
release
, it should no longer remain in the
main
source set.
1