2014-05-17 5 views
-3

가 여기에 내가 전화를 어디를 참조하여 오류 발생을 사용하는 동안 만약 startActivity (의도) :ActivityNotFoundException 만약 startActivity (의도)

여기
`05-17 01:40:37.918: E/AndroidRuntime(12997):android.content.ActivityNotFoundException: 
Unable to find explicit activity class {/com.rhombi.Menu}; have you declared 
this activity in your AndroidManifest.xml? 

의 나는 com.rhombi.Intro에서 startActivity를 (의도)를 사용하는 방법 :

startActivity(iMenu); 

다음
public Intent iMenu = new Intent(this, Menu.class); 

내가 declar 방법은 다음과 같습니다 여기

내가 같은 클래스에서, 이전의 선언 방법 내 매니페스트에 모두 E : 나는 이것에 대해 다른 질문의 톤을 통해 검색 한 나는 문제가 무엇인지 알아낼 수 없습니다

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
package="com.rhombi" 
android:versionCode="1" 
android:versionName="1.0" > 

<uses-sdk 
    android:minSdkVersion="8" 
    android:targetSdkVersion="18" /> 

<application 
    android:allowBackup="true" 
    android:icon="@drawable/ic_launcher" 
    android:label="@string/app_name" 
    android:screenOrientation="portrait" 
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen" > 
    <activity 
     android:name=".Intro" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 

      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name=".Menu" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
    </activity> 
</application> 
</manifest> 

. 내 문제를 고유하게 만드는 한 가지 점은 명시 적 활동 클래스 ("{/com.rhombi.Menu}")를 찾을 수 없다는 것을 알려주는 작은 슬래시입니다. 그것은 내 검색에서 결코 나타나지 않았지만 나는 모든 것을 올바르게하고있는 것으로 보입니다. 단지 클래스 명있다 -

+0

'Menu'라는 이름의 활동이 올바른지 철자가 맞고 동일한 패키지'com.rhombi'에 존재합니까? – Raghunandan

+0

귀하의 활동을 매니페스트에 등록 하시겠습니까? –

+0

@ 예 : op가 있습니다. Raghunandan

답변

1

android:name="{package name}.Menu"에 변화 시도 .

0

android:name=".Menu"ComponentInfo{/com.rhombi.Menu}에 빈 패키지 이름에 의해 입증 된대로 Intent 생성자에 Context로 전달 this에 문제가 발생했습니다

+0

나는 이미 이것을 시험해 보았고, 그 기간을 없앴습니다. 그것은 작동하지 않았다. –

+1

@ JohnO. 깨끗하게 빌드하고'Menu.java'를 게시하십시오. OK – Raghunandan

+0

ur 안드로이드 응용 프로그램은 2 개의 androidManifest.xml을 포함합니다. 하나는 bin 폴더 안에 있고, 하나는 바깥 쪽입니다. bin 폴더 안의 androidmanifest.xml을 수정하면됩니다. 한 번 확인해보십시오. 모든 것이 여기에 있습니다. – Nielarshi

관련 문제