Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows os How to build? #24

Closed
PmtPrt opened this issue Mar 28, 2015 · 42 comments
Closed

Windows os How to build? #24

PmtPrt opened this issue Mar 28, 2015 · 42 comments
Assignees
Labels

Comments

@PmtPrt
Copy link

PmtPrt commented Mar 28, 2015

My Environment

  • os : WIndows 7 Ultimake
  • SET ANDROID_HOME=C:\android-sdk-windows
  • SET PATH=C:\android-ndk-r10d;%PATH%

Run

  • gradlew build

Result

FAILURE: Build failed with an exception.

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

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

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

BUILD FAILED

....... ㅜ.ㅡ

Retry

  • gradlew build -- stacktrace

Result

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

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

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':imagepipeline:ndk_build_gifimage'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
...

@HarlonWang
Copy link

I have same problem ,Did you solved it ?

@MarkMjw
Copy link

MarkMjw commented Mar 30, 2015

#5 maybe resolve this, but i failed in windows.

@appledong
Copy link

I have same problem ,Did you solved it ?

@michalgr
Copy link
Contributor

Thanks for reporting!

Could you check if replacing "ndk-build" with "C:\android-ndk-r10d\ndk-build.cmd" in imagepipeline/build.gradle resolves the issue ?

If no, can you cd to imagepipeline directory and see if there is anything suspicious in the output of following command:
C:\android-ndk-r10d\ndk-build.cmd NDK_APPLICATION_MK=../Application.mk NDK_OUT=build NDK_LIBS_OUT=build -C src/main/jni/gifimage
There are couple of hardcoded "/" in the build script, I wonder if replacing them with "" solves the issue.

@michalgr michalgr self-assigned this Mar 30, 2015
@tyronen
Copy link
Contributor

tyronen commented Mar 30, 2015

Also, the Android NDK on Windows requires that Cygwin 1.7 or later be installed. When using the Cygwin installer, make sure that the 'devel' tree is installed - by default, it isn't.

@hyvenzhu
Copy link

:imagepipeline:ndk_build_gifimage FAILED

FAILURE: Build failed with an exception.

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

    A problem occurred starting process 'command 'D:/Android/software/android-ndk-
    r5b/ndk-build''

This error also accured when I build it, so did anyone have solved it?

@hyvenzhu
Copy link

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':imagepi
    peline:ndk_build_gifimage'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
    ecuteActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
    ecute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExec
    uter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.exec
    ute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execut
    e(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecu
    ter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter
    .execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execut
    e(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter
    .execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailur
    e(AbstractTask.java:305)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
    orker.executeTask(AbstractTaskPlanExecutor.java:79)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
    orker.processTask(AbstractTaskPlanExecutor.java:63)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
    orker.run(AbstractTaskPlanExecutor.java:51)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(Defaul
    tTaskPlanExecutor.java:23)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(Defau
    ltTaskGraphExecuter.java:88)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTask
    ExecutionAction.java:29)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
    r.java:62)
    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExec
    uter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecu
    ter.java:68)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildEx
    ecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
    r.java:62)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
    r.java:55)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default
    GradleLauncher.java:149)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle
    Launcher.java:106)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun
    cher.java:86)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildCon
    troller.run(InProcessBuildActionExecuter.java:80)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav
    a:33)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav
    a:24)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
    ssBuildActionExecuter.java:36)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
    ssBuildActionExecuter.java:26)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.jav
    a:171)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
    execute(CommandLineActionFactory.java:237)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
    execute(CommandLineActionFactory.java:210)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti
    meValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti
    meValidationAction.java:24)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
    CommandLineActionFactory.java:206)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
    CommandLineActionFactory.java:169)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep
    ortingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep
    ortingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBoots
    trap.java:54)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.j
    ava:35)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.ja
    va:33)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
    Caused by: org.gradle.process.internal.ExecException: A problem occurred startin
    g process 'command 'ndk-build''
    at org.gradle.process.internal.DefaultExecHandle.setEndStateInfo(Default
    ExecHandle.java:196)
    at org.gradle.process.internal.DefaultExecHandle.failed(DefaultExecHandl
    e.java:325)
    at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.jav
    a:83)
    at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecut
    orImpl$1.run(DefaultExecutorFactory.java:64)
    Caused by: net.rubygrapefruit.platform.NativeException: Could not start 'ndk-bui
    ld'
    at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(Def
    aultProcessLauncher.java:27)
    at net.rubygrapefruit.platform.internal.WindowsProcessLauncher.start(Win
    dowsProcessLauncher.java:22)
    at net.rubygrapefruit.platform.internal.WrapperProcessLauncher.start(Wra
    pperProcessLauncher.java:36)
    at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.jav
    a:65)
    ... 1 more
    Caused by: java.io.IOException: Cannot run program "ndk-build" (in directory "D:
    \Android\源码相关\fresco\imagepipeline"): CreateProcess error=2, ?????????
    at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(Def
    aultProcessLauncher.java:25)
    ... 4 more
    Caused by: java.io.IOException: CreateProcess error=2, ?????????
    ... 5 more

It is the whole stacktrace, please help me

@BaronZ
Copy link

BaronZ commented Apr 1, 2015

anybody solved this problem?

@Flywhiter
Copy link

I have same problem:
Error:Execution failed for task ':imagepipeline:ndk_build_gifimage'.

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

@treeseedm
Copy link

anybody solved this problem?

@tyronen
Copy link
Contributor

tyronen commented Apr 1, 2015

The ndk-build command is supposed to get NDK_PROJECT_PATH from the NDK_APPLICATION_MK passed in on the command line, but for some reason this does not seem to work on Windows.

@lgengsy
Copy link

lgengsy commented Apr 1, 2015

got it

@treeseedm
Copy link

@lgengsy How to solve?

@qiaodi
Copy link

qiaodi commented Apr 2, 2015

I have same problem.how to solve.....!

@ljnalex
Copy link

ljnalex commented Apr 3, 2015

Is already solve?

@tyronen
Copy link
Contributor

tyronen commented Apr 3, 2015

Hi, note for everybody:

We understand people are frustrated that there are multiple issues with the Windows build. We take responsibility for it - as you might have guessed, our team develops on Mac OS and Linux and missed Windows. We are committed to making it work on all three.

Our office is closed for the Easter weekend right now but we will be back on Tuesday and will fix this as soon as we can.

@tyronen tyronen mentioned this issue Apr 3, 2015
@plamenko
Copy link
Contributor

plamenko commented Apr 3, 2015

Stay tuned, I think @michalgr got windows build working. We'll update gradle files and provide how-to instructions on Tuesday.

@tbarthel-fr
Copy link
Contributor

For those who would like to build the project before the official update on Tuesday, here is a quick fix that works for me :

tbarthel-fr@c1ba14b

It relies on com.android.library to find ndk-dir, so be sure that ndk.dir='my-ndk-path' is set in fresco/local.properties.

Happy Easter =)

