Reputation: 783
I build and run my project by clicking the green arrow on android studio, my app should be launched automatically but it just installed then nothing happened.
I've tried reinstall android studio and create a new project but it still not fixed.
This is my Run/Debug configuration (Just the default setting).
This is the android manifest
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
I found the error message as below, why it disconnects?
04/20 16:37:14: Launching app
$ adb install-multiple -r -t [my project path]\app\build\intermediates\split-apk\debug\slices\slice_2.apk [my project path]\app\build\intermediates\split-apk\debug\slices\slice_8.apk [my project path]\app\build\intermediates\split-apk\debug\slices\slice_7.apk [my project path]\app\build\intermediates\resources\instant-run\debug\resources-debug.apk [my project path]\app\build\intermediates\split-apk\debug\slices\slice_9.apk [my project path]\app\build\intermediates\split-apk\debug\slices\slice_5.apk [my project path]\app\build\intermediates\split-apk\debug\dep\dependencies.apk [my project path]\app\build\intermediates\split-apk\debug\slices\slice_6.apk [my project path]\app\build\intermediates\split-apk\debug\slices\slice_0.apk [my project path]\app\build\intermediates\split-apk\debug\slices\slice_1.apk [my project path]\app\build\intermediates\split-apk\debug\slices\slice_4.apk [my project path]\app\build\intermediates\split-apk\debug\slices\slice_3.apk [my project path]\app\build\intermediates\instant-run-apk\debug\app-debug.apk
Device emulator-5556disconnected, monitoring stopped.
Split APKs installed in 1 s 572 ms
Upvotes: 6
Views: 4708
Reputation: 626
Lunch options > Launch > select as default Activity
Happy coding !!!
Upvotes: 6
Reputation: 783
It caused by chrome extension - VideoStream, it using the same port 5556 as adb. Just terminate or uninstall it then work fine.
ref.
https://stackoverflow.com/a/54660175/4557420
https://stackoverflow.com/a/54731956/4557420
Upvotes: 1