2017-06-09 13 views
5

मैं निम्न निर्दिष्ट त्रुटि हो रही है का निर्माण करने केएंड्रॉइड एनडीके त्रुटि। , परियोजना

E:\SDK\ndk-bundle\build\core\setup-app-platform.mk 

त्रुटि में सक्षम नहीं: (115) *** एंड्रॉयड NDK: छोड़ रहा है। रूक जा। त्रुटि: निष्पादन कार्य के लिए विफल रहा ': un7zip: compileReleaseNdk'।

com.android.ide.common.process.ProcessException: Error while executing process E:\sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=E:\appRizort\RizortCardboard\un7zip\build\intermediates\ndk\release\Android.mk APP_PLATFORM=android-25 NDK_OUT=E:\appRizort\RizortCardboard\un7zip\build\intermediates\ndk\release\obj NDK_LIBS_OUT=E:\appRizort\RizortCardboard\un7zip\build\intermediates\ndk\release\lib APP_ABI=armeabi-v7a,armeabi,x86,arm64-v8a}

+0

एनडीके ** एंड्रॉइड -25 ** मंच का समर्थन नहीं करता है। आप ** एंड्रॉइड -24 ** या (आर 15 बीटा के साथ) ** एंड्रॉइड -26 ** सेट कर सकते हैं। –

+1

हां, यह बात काम करती है। धन्यवाद। @AlexCohn –

+0

एंड्रॉइड -26 के साथ भी, मुझे एंड्रॉइड स्टूडियो में NDK_PROJECT_PATH शून्य के रूप में मिलता है। हालांकि, अगर मैं इसे कमांड प्रॉम्प्ट से चलाता हूं, तो बिल्ड ठीक काम करता है। – RisingUp

उत्तर

4

आपका NDK_PROJECT_PATH परियोजना फ़ोल्डर में अपने पथ सफेद स्थान शामिल है, यह इस मुद्दे का कारण हो सकता रिक्त है,।

+0

कोई व्हाइटस्पेस मौजूद नहीं है –

+0

'NDK_PROJECT_PATH' शून्य है जब ** ndk-build ** एंड्रॉइड स्टूडियो में एंड्रॉइड प्लगइन के द्वारा एंड्रॉइड प्लगइन द्वारा चलाया जाता है, यह कोशेर है। –

2

APP_PLATFORM जो आप निर्दिष्ट करते हैं जब आप एनडीके के साथ अपने प्रोजेक्ट का मूल भाग बनाते हैं तो यह बहुत महत्वपूर्ण है। कहानी described at length in the NDK guide है:

This variable contains the minimum Android platform version you want to support. For example, a value of android-15 specifies that your library uses APIs that are not available below Android 4.0.3 (API level 15) and can't be used on devices running a lower platform version. For a complete list of platform names and corresponding Android system images, see Android NDK Native APIs .

Instead of changing this flag directly, you should set the minSdkVersion property in the defaultConfig or productFlavors blocks of your module-level build.gradle file . This makes sure your library is used only by apps installed on devices running an adequate version of Android. The ndk-build toolchain uses the following logic to choose the minimum platform version for your library based the ABI you're building and the minSdkVersion you specify:

  1. If there exists a platform version for the ABI equal to minSdkVersion , ndk-build uses that version.
  2. Otherwise, if there exists platform versions lower than minSdkVersion for the ABI, ndk-build uses the highest of those platform versions. This is a reasonable choice because a missing platform version typically means that there were no changes to the native platform APIs since the previous available version.
  3. Otherwise, ndk-build uses the next available platform version higher than minSdkVersion .

NDK अलग android-25 मंच नहीं है। आप android-24 या (आर 15 बीटा के साथ), android-26 चुन सकते हैं, यदि आपका न्यूनतम समर्थित प्लेटफ़ॉर्म ओ है। यदि आपका minSdkVersion कम है, या यदि संदेह है, तो एनडीके के लिए निचला प्लेटफ़ॉर्म चुनें, क्योंकि एनडीके प्लेटफॉर्म ऊपर-संगत हैं।

संबंधित मुद्दे