@yuzhuguan
Copy link

@tbarthel-fr thanks , it's work

@jalpesh
Copy link

jalpesh commented Apr 6, 2015

@tbarthel-fr Confirmed, it works :)

@JoysonF
Copy link

JoysonF commented Apr 6, 2015

I am using Ubuntu ,
I have set the Path variables using the following commands
export NDK=~/home/joysonf/android_ndk/android-ndk-r10d
.But when i Build the project i still get the same error
Error:Execution failed for task ':imagepipeline:ndk_build_gifimage'.

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

@jalpesh
Copy link

jalpesh commented Apr 6, 2015

Hey @JoysonF , I managed to compile it in ubuntu by hardcoing the entire path to the ndk dir in the build.gradle file. TIP : Do not use ~, use /home/username path.
Worked for me. I know not the best way, but this worked for me as a temp solution until I figure out a better way. Let me know if it works for you.

So in gradle.build under imagepipeline folder,
change script to "commandLine '/home/YourUname/NDK_Dir_Path/ndk-build'," for both of ndk-build options

@JoysonF
Copy link

JoysonF commented Apr 6, 2015

@jalpesh , Thanks for your quick reply.
I have set the following path in build.gradle (imagepipeline) :
ndk.dir=/home/joysonf/android_ndk/android-ndk-r10d
But when i build the project it still gives the above error.

@jalpesh
Copy link

jalpesh commented Apr 6, 2015

Hey @JoysonF , Not sure where did you make your change. Here is my gradle.build file

def makeNdkTasks(String name) {
task "ndk_build_$name"(type: Exec) {
    println "Printing name here "
    println "[$name]"
    inputs.file("src/main/jni/$name")
    outputs.dir("$buildDir/$name")
commandLine '/home/jjr/ndk/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) {
    println "Printing name here 2"
    println "[$name]"
    //commandLine 'ndk-build',
//commandLine '/home/jjr/mounter/android-ndk-r10d/ndk-build',
commandLine '/home/jjr/ndk/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'
}

@JoysonF
Copy link

JoysonF commented Apr 6, 2015

@jalpesh , Thanks Mate.It works.

@ljnalex
Copy link

ljnalex commented Apr 6, 2015

@jalpesh ,Thanks, it works

@plamenko
Copy link
Contributor

plamenko commented Apr 6, 2015

We should create a separate issue for linux

@qiaodi
Copy link

qiaodi commented Apr 7, 2015

yes,its worked in win7
"
task "ndk_build_$name"(type: Exec) {
println "Printing name here "
println "[$name]"
inputs.file("src/main/jni/$name")
outputs.dir("$buildDir/$name")
commandLine 'C:\Work_Enviorment\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) {
    println "Printing name here 2"
    println "[$name]"
    //commandLine 'ndk-build',

//commandLine '/home/jjr/mounter/android-ndk-r10d/ndk-build',
commandLine 'C:\Work_Enviorment\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'
}
"

@treeseedm
Copy link

it work, but I have another question
https://chromium.googlesource.com/webm/libwebp ,this url Forbidden

@skylerlee
Copy link

@treeseedm , maybe you can clone from this mirror https://github.com/webmproject/libwebp/

@treeseedm
Copy link

a lot of problem on windows os,too much troubles

@ICECHN
Copy link

ICECHN commented Apr 7, 2015

FAILED,help, help。。。
def makeNdkTasks(String name) {
task "ndk_build_$name"(type: Exec) {
println "Printing name here "
println "[$name]"
inputs.file("src/main/jni/$name")
outputs.dir("$buildDir/$name")
commandLine 'D:\work\android\android-ndk-r10c\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) {
    println "Printing name here 2"
    println "[$name]"
    commandLine 'D:\\work\\android\\android-ndk-r10c\\ndk-build',
        'NDK_APPLICATION_MK=../Application.mk',
        'NDK_OUT=' + temporaryDir,
        "NDK_LIBS_OUT=$buildDir/$name",
        '-C', file("src/main/jni/$name").absolutePath,
        'clean'
}

tasks.withType(JavaCompile) {
    compileTask -> compileTask.dependsOn "ndk_build_$name"
}
clean.dependsOn "ndk_clean_$name"

}

@tyronen
Copy link
Contributor

tyronen commented Apr 7, 2015

Sync to head and you should now be able to build on Windows.

Please file a new issue if any other problems appear.

@tyronen tyronen closed this as completed Apr 7, 2015
@MarkMjw
Copy link

MarkMjw commented May 6, 2015

可能是有重复的jar被引用,查看dependencies和libs是否有重复引入的.jar包,同时看向版本是否一致。

Date: Tue, 5 May 2015 08:14:26 -0700
From: notifications@github.com
To: fresco@noreply.github.com
CC: xiangmao6@hotmail.com
Subject: Re: [fresco] Windows os How to build? (#24)

I have in trouble when I build app

Error:Execution failed for task ':app:dexDebug'.

com.android.ide.common.internal.LoggedErrorException: Failed to run command:
E:\android-sdk\build-tools\22.0.1\dx.bat --dex --output E:\bysj\WifiProject-AS\WifiProject\app\build\intermediates\dex\debug --input-list=E:\bysj\WifiProject-AS\WifiProject\app\build\intermediates\tmp\dex\debug\inputList.txt
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)


Reply to this email directly or view it on GitHub.

@hanks-zyh
Copy link

@MarkMjw dependencies and libs, any suggestion

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.orhanobut:logger:1.8'
    compile 'io.reactivex:rxandroid:0.24.0'
    compile 'com.android.support:recyclerview-v7:21.0.0'
//    compile 'com.facebook.fresco:fresco:0.3.0+'
}

qq 20150507000040

@Flywhiter
Copy link

i have fix this来自我的华为手机-------- 原始邮件 --------主题:Re: [fresco] Windows os How to build? (#24)发件人:Mjw 收件人:facebook/fresco 抄送:Flywhiter 可能是有重复的jar被引用,查看dependencies和libs是否有重复引入的.jar包,同时看向版本是否一致。

Date: Tue, 5 May 2015 08:14:26 -0700

From: notifications@github.com

To: fresco@noreply.github.com

CC: xiangmao6@hotmail.com

Subject: Re: [fresco] Windows os How to build? (#24)

I have in trouble when I build app

Error:Execution failed for task ':app:dexDebug'.

com.android.ide.common.internal.LoggedErrorException: Failed to run command:
E:\android-sdk\build-tools\22.0.1\dx.bat --dex --output E:\bysj\WifiProject-AS\WifiProject\app\build\intermediates\dex\debug --input-list=E:\bysj\WifiProject-AS\WifiProject\app\build\intermediates\tmp\dex\debug\inputList.txt
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)

Reply to this email directly or view it on GitHub.

—Reply to this email directly or view it on GitHub.

@MarkMjw
Copy link

MarkMjw commented May 7, 2015

@Flywhiter has fixed this problem, @hanks-zyh you can discuss with he.

@hanks-zyh
Copy link

@MarkMjw Thanks, the reason of the problem is that some _.jar conflict with fresco .
I solved it by remove /libs/_.jar ,and add in dependencies

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.orhanobut:logger:1.8'
    compile 'io.reactivex:rxandroid:0.24.0'
    compile "com.android.support:appcompat-v7:22.+"
    compile 'com.android.support:support-v13:21.+'
    compile 'com.android.support:support-v4:22.+'
    compile 'com.android.support:palette-v7:+'
    compile 'com.android.support:recyclerview-v7:+'
    compile 'com.android.support:cardview-v7:21.0.+'
    compile 'com.facebook.rebound:rebound:0.3.7'
    compile 'com.facebook.fresco:fresco:0.3.0+'
}

