android - 找不到Android Studio 4.0.1默认 Activity

标签 android android-studio gradle android-activity android-manifest

我正在使用android studio 4.0.1面临以下问题
enter image description here
enter image description here
尝试过的文件-> 使缓存无效/重新启动一次可以使用。当我尝试再次运行它时,它只能在重新启动时才能首次运行,但它再次显示未找到错误默认 Activity 。
还尝试了编辑配置 ...设置指定的 Activity 很奇怪,发现它说 list 中找不到 Activity
enter image description here
这是 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/

相关文章:

java - Android Push Notification 从设备到其他设备

安卓三星 : Camera app won't return intent. getData()

android-studio - android studio logcat 删除日期、进程信息

gradle - Jenkins jacoco插件-Java8仪表板报告已消失

java - IntelliJ IDEA 无法终止我的 Dropwizard 服务器

android - React-Native/metadata.xml 给我一个 403 禁止

android - 将数据从类传递到 MainActivity

java - Android:当我的应用程序处于后台时,如何检测自拍杆按钮点击

java - 在当前主题中找不到样式 'floatingActionButtonStyle'

android - Gradle:项目的多个变体 :myLib 匹配消费者属性