1.在AndroidManifest.xml中添加属性 exported
<activity android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"/>
2.使用命令am即可启动该activity
> adb shell am start -n com.yusuzhan.xxx/.MainActivity
1.在AndroidManifest.xml中添加属性 exported
<activity android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"/>
2.使用命令am即可启动该activity
> adb shell am start -n com.yusuzhan.xxx/.MainActivity