Search Unity

Failure to initialize! Your hardware does not support this application, sorry! [Android] [Shield TV]

Discussion in 'Editor & General Support' started by tgraupmann, Jun 30, 2016.

  1. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    I ran into an issue on Shield TV (Android). But really this affects any Android device.

    Failure to initialize!
    Your hardware does not support this application, sorry!



    The cause was actually that I had a legacy native library in the Assets/Plugins/Android/lib/armeabi folder.

    By default when you build a native library you get outputs for x86, armeabi, armeabi-v7a, etc. After Unity 5.X support for armeabi was deprecated.

    My issue is caused by Unity being confused by the legacy armeabi and crashing at runtime. My solution was to remove all the native libraries except for armeabi-v7a which removed the offending native library.

    To provide a little more detail, I edited my gradle build file to add an abiFilter to only build the armeabi-v7a native library.

    Code (CSharp):
    1. android {
    2.     compileSdkVersion 19
    3.     buildToolsVersion '19.1'
    4.  
    5.     defaultConfig {
    6.         ndk {
    7.             moduleName 'lib-ndk-unity-store-sdk'
    8.             abiFilters 'armeabi-v7a'
    9.             stl 'stlport_static'
    10.             cFlags '-Wno-error=format-security'
    11.             ldLibs 'c', 'm', 'log'
    12.         }
    13.     }
    14. }
    If you build the legacy way with ndk-build, add the filter to Android.mk.

    Code (CSharp):
    1. APP_ABI := armeabi-v7a
    One more detail about my setup. I wrapped the native library into an AAR file which was built with Android Studio. I have the AAR file placed in Assets\Plugins\Android\libs\UnityPluginStoreSDK.aar and it works!

    IMO, Unity needs a little more error handling in the packager that uses AAR files to show a more descriptive error when compiling and to add support for including multiple native libraries. Although the error happened at runtime, it could have been detected at compile time.

    Hopefully this information helps someone working on a JAR/Native plugin in the future!
     
    Last edited: Jun 30, 2016
    stephen_george98 likes this.
  2. stephen_george98

    stephen_george98

    Joined:
    Apr 14, 2016
    Posts:
    31
    I have a question that is very similar regarding the problem you just solved here. Let me know if this thread is still active and if you are still checking it. :)
     
  3. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    Still watching. I ran into this on another engine and should have recognized this issue...
     
  4. JACK_Z

    JACK_Z

    Joined:
    Nov 1, 2013
    Posts:
    4
    It works for me! Thank you so much guys.
     
  5. dyc081818

    dyc081818

    Joined:
    Oct 24, 2017
    Posts:
    3
    Thank you guys,you helped a lot
     
  6. jihedby

    jihedby

    Joined:
    Feb 28, 2018
    Posts:
    1
    It works for me Thank you guys.
     
  7. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
    I don't know if this is the same issue but I get this message only after deleting data for my app. On first install it works fine, delete data, there is a problem. I wonder why?

    I'll investigate further and see if this solution also fixes this delete data bug.
     
  8. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,555
    I would like to add it is actually this bug : https://issuetracker.unity3d.com/is...dward-does-not-support-this-application-sorry . There's no need to fix the gradle to build an AAR without armeabi because the fix was backported to many previous versions as listed. Fixed in: 5.6.6f2, 2017.1.3p4, 2017.2.3p1, 2017.4.3f1, 2018.1.0p4, 2018.2.0b2, 2018.3.0a1

    That means if you have armeabi in your AAR and you use 2017.1.3f1 to build the game, it would cause the Failure to initialize since 2017.1.3f1 < 2017.1.3p4. If you just update it to 2017.1.5f1 (which is currently the lowest possible version with Unity Hub) you don't have to do anything to the AAR. It just works.
     
  9. ashunkhs

    ashunkhs

    Joined:
    Jun 19, 2013
    Posts:
    1
    thanks bro . it worked for me .
    defaultConfig {
    applicationId "xxxxxxxxxx"
    compileSdkVersion 25
    buildToolsVersion "26.0.0"
    minSdkVersion 19
    multiDexEnabled true
    ndk {
    moduleName 'lib-ndk-unity-store-sdk'
    abiFilters 'armeabi-v7a'
    stl 'stlport_static'
    cFlags '-Wno-error=format-security'
    ldLibs 'c', 'm', 'log'
    }
    }
     
  10. agha502

    agha502

    Joined:
    Dec 21, 2018
    Posts:
    3
    there is no armeabi folder in assets/plugins/android/lib... please help
     

    Attached Files:

  11. DivyaJain24

    DivyaJain24

    Joined:
    Oct 18, 2023
    Posts:
    3
    Hi, I would like to request you to please help me on this, I am facing this problem (Failure to initialize! Your hardware does not support this application, sorry!) in Android 13, mentioned by Ashunkhs, that solution is not working in my Android app, if anyone have any ideas, please help me.
     

    Attached Files: