fresco icon indicating copy to clipboard operation
fresco copied to clipboard

FAILURE: Build failed with an exception.

Open treeseedm opened this issue 11 years ago • 10 comments

  • What went wrong: Execution failed for task ':imagepipeline:ndk_build_gifimage'.

    A problem occurred starting process 'command 'ndk-build''

treeseedm avatar Apr 01 '15 08:04 treeseedm

@treeseedm you can see #5

blackiedm avatar Apr 01 '15 08:04 blackiedm

task "ndk_build_$name"(type: Exec) { inputs.file("src/main/jni/$name") outputs.dir("$buildDir/$name") commandLine 'c:/Users/ma/Downloads/android-ndk-r10d/ndk-build', 'NDK_APPLICATION_MK=../Application.mk', 'NDK_OUT=' + temporaryDir, "NDK_LIBS_OUT=$buildDir/$name", '-C', file("src/main/jni/$name").absolutePath, '--jobs', '8' }

task "ndk_clean_$name"(type: Exec) {
    commandLine 'c:/Users/mahaifeng/Downloads/android-ndk-r10d/ndk-build',
        'NDK_APPLICATION_MK=../Application.mk',
        'NDK_OUT=' + temporaryDir,
        "NDK_LIBS_OUT=$buildDir/$name",
        '-C', file("src/main/jni/$name").absolutePath,
        'clean'
}

I config my envirment path "C:\Users\ma\Downloads\android-ndk-r10d;",

bug i get error message

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':imagepipeline:ndk_build_gifimage'.

    A problem occurred starting process 'command 'c:/Users/mahaifeng/Downloads/android-ndk-r10d/ndk-build''

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

treeseedm avatar Apr 01 '15 09:04 treeseedm

in the task "ndk_build_$name", also have commandLine 'ndk-build', you try to replace your local ndk path.

blackiedm avatar Apr 01 '15 10:04 blackiedm

task "ndk_build_$name"(type: Exec) { inputs.file("src/main/jni/$name") outputs.dir("$buildDir/$name") commandLine 'c:/Users/ma/Downloads/android-ndk-r10d/ndk-build', 'NDK_APPLICATION_MK=../Application.mk', 'NDK_OUT=' + temporaryDir, "NDK_LIBS_OUT=$buildDir/$name", '-C', file("src/main/jni/$name").absolutePath, '--jobs', '8' }

above,I have replace my local ndk path

treeseedm avatar Apr 01 '15 10:04 treeseedm

so it is seem to be work in ubuntu or mac os, may be you can discuss it in #24

blackiedm avatar Apr 01 '15 10:04 blackiedm

@blackiedm Thank you!

treeseedm avatar Apr 01 '15 10:04 treeseedm

Yes, we are aware of the fact that Fresco does not build on windows. I am trying to fix this. Closing this issue, lets follow up in https://github.com/facebook/fresco/issues/24

michalgr avatar Apr 01 '15 11:04 michalgr

i fix Execution failed for task ':imagepipeline:ndk_build_gifimage' but: Error:Execution failed for task ':imagepipeline:ndk_clean_gifimage'.

A problem occurred starting process 'command 'ndk-build''

Flywhiter avatar Apr 02 '15 12:04 Flywhiter

if i delet ndk_clean_gifimage come this: Error:Execution failed for task ':imagepipeline:downloadFiles'.

If multiple sources are provided the destination has to be a directory.

Flywhiter avatar Apr 02 '15 12:04 Flywhiter

大家可以在 imagepipeline 子项目里面的 gradle.properties 文件中得最后添加

ndk.path=/Users/XXX/Android_SDK/android-ndk-r10d

(PS:/Users/XXX/Android_SDK/android-ndk-r10d是你系统里面的NDK路径) 就可以了,不需要在 build.gradle 里面写,方便以后的修改。

我发现在Android Studio 的 1.0.1 版本上可以, 在最新的1.2里面不可以,可能和 编译器有关吧。

gdky005 avatar May 07 '15 05:05 gdky005