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

jni.h file not found on build for iOS?

Discussion in 'Unity Build Automation' started by cparki3, Dec 12, 2016.

  1. cparki3

    cparki3

    Joined:
    Jan 13, 2014
    Posts:
    41
    Hey guys,

    I can build for both iOS and Android locally just fine. I attempted to do some post process build stuff for iOS but this error keeps happening regardless when I build on Cloud. It looks like it's trying to find an android library but why would it even bother on an iOS build? Android is building fine on cloud so I'm really confused on what is actually happening here.

    9123: [xcode] cd /BUILD_PATH/few-remain-llc.slashed-2-bits.default-ios/temp.cLR9eK
    9124: [xcode] export PATH="/APPLICATION_PATH/Xcode7_2_1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode7_2_1.app/Contents/Developer/usr/bin:/Applications/Android Studio.app/sdk/:/BUILD_PATH/bin/:/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin:/Applications/Android Studio.app/sdk/:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/buildbot/.mason/buildpacks/unity/libs/vendor/jsawk:/Users/buildbot/.mason/buildpacks/xcode/libs/vendor/jsawk:/Users/buildbot/.rvm/bin"
    9125: [xcode] /BUILD_PATH/few-remain-llc.slashed-2-bits.default-ios/temp.cLR9eK/Libraries/Plugins/Android/jni/jni.cpp:1:10: fatal error: 'jni.h' file not found
    9126: [xcode] #include <jni.h>
    9127: [xcode] 1 error generated.
    9128: [xcode] ** BUILD FAILED **
    9129: [xcode] The following build commands failed:
    9130: [xcode] CompileC build/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/jni.o Libraries/Plugins/Android/jni/jni.cpp normal armv7 c++ com.apple.compilers.llvm.clang.1_0.compiler
    9131: [xcode] (1 failure)
    9132: ! build of 'default-ios' failed. compile failed
    9133: Publishing build 17 of few-remain-llc/slashed-2-bits for target 'default-ios'...
    9134: Uploading extra_data/artifacts/icon.png ...done
     
  2. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
    Have you tried switching to Xcode 7.3 or Xcode 8?
     
    cparki3 likes this.
  3. cparki3

    cparki3

    Joined:
    Jan 13, 2014
    Posts:
    41
    I switched to Xcode 8 and I did end up finding an answer... I actually did a test a long time ago with an Ouya and that was the issue... it was trying to compile and look for some old Ouya SDK locally on my machine so it couldn't find it during a cloud build. Solution was just to remove all the old Ouya junk lol.

    Thanks for the quick response! I really appreciate it.