2012-09-19 5 views
2

앱 서랍에 앱이 표시되지 않는 이유는 무엇입니까? 그것은 응용 프로그램 관리자에서 그것이 설치되어 있지만 그것이 실제 서랍을 열 수없는 것 애플 리케이션 서랍에 없습니다. 설치가 완료되면 자동으로 열리지 않습니다.내 앱이 설치되어 있어도 앱 서랍에 앱이 나타나지 않습니다.

내 전화 (Jellybean에 있음)를 선택하면 다음과 같이 표시됩니다. 그것은 에뮬레이터에 설치할 때 똑같은 것을 말합니다.

[2012-09-19 16:20:24 - TheForeverAloneQuiz] Performing sync 
    [2012-09-19 16:20:24 - TheForeverAloneQuiz] Automatic Target Mode: Several compatible targets. Please select a target device. 
    [2012-09-19 16:20:28 - TheForeverAloneQuiz] Uploading TheForeverAloneQuiz.apk onto device '001988a8094d8e' 
    [2012-09-19 16:20:28 - TheForeverAloneQuiz] Installing TheForeverAloneQuiz.apk... 
    [2012-09-19 16:20:31 - TheForeverAloneQuiz] Success! 
    [2012-09-19 16:20:31 - TheForeverAloneQuiz] /TheForeverAloneQuiz/bin/TheForeverAloneQuiz.apk installed on device 
    [2012-09-19 16:20:31 - TheForeverAloneQuiz] Done! 

다음은 Android 매니페스트입니다.

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.mikenning.foreveralonequiz" 
    android:versionCode="1" 
    android:versionName="1.0" > 

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

    <application 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" 
     android:theme="@android:style/Theme.Light.NoTitleBar" > 
     <activity 
      android:name=".Introduction" 
      android:label="@string/title_activity_introduction" > 
      <intent-filter> 
       <action android:name="android.intent.action.INTRO" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
     <activity 
      android:name=".QuestionOne" 
      android:label="@string/title_activity_introduction" > 
      <intent-filter> 
       <action android:name="android.intent.action.QUESTIONONE" /> 

       <category android:name="android.intent.category.DEFAULT" /> 
      </intent-filter> 
     </activity> 
     <activity 
      android:name=".Result" 
      android:label="@string/title_activity_introduction" > 
      <intent-filter> 
       <action android:name="android.intent.action.RESULTS" /> 

       <category android:name="android.intent.category.DEFAULT" />   
      </intent-filter> 
     </activity> 
    </application> 

</manifest> 

내가 잘못하고있는 사항이 있습니까?

SIDENOTE 나는 'DEFAULT'로 분류 된 활동에 대한 허가가 필요 없다는 오류가 표시됩니다. 이것이 그걸로 할 수 있을까요? 내 작품 중 하나에서 startActivity()에 필요하므로 정말 필요하지 않은가요?

+0

관련없는 참고 사항에 사용자 지정 의도 동작을 자신의 패키지 이름으로 지정해야합니다. 'android.intent.action.INTRO' 대신'com.mikenning.foreveralonequiz.INTRO'를 사용하십시오. 이렇게하면 예기치 않은 결과를 초래할 수있는 Android Android 의도 액션을 실수로 사용하는 것을 방지 할 수 있습니다. – Squonk

+0

@ 스퀘크; 그래서 의도 필터를 제거하고 startActivity() thingy에서 "android.intent.action.QUESTIONONE"을 사용하는 대신 "com.mikenning.foreveralonequiz.QuestionOne"을 사용합니까? – MiKenning

+0

일반적으로 메인 'Activity'에 대해서만'MAIN'' LAUNCHER' 엔트리가 필요하고 다른'Activity'에 대해서는''엘리먼트가 필요하지 않습니다. 파티) 앱. 자신의 앱에서'Activity'를 시작하는 일반적인 방법은 명백한'Intent'를 사용하는 것입니다. 예'Intent i = new Intent (this, QuestionOne.class);'그런 다음'startAcivity (i);'를 호출하십시오. – Squonk

답변

3

소개가 첫 번째 활동이라고 가정합니다. 다음 코드와 같이 다른 작업을 추가해야합니다.

<activity 
     android:name=".Introduction" 
     android:label="@string/title_activity_introduction" > 
     <intent-filter> 
      <action android:name="android.intent.action.INTRO" /> 
      <action android:name="android.intent.action.MAIN" /> 
      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 
+0

다른 작업을 추가해야하는 이유는 무엇입니까? – MiKenning

+0

왜 작동 했습니까? – MiKenning

+1

MAIN 활동 및 LAUNCHER 범주가있는 활동이 실행 프로그램에 표시됩니다. 왜 내 소개 활동을했는지 모르겠지만 이유가 있다고 생각합니다. MAIN 작업이 누락 되었기 때문에 Android는 실행 프로그램에이 활동을 표시하고 싶다는 것을 모릅니다. –

관련 문제