当我在模拟器上运行我的应用程序时,它将主要活动显示为原始应用程序名称intead

时间:2015-12-22 19:46:56

标签: android

package com.example.sunshine;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.content.Intent;
import android.view.View;

public class MainActivity extends Activity
{
     @Override
     public void onCreate(Bundle savedInstanceState)
     {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
     }

     @Override
     public boolean onCreateOptionsMenu(Menu menu)
     {
        getMenuInflater().inflate(R.menu.main,menu);
        return true;
     }

     // Method to start the service
     public void startService(View view)
     {
        startService(new Intent(getBaseContext(), MyService.class));
     }

     // Method to stop the service
     public void stopService(View view)
     {
        stopService(new Intent(getBaseContext(), MyService.class));
     }
}

1 个答案:

答案 0 :(得分:0)

我没有看到此代码有任何问题。它可能在另一个地方

转到$("#step-2").hide(); $("#step-3").hide(); $("#step-1").show(); ,您应该看到

AndroidManifest.xml

检查清单文件中是否存在此字段以及它已存在的值。