ANDROID_STUDIO错误帮助我

时间:2016-11-08 04:32:32

标签: android-studio

我从https://github.com/DrKLO/Telegram下载电报项目并导入到android studio但发生错误

错误:

Build command failed. Error while executing 'C:\Users\LoieForAhmad\AppData\Local\Android\sdk\ndk-bundle\ndk-build.cmd' with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Android.mk NDK_APPLICATION_MK=C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDEBUG=1 APP_PLATFORM=android-14 NDK_OUT=C:/Users/LoieForAhmad/Desktop/New folder (7)/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/fat/debug/obj NDK_LIBS_OUT=C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\build\intermediates\ndkBuild\fat\debug\lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -n}

Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Android.mk    

process_begin: CreateProcess(NULL, "", ...) failed.

Error:executing external native build for ndkBuild C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Android.mk

Build command failed.

Error while executing 'C:\Users\LoieForAhmad\AppData\Local\Android\sdk\ndk-bundle\ndk-build.cmd' with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Android.mk NDK_APPLICATION_MK=C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDEBUG=0 APP_PLATFORM=android-14 NDK_OUT=C:/Users/LoieForAhmad/Desktop/New folder (7)/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/fat/foss/obj NDK_LIBS_OUT=C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\build\intermediates\ndkBuild\fat\foss\lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -n}

Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Android.mk    

process_begin: CreateProcess(NULL, "", ...) failed.

Error:executing external native build for ndkBuild C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Android.mk

Build command failed.

Error while executing 'C:\Users\LoieForAhmad\AppData\Local\Android\sdk\ndk-bundle\ndk-build.cmd' with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Android.mk NDK_APPLICATION_MK=C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDEBUG=0 APP_PLATFORM=android-14 NDK_OUT=C:/Users/LoieForAhmad/Desktop/New folder (7)/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/release/obj NDK_LIBS_OUT=C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\build\intermediates\ndkBuild\armv7\release\lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -n}

Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Android.mk    

process_begin: CreateProcess(NULL, "", ...) failed.

Error:executing external native build for ndkBuild C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Android.mk

Build command failed.

Error while executing 'C:\Users\LoieForAhmad\AppData\Local\Android\sdk\ndk-bundle\ndk-build.cmd' with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Android.mk NDK_APPLICATION_MK=C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDEBUG=0 APP_PLATFORM=android-14 NDK_OUT=C:/Users/LoieForAhmad/Desktop/New folder (7)/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/foss/obj NDK_LIBS_OUT=C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\build\intermediates\ndkBuild\x86\foss\lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -n}

Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Android.mk    


process_begin: CreateProcess(NULL, "", ...) failed.

Error:executing external native build for ndkBuild C:\Users\LoieForAhmad\Desktop\New folder (7)\Telegram-master\TMessagesProj\jni\Android.mk

Error:(197, 0) *** Android NDK: Aborting...    .  Stop. <a href="openFile:C:/Users/LoieForAhmad/AppData/Local/Android/sdk/ndk-bundle/build/core/add-application.mk">Open File</a>

2 个答案:

答案 0 :(得分:2)

问题是项目的位置。 它应该在名称中没有空格的目录中。(在你的情况下为新文件夹(7))
消除目录名中的空格,错误将消失

答案 1 :(得分:0)

  1. 问题是基于NDK,请确保您已下载Android NDK及其已正确安装,然后重试。

  2. 重新启动AS并重建项目。

  3. 要添加google json,请转到此页面: https://developers.google.com/android/guides/google-services-plugin