그래서 내 응용 프로그램 일부 텍스트를 보여주는 첫 번째 활동으로 구성되어 있으며 작업 표시 줄에는 내 위치 옵션을 넣을 수있는 파일 메뉴가 있습니다. 다음 매니페스트안드로이드 두 번째 활동 오류
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_photo:
openPhoto();
return true;
case R.id.action_video:
openVideo();
return true;
case R.id.action_map:
Intent intent = new Intent(this, GPSTracker.class);
startActivity(intent);
return true;
default:
return super.onOptionsItemSelected(item);
}
제가 제 활성을 선언 : 다음
난 onOptionItemSelected와 mainActivity 다른 활동을 호출
<activity
android:name="com.example.locateme.GPSTracker"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
및 GPSTracker.java으로 이런 물품 :
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gpstracker);
}
위치를 찾는 코드가 있습니다. My Location
옵션을 눌러 앱이 다운 될 때 앱을 실행 중입니다.
Here are the logcat errors after removing intent for GPS activity
full code of the app is here, 경우에 내가 놓친 무언가가있을 수 있습니다. 두 번째 활동을 잘못된 방식으로 호출합니까?
logcat 오류 –
게시 질문에 logcat을 추가했습니다. 고맙습니다. –
그 페이지가로드되지 않습니다. lagcat –