我已经在这个问题上待了一个星期。我不能理清,请帮帮我! 我按照指南中的所有步骤(http://www.example.com/anything/else/here/api)进行了10次,但仍然有相同的错误。 在网络上,我发现很多人都有这个问题,我尝试了所有的解决方案,但仍然没有工作。 我有一台MacBook Pro
Information:Gradle tasks [:app:generateDevelopDebugSources, :app:generateDevelopDebugAndroidTestSources, :app:prepareDevelopDebugUnitTestDependencies, :app:mockableAndroidJar, :app:compileDevelopDebugSources, :app:compileDevelopDebugAndroidTestSources, :app:compileDevelopDebugUnitTestSources, :tess-two:tess-two:generateDebugSources, :tess-two:tess-two:mockableAndroidJar, :tess-two:tess-two:prepareDebugUnitTestDependencies, :tess-two:tess-two:generateDebugAndroidTestSources, :tess-two:tess-two:compileDebugSources, :tess-two:tess-two:compileDebugUnitTestSources, :tess-two:tess-two:compileDebugAndroidTestSources]
Error:Execution failed for task ':tess-two:tess-two:ndkBuild'.
处理'命令' / Users / giuliopettenuzzo / Library / Android / sdk / ndk-bundle / ndk-build''完成非零退出值2
当我尝试执行此提交时,这就是我看到的信息:
Initialized native services in: /Users/giuliopettenuzzo/.gradle/native
Found daemon DaemonInfo{pid=22739, address=[9ff26fe0-163c-468c-95ea-a30bf761b19b port:52841, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Idle, lastBusy=1501756593936, context=DefaultDaemonContext[uid=c569827f-7ca0-4b6e-8d43-9306b578605e,javaHome=/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home,daemonRegistryDir=/Users/giuliopettenuzzo/.gradle/daemon,pid=22739,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=512m,-Dfile.encoding=UTF-8,-Duser.country=IT,-Duser.language=it,-Duser.variant]}
但其背景与所需标准不符。
Java家是不同的。
通缉:DefaultDaemonContext[uid=null,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home,daemonRegistryDir=/Users/giuliopettenuzzo/.gradle/daemon,pid=23067,idleTimeout=null,daemonOpts=-XX:MaxPermSize=512m,-Dfile.encoding=UTF-8,-Duser.country=IT,-Duser.language=it,-Duser.variant]
Actual: DefaultDaemonContext[uid=c569827f-7ca0-4b6e-8d43-9306b578605e,javaHome=/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home,daemonRegistryDir=/Users/giuliopettenuzzo/.gradle/daemon,pid=22739,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=512m,-Dfile.encoding=UTF-8,-Duser.country=IT,-Duser.language=it,-Duser.variant]
寻找不同的守护进程......
[armeabi-v7a] Compile : lept <= adaptmap.c
make: /Users/giuliopettenuzzo/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc: Command not found
make: *** [/Users/giuliopettenuzzo/AndroidStudioProjects/textfairy/tess-two/tess-two/obj/local/armeabi-v7a/objs/lept/src/src/adaptmap.o] Error 127
make: *** Waiting for unfinished jobs....
[armeabi-v7a] Compile : lept <= affine.c
make: /Users/giuliopettenuzzo/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc: Command not found
make: *** [/Users/giuliopettenuzzo/AndroidStudioProjects/textfairy/tess-two/tess-two/obj/local/armeabi-v7a/objs/lept/src/src/affine.o] Error 127
[armeabi-v7a] Compile : lept <= affinecompose.c
make: /Users/giuliopettenuzzo/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc: Command not found
make: *** [/Users/giuliopettenuzzo/AndroidStudioProjects/textfairy/tess-two/tess-two/obj/local/armeabi-v7a/objs/lept/src/src/affinecompose.o] Error 127
:tess-two:tess-two:ndkBuild FAILED
:tess-two:tess-two:ndkBuild (Thread[Daemon worker Thread 6,5,main]) completed. Took 0.642 secs.
失败:构建因异常而失败。
出了什么问题: 任务执行失败&#39;:tess-two:tess-two:ndkBuild&#39;。
处理&#39;命令&#39; / Users / giuliopettenuzzo / Library / Android / sdk / ndk-bundle / ndk-build&#39;&#39;完成非零退出值2
尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--debug选项运行以获得更多日志输出。
建立失败
Total time: 2.528 secs
Stopped 0 worker daemon(s).
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':tess-two:tess-two:ndkBuild'.] from daemon DaemonInfo{pid=19466, address=[ae62748c-dbc0-48ed-a2da-1eed52e8dfd6 port:52129, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Idle, lastBusy=1501757699726, context=DefaultDaemonContext[uid=0f9deada-80eb-4945-9840-eeb96ed44e55,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home,daemonRegistryDir=/Users/giuliopettenuzzo/.gradle/daemon,pid=19466,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=512m,-Dfile.encoding=UTF-8,-Duser.country=IT,-Duser.language=it,-Duser.variant]} (build should be done).
答案 0 :(得分:1)
make:/Users/giuliopettenuzzo/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc:找不到命令< / p>
您的NDK安装看起来不完整。