简体   繁体   English

运行项目时出现错误(无法识别启动活动:未找到默认活动)

[英]Getting Error(Could not identify launch activity: Default Activity not found) While running project

i am getting this error while developing my app, every thing works fine suddenly this error happened while run the app and checking the changes, as i told everything works fine suddenly this happen i didn't change anything in Manifest.xml file .我在开发我的应用程序时遇到这个错误,一切正常突然这个错误发生在运行应用程序和检查更改时,因为我告诉一切正常突然发生这种情况我没有更改 Manifest.xml 文件中的任何内容 , this is the manifest file kindly help me out. ,这是清单文件,请帮助我。

this is the error i am getting这是我得到的错误

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.habitreminder">

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.READ_CALENDAR" />
    <uses-permission android:name="android.permission.WRITE_CALENDAR" />
    <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=".OnboardingPackage.OnboardingSlider"
            android:theme="@style/Theme.AppCompat.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    <activity
            android:name=".userhome.UserDashboardActivity"
            android:theme="@style/Theme.AppCompat.NoActionBar"
            android:label="@string/title_activity_user_dashboard">
        </activity>
        <activity
            android:name=".signup.UserCalenderSignupActivity"
            android:theme="@style/Theme.AppCompat.NoActionBar" />
        <activity
            android:name=".signup.UserMapSignupActivity"
            android:theme="@style/Theme.AppCompat.NoActionBar" />
        <activity
            android:name=".signup.UserDetailsSignupActivity"
            android:theme="@style/Theme.AppCompat.NoActionBar" />
        <activity
            android:name=".login.LoginActivity"
            android:theme="@style/Theme.AppCompat.NoActionBar" />
        <activity
            android:name=".LoginSignup.LoginSignupActivity"
            android:theme="@style/Theme.AppCompat.NoActionBar" />
        <activity
            android:name=".MainActivity"
            android:theme="@style/Theme.AppCompat.NoActionBar">
        </activity>
        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="AIzaSyCy-z3OoXACHh_MKBLoCPjdNo2ySD1ogU8" />
        <meta-data android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id"/>

        <activity android:name="com.facebook.FacebookActivity"
            android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:label="@string/app_name" />
        <activity
            android:name="com.facebook.CustomTabActivity"
            android:exported="true">
            <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:scheme="@string/fb_login_protocol_scheme" />
            </intent-filter>
        </activity>
        <activity android:name=".ProfileSettings.changeprofilename"
            android:theme="@style/AppThemepopup"/>
    </application>
</manifest>

Is your activity declared in َAndroidManifest like this ?你的 Activity 在 َAndroidManifest 中是这样声明的吗?

 <activity android:name=".launchactivity" android:label="@string/title_activity_login" android:windowSoftInputMode="stateHidden" /> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>

在此处输入图像描述我只是关闭 Android Studio 并删除 2 个文件夹名称缓存和 tmp 并再次启动 Android Studio 并且它工作正常。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我经常发现此特定错误:“无法识别启动活动:找不到默认活动启动活动时出错” - I often found this specific error: “Could not identify launch activity: Default Activity not found Error while Launching activity” 无法识别启动活动:找不到默认活动启动活动时出错 - Could not identify launch activity: Default Activity not found Error while Launching activity 无法识别启动活动,未找到默认活动启动活动时出错 - Could not identify launch activity , Default Activity not found Error while Launching activity 无法识别启动活动:未找到默认活动 - Could not identify launch Activity: Default Activity not found 无法识别启动活动:未找到默认活动 - Could not identify launch Activity: Default Activity wasn't found 自定义键盘-无法识别启动活动:找不到默认活动 - Custom Keyboard - Could not identify launch activity: Default Activity not found Android Automotive:无法识别启动活动:未找到默认活动 - Android Automotive: Could not identify launch activity: Default Activity not found 无法识别启动活动:升级到 Android Studio 4.0 后未找到默认活动 - Could not identify launch activity: Default Activity not found after upgrading to Android Studio 4.0 在构建Kotlin项目时,Android Studio报告“无法识别启动活动:找不到默认活动” - Android Studio reports “Could not identify launch activity: Default Activity not found” when building Kotlin projects “无法识别启动活动:未找到默认活动” - Android Studio - 没有答案工作 - "Could not identify launch activity: Default Activity not found" - Android Studio - no answers working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM