Android java.lang.illegalargumentexception unable to find native library main
<p>I need your help. Am struggling with this bug for sometime. Thanks for your help.</p>

<p>Do let me know if you need more information. </p>

<p>I am developing a game with custom android activities. So I created a sample project and changed the source code to handle custom android activity. I got it to compile and build the app properly, but when I run it, i get an error message. The log cat has the following error message:</p>

<pre><code>6-08 14:15:37.548 14319 14319 W linker  : /data/app/com.MyTestCompany.puzzle-1/lib/arm/libUE4.so: is missing DT_SONAME will use basename as a replacement: "libUE4.so"
06-08 14:15:37.720  3751  6317 D audio_hw_primary: disable_audio_route: reset and update mixer path: low-latency-playback
06-08 14:15:37.721  3751  6317 D audio_hw_primary: disable_snd_device: snd_device(2: speaker)
06-08 14:15:37.734  3751  6317 D audio_hw_primary: disable_snd_device: snd_device(71: vi-feedback)
06-08 14:15:37.735  3751  6317 D audio_hw_primary: disable_audio_route: reset and update mixer path: spkr-vi-record
06-08 14:15:37.737  3751  6317 I soundtrigger: audio_extn_sound_trigger_update_device_status: device 0x2 of type 0 for Event 0
06-08 14:15:38.194 14319 14319 D UE4     : In the JNI_OnLoad function
06-08 14:15:38.202 14319 14319 D UE4     : Path found as '/storage/emulated/0'
06-08 14:15:38.204 14319 14319 D UE4     : Font Path found as '/system/fonts/'
06-08 14:15:38.204 14319 14319 D UE4     : In the JNI_OnLoad function 5
06-08 14:15:38.224 14319 14319 D AndroidRuntime: Shutting down VM
06-08 14:15:38.240 14319 14319 E AndroidRuntime: FATAL EXCEPTION: main
06-08 14:15:38.240 14319 14319 E AndroidRuntime: Process: com.MyTestCompany.puzzle, PID: 14319
06-08 14:15:38.240 14319 14319 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.MyTestCompany.puzzle/com.epicgames.ue4.GameActivity}: java.lang.IllegalArgumentException: Unable to find native library: main
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    at android.app.ActivityThread.-wrap11(ActivityThread.java)
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:5422)
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
06-08 14:15:38.240 14319 14319 E AndroidRuntime: Caused by: java.lang.IllegalArgumentException: Unable to find native library: main
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    at android.app.NativeActivity.onCreate(NativeActivity.java:170)
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    at com.epicgames.ue4.GameActivity.onCreate(GameActivity.java:266)
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    at android.app.Activity.performCreate(Activity.java:6251)
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
06-08 14:15:38.240 14319 14319 E AndroidRuntime:    ... 9 more
</code></pre>

<p>Here is my app manifest:</p>

<pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com" android:versionCode="1" android:versionName="1.0"&gt;
  &lt;!-- Application Definition --&gt;
  &lt;application android:label="@string/app_name" android:icon="@drawable/icon" android:hasCode="true"&gt;
    &lt;activity android:name="com.epicgames.ue4.SplashActivity" android:label="@string/app_name" android:theme="@style/UE4SplashTheme" android:launchMode="singleTask" android:screenOrientation="landscape" android:debuggable="true"&gt;
      &lt;intent-filter&gt;
        &lt;action android:name="android.intent.action.MAIN" /&gt;
        &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
      &lt;/intent-filter&gt;
    &lt;/activity&gt;
    &lt;activity android:name="com.hazardnetworking.unrealandroidtest2.MainActivity" android:label="@string/app_name" android:theme="@style/AppTheme" android:configChanges="screenSize|orientation|keyboardHidden|keyboard" android:launchMode="singleTask" android:screenOrientation="landscape" android:debuggable="true"&gt;
      &lt;meta-data android:name="android.app.lib_name" android:value="UE4" /&gt;
    &lt;/activity&gt;
    &lt;activity android:name="com.epicgames.ue4.GameActivity" android:label="@string/app_name" android:theme="@style/UE4SplashTheme" android:configChanges="screenSize|orientation|keyboardHidden|keyboard"&gt;
    &lt;/activity&gt;
    &lt;activity android:name=".DownloaderActivity" android:screenOrientation="landscape" android:configChanges="screenSize|orientation|keyboardHidden|keyboard" android:theme="@style/UE4SplashTheme" /&gt;
    &lt;meta-data android:name="com.epicgames.ue4.GameActivity.DepthBufferPreference" android:value="0" /&gt;
    &lt;meta-data android:name="com.epicgames.ue4.GameActivity.bPackageDataInsideApk" android:value="false" /&gt;
    &lt;meta-data android:name="com.epicgames.ue4.GameActivity.bVerifyOBBOnStartUp" android:value="false" /&gt;
    &lt;meta-data android:name="com.epicgames.ue4.GameActivity.bShouldHideUI" android:value="false" /&gt;
    &lt;meta-data android:name="com.epicgames.ue4.GameActivity.ProjectName" android:value="PuzzleTestProject2" /&gt;
    &lt;meta-data android:name="com.epicgames.ue4.GameActivity.bHasOBBFiles" android:value="false" /&gt;
    &lt;meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id" /&gt;
    &lt;meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /&gt;
    &lt;activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" /&gt;
    &lt;service android:name="OBBDownloaderService" /&gt;
    &lt;receiver android:name="AlarmReceiver" /&gt;
  &lt;/application&gt;
  &lt;!-- Requirements --&gt;
  &lt;uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" /&gt;
  &lt;uses-feature android:glEsVersion="0x00020000" android:required="true" /&gt;
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
  &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
  &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
  &lt;uses-permission android:name="com.android.vending.CHECK_LICENSE" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&gt;
  &lt;uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /&gt;
  &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;
  &lt;uses-permission android:name="android.permission.VIBRATE" /&gt;
  &lt;uses-permission android:name="android.permission.READ_PROFILE" /&gt;
  &lt;uses-permission android:name="android.permission.READ_CONTACTS" /&gt;
&lt;/manifest&gt;
</code></pre>

<p>Thanks for looking</p>