我在这个问题上已经一周了。我无法解决问题,请帮助我!
我按照指南(https://github.com/renard314/textfairy#building-with-gradle)中的所有步骤进行了10次操作,但仍然遇到相同的错误。
在网络上,我发现很多人都遇到了这个问题,我尝试了所有解决方案,但是仍然无法正常工作。
我有一台MacBook ProInformation: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'.
进程'command'/ Users / giuliopettenuzzo / Library / Android / sdk / ndk-bundle / ndk-build''的退出值非零
当我尝试执行此命令时,这是我看到的信息:Initialized native services in: /Users/giuliopettenuzzo/.gradle/nativeFound 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.cmake: /Users/giuliopettenuzzo/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc: Command not foundmake: *** [/Users/giuliopettenuzzo/AndroidStudioProjects/textfairy/tess-two/tess-two/obj/local/armeabi-v7a/objs/lept/src/src/adaptmap.o] Error 127make: *** Waiting for unfinished jobs....[armeabi-v7a] Compile : lept <= affine.cmake: /Users/giuliopettenuzzo/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc: Command not foundmake: *** [/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.cmake: /Users/giuliopettenuzzo/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc: Command not foundmake: *** [/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.
失败:构建失败,发生异常。
什么地方出了错:
任务':tess-two:tess-two:ndkBuild'的执行失败。
进程'command'/ Users / giuliopettenuzzo / Library / Android / sdk / ndk-bundle / ndk-build''的退出值非零
尝试:
使用--stacktrace选项运行以获取堆栈跟踪。使用--debug选项运行,以获取更多日志输出。
建立失败Total time: 2.528 secsStopped 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).
最佳答案
制作:/Users/giuliopettenuzzo/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc:找不到命令
看起来您的NDK安装不完整。