Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug package="com.example.VulkanLayerValidationTests" AndroidManfest.xml file Automatically Created

Discussion in 'Editor & General Support' started by unity_7OXgEYZNxIPnNw, Mar 30, 2023.

  1. unity_7OXgEYZNxIPnNw

    unity_7OXgEYZNxIPnNw

    Joined:
    Jun 24, 2022
    Posts:
    1
    I assume that Unity 2021.3.21f1 + Apple Silicon + Gradle + AAB build Make some weird Build Error OR Crash Issue.

    And I'm not using vulkan . ( And tested also with vulkan added )

    Hi. I repeatedly came into this issue on upgrade my Unity version from 2019.

    Every Time I Build AAB file for play store, I run into next error.

    Code (Boo):
    1. java.lang.RuntimeException: Unable to start activity ComponentInfo{com.betdon.egosword/android.app.NativeActivity}: java.lang.IllegalArgumentException: Unable to find native library VulkanLayerValidationTests using classloader:
    So, I found a AndoridManifest.xml file on Asset/Android/Plugins/AndroidMnaifest.xml Like Below.
    Code (CSharp):
    1. <?xml version="1.0"?>
    2. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.VulkanLayerValidationTests" android:versionCode="1" android:versionName="1.0">
    3.  
    4.     <!-- This is the platform API where NativeActivity was introduced. -->
    5.     <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26"/>
    6.  
    7.     <!-- This .apk has no Java code itself, so set hasCode to false. -->
    8.     <application android:label="@string/app_name" android:hasCode="false" android:debuggable='false'>
    9.  
    10.         <!-- This allows writing log files to sdcard -->
    11.         <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    12.  
    13.         <!-- Our activity is the built-in NativeActivity framework class.
    14.              This will take care of integrating with our NDK code. -->
    15.         <activity android:name="android.app.NativeActivity" android:label="@string/app_name" android:exported="true">
    16.             <!-- Tell NativeActivity the name of or .so -->
    17.             <meta-data android:name="android.app.lib_name" android:value="VulkanLayerValidationTests"/>
    18.             <intent-filter>
    19.                 <action android:name="android.intent.action.MAIN"/>
    20.                 <category android:name="android.intent.category.LAUNCHER"/>
    21.             </intent-filter>
    22.         </activity>
    23.     </application>
    24.  
    25. </manifest>
    26.  
    After Remove or Delete Some line, It Revives on build.

    And I alos found two file related this issus iguess, On Assets/Libaray


    path : /Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/build/intermediates/library_manifest/release/AndroidManifest.xml
    Code (CSharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    3.     package="com.unity3d.player"
    4.     android:versionCode="2045"
    5.     android:versionName="1.72" > <!-- This is the platform API where NativeActivity was introduced. -->
    6.     <uses-sdk
    7.         android:minSdkVersion="24"
    8.         android:targetSdkVersion="31" />
    9.  
    10.     <uses-feature android:glEsVersion="0x00030002" />
    11.     <uses-feature
    12.         android:name="android.hardware.vulkan.version"
    13.         android:required="false" />
    14.     <uses-feature
    15.         android:name="android.hardware.type.pc"
    16.         android:required="false" />
    17.  
    18.     <uses-permission android:name="android.permission.INTERNET" />
    19.     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    20.  
    21.     <uses-feature
    22.         android:name="android.hardware.touchscreen"
    23.         android:required="false" />
    24.     <uses-feature
    25.         android:name="android.hardware.touchscreen.multitouch"
    26.         android:required="false" />
    27.     <uses-feature
    28.         android:name="android.hardware.touchscreen.multitouch.distinct"
    29.         android:required="false" />
    30.     <!-- This .apk has no Java code itself, so set hasCode to false. -->
    31.     <application
    32.         android:debuggable="false"
    33.         android:extractNativeLibs="true"
    34.         android:hasCode="false"
    35.         android:label="@string/app_name" >
    36.  
    37.         <!-- This allows writing log files to sdcard -->
    38.         <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    39.         <!--
    40.          Our activity is the built-in NativeActivity framework class.
    41.              This will take care of integrating with our NDK code.
    42.         -->
    43.         <activity
    44.             android:name="android.app.NativeActivity"
    45.             android:exported="true"
    46.             android:label="@string/app_name" >
    47.  
    48.             <!-- Tell NativeActivity the name of or .so -->
    49.             <meta-data
    50.                 android:name="android.app.lib_name"
    51.                 android:value="VulkanLayerValidationTests" />
    52.  
    53.             <intent-filter>
    54.                 <action android:name="android.intent.action.MAIN" />
    55.  
    56.                 <category android:name="android.intent.category.LAUNCHER" />
    57.             </intent-filter>
    58.  
    59.             <meta-data
    60.                 android:name="android.notch_support"
    61.                 android:value="true" />
    62.         </activity>
    63.  
    64.         <meta-data
    65.             android:name="unity.splash-mode"
    66.             android:value="2" />
    67.         <meta-data
    68.             android:name="unity.splash-enable"
    69.             android:value="True" />
    70.         <meta-data
    71.             android:name="unity.launch-fullscreen"
    72.             android:value="True" />
    73.         <meta-data
    74.             android:name="unity.allow-resizable-window"
    75.             android:value="False" />
    76.         <meta-data
    77.             android:name="notch.config"
    78.             android:value="portrait|landscape" />
    79.         <meta-data
    80.             android:name="unity.auto-report-fully-drawn"
    81.             android:value="true" />
    82.     </application>
    83.  
    84. </manifest>




    What have I done before aslo: Reimport Asset trick, Delete Library Folder , Remove all the android plugins in project.


    Tomorrow I'll test the build test on 2020 LTS , So If issue still exist on Unity 2020, It could be my-project-only-issue.

    (And after that, empty build test on 2021 !)

    Thanks !
     
  2. subliminal_ryan

    subliminal_ryan

    Joined:
    Sep 8, 2020
    Posts:
    5
    Did you ever fix this and get the game running? I'm currently having this issue on Unity 2021.3.14f both on my Windows and Mac machine.

    I get an error from Logcat when it attempt to runs the app.


    FATAL EXCEPTION: main
    Process: com.subliminalgaming.buttoncity, PID: 6777
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.subliminalgaming.buttoncity/android.app.NativeActivity}: java.lang.IllegalArgumentException: Unable to find native library buttoncity using classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/~~9kPO4NrjqE7he7vxjugHpg==/com.subliminalgaming.buttoncity-pSB-z94U_Qq-USrvdRIobQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~9kPO4NrjqE7he7vxjugHpg==/com.subliminalgaming.buttoncity-pSB-z94U_Qq-USrvdRIobQ==/lib/arm, /data/app/~~9kPO4NrjqE7he7vxjugHpg==/com.subliminalgaming.buttoncity-pSB-z94U_Qq-USrvdRIobQ==/base.apk!/lib/armeabi-v7a, /system/lib, /system/system_ext/lib]]]
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4111)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4277)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:226)
    at android.os.Looper.loop(Looper.java:313)
    at android.app.ActivityThread.main(ActivityThread.java:8751)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
    Caused by: java.lang.IllegalArgumentException: Unable to find native library buttoncity using classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/~~9kPO4NrjqE7he7vxjugHpg==/com.subliminalgaming.buttoncity-pSB-z94U_Qq-USrvdRIobQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~9kPO4NrjqE7he7vxjugHpg==/com.subliminalgaming.buttoncity-pSB-z94U_Qq-USrvdRIobQ==/lib/arm, /data/app/~~9kPO4NrjqE7he7vxjugHpg==/com.subliminalgaming.buttoncity-pSB-z94U_Qq-USrvdRIobQ==/base.apk!/lib/armeabi-v7a, /system/lib, /system/system_ext/lib]]]
    at android.app.NativeActivity.onCreate(NativeActivity.java:164)
    at android.app.Activity.performCreate(Activity.java:8290)
    at android.app.Activity.performCreate(Activity.java:8270)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4085)