1

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.

geesebump
  • 31
  • 4

1 Answers1

1

I was able to fix this by removing Compose Preview from Run Configuration

Select Edit Configurations from the configurations dialog

Press - button to Remove selected configuration

Correct list of configurations

geesebump
  • 31
  • 4