"ndk-build finish with non-zero exit value 2" 正在编译 textfairy 项目
"ndk-build finish with non-zero exit value 2" while compiling textfairy project
我关注这个问题一周了。我无法解决,请帮助我!
我按照指南 (https://github.com/renard314/textfairy#building-with-gradle) 中的所有步骤进行了大约 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'.
进程 'command '/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.
失败:构建失败,出现异常。
出了什么问题:
任务“:tess-two:tess-two:ndkBuild”执行失败。
Process 'command '/Users/giuliopettenuzzo/Library/Android/sdk/ndk-bundle/ndk-build'' finished with non-zero exit value 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).
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
看来您的 NDK 安装不完整。
我关注这个问题一周了。我无法解决,请帮助我! 我按照指南 (https://github.com/renard314/textfairy#building-with-gradle) 中的所有步骤进行了大约 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'.
进程 'command '/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.
失败:构建失败,出现异常。
出了什么问题: 任务“:tess-two:tess-two:ndkBuild”执行失败。
Process 'command '/Users/giuliopettenuzzo/Library/Android/sdk/ndk-bundle/ndk-build'' finished with non-zero exit value 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).
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
看来您的 NDK 安装不完整。