EunGyeongKim

[Error Log] No activity in the manifest with action MAIN and category LAUNCHER 본문

기타 컴퓨터/Unity

[Error Log] No activity in the manifest with action MAIN and category LAUNCHER

EunGyeongKim 2025. 1. 27. 23:33
DeploymentOperationFailedException: No activity in the manifest with action MAIN and category LAUNCHER. Try launching the application manually on the device.

 

이 오류는 Unity에서 Android 애플리케이션을 빌드한 후 실행하려고 할 때 AndroidManifest.xml에 MAIN 액션 및 LAUNCHER 카테고리가 설정된 Activity가 없어서 발생. 


GPT가 제시한 해결 방법

1. AndroidManifest.xml 검토 및 수정

MAIN 및 LAUNCHER가 설정된 시작 Activity가 존재해야 합니다. 아래 코드를 AndroidManifest.xml에 추가하거나 확인

2. 패키지 이름 확인

Unity의 Player Settings에서 설정된 패키지 이름이 AndroidManifest.xml의 package 속성과 일치해야 합니다.

3. Custom Manifest 사용 확인

  • Assets/Plugins/Android/AndroidManifest.xml 파일이 있는 경우, Unity에서 기본 Manifest 대신 이 파일을 사용합니다.

4. Unity Player Settings 점검

  • Unity → Player SettingsOther Settings에서 아래 항목을 확인하세요:
    • Package Name: xxx.xxxx.xxxx
    • Minimum API Level: 19 이상으로 설정.
    • Target Architecture: ARM64 활성화. -> google play 정책때문에 체크해야함. 

5. 빌드 캐시 정리

  • Unity 빌드 프로세스 중 남아 있는 이전 빌드 캐시로 인해 발생할 수 있으므로 클린 빌드를 실행합니다:
    1. Library 폴더 삭제.
    2. Unity → Build SettingsClean Build 선택 후 재빌드.

 

-> 해결 안됨


https://discussions.unity.com/t/no-activity-in-the-manifest/941435

해당 질문자의 old manifest.xml는 작동 x. 하지만 새로운 new manifest.xml은 작동. 

=> 두 manifest 차이를 확인하고(facebook plug 제외), manifest 수정


    <!-- UnityPlayerNativeActivity를 UnityPlayerActivity으로 변경 -->
    <activity android:name="com.unity3d.player.UnityPlayerActivity"
              android:label="@string/app_name"
              android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
              android:screenOrientation="landscape"
              android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>
    
    
    <!-- UnityPlayerGameActivity (추가된 Unity GameActivity 엔트리 포인트) -->
    <activity android:name="com.unity3d.player.UnityPlayerGameActivity"
              android:theme="@style/BaseUnityGameActivityTheme">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
      <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
      <meta-data android:name="android.app.lib_name" android:value="game" />
    </activity>

    <!-- UnityPlayerActivity에 추가 Meta-data -->
    <meta-data android:name="unityplayer.UnityActivity" android:value="true" />

 

 

해결 완

'기타 컴퓨터 > Unity' 카테고리의 다른 글

[unity]비동기 로딩 화면 최적화  (0) 2025.02.03
Comments