When I debug my Jetpack Compose app in Android Studio, it always tries to open DefaultPreview of the app.
I want to launch MainActivity, which inherits from ComponentActivity
.
If I close the app and relaunch it solely on my phone, MainActivity
is opened, but now I can't debug in Android Studio.
When I delete the @DefaultPreview
, the app won't build at all, because it failed to find this Preview.
If I keep the Preview, this is then opened on the phone and I can't use Hilt, or navigation to navigate to the screen I want to go to.