报错:
运行 app 时出错: 找不到 app 的运行程序
解决
第一种情况:
如果第一次还可以运行安装app,第二次不行了,可以重启android stdio.
第二种情况
如果一开始就无法运行app,有可能没有默认启动的Activity,需要在AndroidManifest.xml增加入口的Activity设置。
例子如下:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.xxx">
<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/Theme.AAudioDemo">
+ <activity
+ android:name=".MainActivity"
+ android:exported="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
</application>
</manifest>