【发布时间】:2013-06-19 17:11:13
【问题描述】:
我的应用程序开发遇到问题,我无法继续,因为 R.java 没有生成。 我尝试了所有我能找到的关于 Stack Overflow 的建议,但找不到任何有效的方法。该问题不仅出现在 Eclipse 中,还出现在 Android Studio 中。我检查了我所有的 xml 文件,但找不到应该停止生成 R.java 的东西。 这是我的 Manifest.xml 的内容:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.thenewprogramming.android.timetoswim"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name="com.thenewprogramming.android.timetoswim.HomeActivity"
android:label="@string/app_name"
android:screenOrientation="sensorPortrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.thenewprogramming.android.timetoswim.AddMatchActivity"
android:label="@string/AddMatchActivity_ActivityTitle"
android:screenOrientation="sensor" >
<intent-filter >
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity
android:name="com.thenewprogramming.android.timetoswim.SettingsActivity"
android:label="@string/SettingsActivity_ActivityTitle"
android:screenOrientation="sensorPortrait">
<intent-filter >
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
</manifest>
我尝试清除所有其他 xml,但没有奏效,所以我将它们放回原处。
非常感谢所有帮助。
编辑: 其他人立即告诉我,字符串必须以小写字母开头,所以我这样做了,它奏效了!不幸的是,他删除了帖子,但我会将问题标记为已回答(如果我知道该怎么做...)。
【问题讨论】:
-
eclipse的输出控制台不是有错误吗?
-
Eclipse 是否在您的任何 XML 文件中给出任何错误?
-
@ReijerTheCoder 你能把编辑写成答案,并把它标记为接受吗?
标签: java android eclipse android-studio