活动"androidstutio"的重复注册; [英] duplicate registration for activity "androidstutio"
本文介绍了活动"androidstutio"的重复注册;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.testlocalserver">
<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=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".confirmActivity" />
<activity
android:name=".confirmActivity"
android:label="@string/title_activity_confrim"
android:theme="@style/AppTheme.NoActionBar"></activity>
</application>
以下是错误:
error:at android:name=".confirmActivity"
duplicate registration for activity
android.testlocalservice.confirmactivity
我不知道为什么会这样,我读了一些答案并说选择模式!我该如何设置活动方式,为什么?
I don't why this is happenning and i read some answers and says select the mode !! how can i set the mode of activity ,why ?
推荐答案
正如错误所言,您有两个名称相同的活动.
删除其中之一:
As the error says, you have two activities with the same name.
Remove one of them:
<activity android:name=".confirmActivity" />
<activity
android:name=".confirmActivity"
android:label="@string/title_activity_confrim"
android:theme="@style/AppTheme.NoActionBar"></activity>
这篇关于活动"androidstutio"的重复注册;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文