Java 您是否在AndroidManifest.xml中声明了此活动?登陆界面
即使我的活动作为启动器存在于android清单文件中,我还是会不断收到这个错误 找不到显式活动类{com.alpha.hifivepro/com.alpha.hifivepro.activities.LoginActivity};您是否在AndroidManifest.xml中声明了此活动 我在这三个地方发现了错误。当用户单击注销按钮时,他们应该转到loginactivity,但我一直收到上面的错误。需要帮忙吗Java 您是否在AndroidManifest.xml中声明了此活动?登陆界面,java,android,Java,Android,即使我的活动作为启动器存在于android清单文件中,我还是会不断收到这个错误 找不到显式活动类{com.alpha.hifivepro/com.alpha.hifivepro.activities.LoginActivity};您是否在AndroidManifest.xml中声明了此活动 我在这三个地方发现了错误。当用户单击注销按钮时,他们应该转到loginactivity,但我一直收到上面的错误。需要帮忙吗 private void handleLogout() {
private void handleLogout() {
mAuth.signOut();
SendUserToLoginActivity();
}
private void SendUserToLoginActivity() {
Intent loginIntent = new Intent(MainActivity.this, LoginActivity.class);
loginIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(loginIntent);
}
AndroidManifest.xml
<application
android:name=".utils.MyApp"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="false"
android:theme="@style/AppTheme"
tools:replace="android:supportsRtl,android:allowBackup">
<activity android:name=".activities.authentication.RegisterActivity"></activity>
<!--
The API key for Google Maps-based APIs is defined as a string resource.
(See the file "res/values/google_maps_api.xml").
Note that the API key is linked to the encryption key used to sign the APK.
You need a different API key for each encryption key, including the release key that is used to
sign the APK for publishing.
You can define the keys for the debug and release targets in src/debug/ and src/release/.
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
<activity
android:name=".activities.PickPlaceMapsActivity"
android:label="@string/title_activity_pick_place_maps" />
<activity
android:name=".activities.authentication.LoginActivity"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
您的清单有.activities.authentication.LoginActivity
,但错误显示为.activities.LoginActivity
。您需要更正您的清单以使用相同的包名,或者将LoginActivity
移动到authentication
包。您的清单具有.activities.authentication.LoginActivity
,但错误显示为.activities.LoginActivity
。您需要更正清单以使用相同的包名,或者将LoginActivity
移动到authentication
包。问题是我有另一个LoginActivity文件问题是我有另一个LoginActivity文件