Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Android ndk errors

Discussion in 'Linux' started by JooleanLogic, Mar 2, 2019.

  1. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    I'm trying to deploy to android and can't get past these burst errors even though I've set it to disabled.
    I'm on 2019.2.0a6 with android ndk installed via hub and set to "Installed with Unity (recommended)" in External Tools prefs.
    It was complaining about ANDROID_NDK_ROOT but I solved that by adding this to environment
    ANDROID_NDK_ROOT="/mnt/data/programs/unity/2019.2.0a6/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/android-ndk-r16b"
    Why do have to specify ANDROID_NDK_ROOT when it's set in Preferences->External Tools?

    Here's the full error and I assume it has to do with the 'Access denied' part but I don't know how to resolve that. I noticed that clang++ in Unity ndk is not executable but it is in the android studio ndk. Do I have to batch change permissions on the ndk or something?

     
  2. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    416
    We are going to have a look at this problem
     
    senkal_ likes this.
  3. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    Thanks xoofx
     
  4. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    416
    It has been fixed, we expect to release a new version hopefully tomorrow
     
    FROS7 likes this.
  5. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    416
    It should be fixed by
    com.unity.burst@1.0.0-preview.8
    available, let us know if it's not working for you.
     
  6. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    Ok, I managed to get a full (Android SDK+NDK) 2019.2.0a9 install done via the hub (all External Tools set to recommended), but when I go to build for Android I get the following sequence of errors.
    1. Access Denied error on adb because it does not have the execute bit set.
    2. Win32Exception because it didn't install the Android SDK tools folder (the same install on Win10 did install tools folder)
    3. NDK issue because it's installed to 'android-ndk-r16b' instead of just 'NDK'
    4. Access Denied error on clang which doesn't have execute bit set.

    Are these problems in the install script or did my install perhaps not finish properly? I didn't get any errors during the install.

    After manually fixing the above issues, I can now build an apk successfully, but if I try Build and Run, it won't complete building an apk and I get the three errors below.
    I'm on the latest everything including burst@1.0.0-preview.8. It doesn't matter that I've disabled burst from the Jobs menu either.
    The basis of the first two errors seems to be this
    1. All folders in the errors below exist and are correct
    2.
    3.
     
  7. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    416
    Unfortunately, we are currently not supporting building ANDROID players from Linux for burst. It looks like the ANDROID NDK for Linux shipped inside Unity is also wrongly installed.
     
    od3098 likes this.
  8. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    Thanks for response xoofx.
    I'm not trying to use Burst but how do I disable it? I've already turned it off in the Jobs menu.
    Even on a new blank project with nothing but Entities package installed, burst is still preventing me from deploying to Android.
     
  9. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    416
  10. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    Oof, hurts that that's been there all this time and I never knew about it.
    That worked, thanks heaps xoofx.
    Now to work out why I'm getting 2 fps. :)