我正在使用android studio 4.0.1面临以下问题
尝试过的文件-> 使缓存无效/重新启动一次可以使用。当我尝试再次运行它时,它只能在重新启动时才能首次运行,但它再次显示未找到错误默认 Activity 。
还尝试了编辑配置 ...设置指定的 Activity 很奇怪,发现它说 list 中找不到 Activity
这是 list 中的代码
<activity
android:name=".config.SplashActivity"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Splash">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="domain.com"
android:pathPrefix="/"
android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- Branch App Links (optional) -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="domain.app.link"
android:scheme="https" />
<data
android:host="domain.app.link"
android:scheme="https" />
</intent-filter>
</activity>
更新:还尝试了File->与Gradle文件同步项目不起作用。它仅在启动或重新启动android studio进行第二次运行时才起作用,此问题发生
更新:尝试将android studio更新到新版本4.0.2仍然面临相同的问题
最佳答案
尝试将<category android:name="android.intent.category.DEFAULT"/>
添加到第一个<intent-filter>
标签
关于android - 找不到Android Studio 4.0.1默认 Activity ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64134301/