@klob
Copy link

klob commented Sep 15, 2015

I think it is due to windows NDK have file named “ndk-build.cmd ” and file named "ndk-build" which may make Android Studio confused.So I make following changes and it works.

def getNdkBuildFullPath() {
return 'E:/SDK/android-ndk-r10e/ndk-build.cmd'
// we allow to provide full path to ndk-build tool
if (hasProperty('ndk.command')) {
    return property('ndk.command')
}
// or just a path to the containing directiry
if (hasProperty('ndk.path')) {
    def path = property('ndk.path')
    if (!path.endsWith(File.separator)) {
        path += File.separator
    }
    return path + getNdkBuildName()
    }
// if none of above is provided, we assume ndk-build is already in $PATH

return getNdkBuildName()
}

image

@hellopenggao
Copy link

@klob your way is ok ,thanx~~

@srajesh529
Copy link

all solutions are tried but no use for me,getting the error like

Error:Execution failed for task ':imagepipeline:ndk_build_bitmaps'.

A problem occurred starting process 'command 'E:/softwares/android-ndk-r10d/ndk-build''

How to build the fesco library?

@Qamar4P
Copy link

Qamar4P commented Apr 28, 2016

Solution for build errors like Error:Execution failed for task ':imagepipeline:ndk_build_bitmaps'
also found in animated-webp & animated-gif
You need to open there Module build.gradle and relpace commandLine getNdkBuildFullPath(), with commandLine "D:\\Android\\sdk\\ndk-bundle\\ndk-build.cmd", absolute Path.

@hearsilent hearsilent mentioned this issue Jun 11, 2018
4 tasks
facebook-github-bot pushed a commit that referenced this issue Jun 21, 2018
Summary:
Thanks for submitting a PR! Please read these instructions carefully:

- [x] Explain the **motivation** for making this change.
- [x] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch

What existing problem does the pull request solve?

Fix build failed occurred by ndk settings ([Application.mk](https://developer.android.com/ndk/guides/application_mk))
Remove armeabi support (Remove from NDK r17)

```
> Task :imagepipeline:ndk_build_bitmaps FAILED
A problem was found with the configuration of task ':imagepipeline:ndk_build_bitmaps'. Registering invalid inputs and outputs via TaskInputs and TaskOutputs methods has been deprecated and is scheduled to be removed in Gradle 5.0.
 - File '.../fresco/imagepipeline/src/main/jni/bitmaps' specified for property '$1' is not a file.
Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-14.
Android NDK: WARNING: APP_STL gnustl_static is deprecated and will be removed in the next release. Please switch to either c++_static or c++_shared. See https://developer.android.com/ndk/guides/cpp-support.html for more information.
Android NDK: The armeabi ABI is no longer supported. Use armeabi-v7a.
.../Android/sdk/ndk-bundle/build/core/setup-app.mk:79: *** Android NDK: Aborting    Android NDK: NDK Application 'local' targets unknown ABI(s): armeabi
.  Stop.
Android NDK: Please fix the APP_ABI definition in ../Application.mk
make: Entering directory `.../fresco/imagepipeline/src/main/jni/bitmaps'
make: Leaving directory `.../fresco/imagepipeline/src/main/jni/bitmaps'
```

Relative issue: #24 #163 #286 #513 #591 #618 #938 #989 #1114 #1205 #1226 #1427 #1945

A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website. See [What is a Test Plan?][1] to learn more.

If you have added code that should be tested, add tests.

Build with NDK r17b
<img width="677" alt="2018-06-15 11 00 00" src="https://user-images.githubusercontent.com/5742579/41448216-de9ac710-708b-11e8-865c-70ac85459d5c.png">

Sign the [CLA][2], if you haven't already.

Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

Make sure all **tests pass** on [Circle CI][4]. PRs that break tests are unlikely to be merged.

For more info, see the [Contributing guide][4].

[1]: https://medium.com/martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
[2]: https://code.facebook.com/cla
[3]: http://circleci.com/gh/facebook/fresco
[4]: https://github.com/facebook/fresco/blob/master/CONTRIBUTING.md
Closes #2134

Reviewed By: erikandre

Differential Revision: D8441064

Pulled By: oprisnik

fbshipit-source-id: 6484f7714d738c9984c273a3e0513e31f730ff30
@ramonqlee ramonqlee mentioned this issue Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests