Android获取错误但没有任何红色错误标记

时间:2011-03-21 03:46:33

标签: android

Android获取错误但在任何地方都没有出现红色错误标记。问题选项卡说明:Android打包问题。我不知道该怎么办....请帮助.......

我正在从一本名为“24小时学习Android”的书中构建一个程序。这是一个简单的游戏,名为“在那里,完成那个!”。它有7种不同的活动:

1.QuizHelpActivity:

package com.android.triviaquiz;
import android.os.Bundle;
public class QuizSplashActivity extends QuizActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.help);

2.QuizSplashActivity:

package com.android.triviaquiz;
import android.os.Bundle;
public class QuizSplashActivity extends QuizActivity {
    /** Called when the activity is first created. */
        @Override
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.splash);

3.QuizGameActivity:

package com.android.triviaquiz;
import android.os.Bundle;
public class QuizSplashActivity extends QuizActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.game);

4.QuizScoreActivity:

package com.android.triviaquiz;
import android.os.Bundle;
public class QuizSplashActivity extends QuizActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.score);

5.QuizSettingsActivity:

package com.android.triviaquiz;
import android.os.Bundle;
public class QuizSplashActivity extends QuizActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.settings);

6.QuizMenuActivity:

package com.android.triviaquiz;
import android.os.Bundle;
public class QuizSplashActivity extends QuizActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.menu);

7.他们都扩展了QuizActivity:

package com.android.triviaquiz;
   import android.app.Activity;

    public class QuizActivity extends Activity{ 
public static final String GAME_PREFERENCES="GamePrefs";

我可能做错了什么??????????

清单文件:

                                                                                          

<activity android:label="menu" android:name=".QuizMenuActivity"></activity>
<activity android:label="scores" android:name=".QuizScoresActivity"></activity>
<activity android:label="settings" android:name=".QuizSettingsActivity"></activity>
<activity android:label="game" android:name=".QuizGameActivity"></activity>
<activity android:label="help" android:name=".QuizHelpActivity"></activity>
<activity android:label="parent" android:name=".QuizActivity"></activity>
</application>


</manifest> 

2 个答案:

答案 0 :(得分:0)

您是否使用正确的软件包名称在清单文件中提到了所有这些活动?请检查相同,然后看..

答案 1 :(得分:0)

尝试清理并构建android项目。