Comments (42)
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.
from fresco.
I have same problem ,Did you solved it ?
from fresco.
#5 maybe resolve this, but i failed in windows.
from fresco.
I have same problem ,Did you solved it ?
from fresco.
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.
from fresco.
: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?
from fresco.
- 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
from fresco.
anybody solved this problem?
from fresco.
I have same problem:
Error:Execution failed for task ':imagepipeline:ndk_build_gifimage'.
A problem occurred starting process 'command 'ndk-build''
from fresco.
anybody solved this problem?
from fresco.
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.
from fresco.
got it
from fresco.
@lgengsy How to solve?
from fresco.
I have same problem.how to solve.....!
from fresco.
Is already solve?
from fresco.
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.
from fresco.
Stay tuned, I think @michalgr got windows build working. We'll update gradle files and provide how-to instructions on Tuesday.
from fresco.
For those who would like to build the project before the official update on Tuesday, here is a quick fix that works for me :
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 =)
from fresco.
@tbarthel-fr thanks , it's work
from fresco.
@tbarthel-fr Confirmed, it works :)
from fresco.
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''
from fresco.
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
from fresco.
@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.
from fresco.
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'
}
from fresco.
@jalpesh , Thanks Mate.It works.
from fresco.
@jalpesh ,Thanks, it works
from fresco.
We should create a separate issue for linux
from fresco.
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'
}
"
from fresco.
it work, but I have another question
https://chromium.googlesource.com/webm/libwebp ,this url Forbidden
from fresco.
@treeseedm , maybe you can clone from this mirror https://github.com/webmproject/libwebp/
from fresco.
a lot of problem on windows os,too much troubles
from fresco.
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"
}
from fresco.
Sync to head and you should now be able to build on Windows.
Please file a new issue if any other problems appear.
from fresco.
可能是有重复的jar被引用,查看dependencies和libs是否有重复引入的.jar包,同时看向版本是否一致。
Date: Tue, 5 May 2015 08:14:26 -0700
From: [email protected]
To: [email protected]
CC: [email protected]
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.
from fresco.
@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+'
}
from fresco.
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: [email protected]
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.
from fresco.
@Flywhiter has fixed this problem, @hanks-zyh you can discuss with he.
from fresco.
@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+'
}
from fresco.
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()
}
from fresco.
@klob your way is ok ,thanx~~
from fresco.
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?
from fresco.
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.
from fresco.
Related Issues (20)
- While updating app from playstore the images not displaying properly HOT 2
- In the document, the Korean link has been cracked to some Ad link. HOT 2
- fetchWithRequest Override
- there has a memory leak, AndroidProfile tools tips me that "mCallerContext in com.facebook.imagepipeline.cache.BitmapMemoryCacheKey"。 HOT 3
- Fresco Unsatisfied Link Error
- IllegalStateException
- when update 3.1.0 Building error:Failed to transform vito-options-3.1.0.aar HOT 2
- Libwebp v1.0.0 存在CVE-2023-4863漏洞 HOT 7
- 3.1.1 Exception loading animated gif HOT 2
- GIFs do not load on v3.1.3 HOT 3
- Bug: Crash on MIUI 14.0.5 HOT 1
- React Native app crashes on startup with fresco version 3.1.3 HOT 11
- java.lang.ClassNotFoundException: Didn't find class "com.facebook.imagepipeline.nativecode.NativeJpegTranscoderFactory"
- Fresco is dying. HOT 1
- too many gifs in recyclerview
- How to get free hard cap?
- error initializing Fresco HOT 1
- Can't render high quality images in react-native because of Fresco
- Picture just get "blown-up" when I use RoundingParams to get a rounded corner picture
- use contentResolver.loadThumbnail to speed up loading video
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fresco.