<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ac.tec.oop.ahorcado.android"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7"
android:targetSdkVersion="16"/>
<application android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity android:label="@string/app_name"
android:name="ac.tec.oop.ahorcado.android.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
这些行给了我“无法解决符号错误”,即使它们需要被引用的包清楚地写出来。我试图解决这个问题几个小时,但我不知道还能做什么。我正在使用Android Studio,这给我带来了很多问题。
android:icon="@drawable/ic_launcher
android:label="@string/app_name"
android:theme="@style/AppTheme">
android:name="ac.tec.oop.ahorcado.android.MainActivity">
答案 0 :(得分:106)
转到文件&gt;使高速缓存/重新启动无效并使其无效并重新启动。
这清除了我的错误。
答案 1 :(得分:1)
您的清单代码没有问题,这样可以正常使用
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ac.tec.oop.ahorcado.android"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7"
android:targetSdkVersion="16"/>
<application android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity android:label="@string/app_name"
android:name="ac.tec.oop.ahorcado.android.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
Eclipse有时会显示意外行为,您可以将代码剪切并再次粘贴到Manifest或只需重新启动它将重新编译并删除错误
答案 2 :(得分:0)
尝试在清单
中的应用程序标记中将debuggable添加到true<application android:allowBackup="true"
android:debuggable="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
我希望它对你有用。
答案 3 :(得分:0)
我尝试了所有提到的答案,但上面没有为我工作
对我有用的唯一解决方案是
转到Gradle(App)&gt;在存储库{}&gt;确保mavenCentral()位于顶部&gt;现在删除compile 'which you recently added
&gt;同步&gt;现在再次添加compile "again add the dependencies"
&gt;并最终再次同步
这对我有用