关于“ can not find ./obj/local/armeabi/libopencv_contrib.a: Permission denied ”问题

13 篇文章 0 订阅

I am new to Android NDK and I have to use OpenCV in Android.

I tried to ran the NDK ahead , but these errors happened. Maybe I have no permission to use the file" /obj/local/armeabi/libopencv_contrib.a",How can I get the permission? And can the next error be OK when the first error is solved? My workspace OS is Windows7.

翻译:我是一个使用Android NDK的新手,而且我必须在android上面使用OpenCV开发包。


我试图跑NDK,但下面这些错误发生。也许我没有权限来使用文件“/ obj / local / armeabi / libopencv_contrib.a。 “,我怎样才能得到许可呢?并且可以接下来的错误可以当第一个错误是解决吗?我的工作空间是操作系统Windows7。

错误:$ NDK-build

SharedLibrary : libImgFun.so D:/Android/android-ndk-r7b-windows/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libopencv_contrib.a: No such file: Permission denied

collect2: ld returned 1 exit status /cygdrive/d/Android/android-ndk-r7b-windows/android-ndk-r7b/build/core/build-binary.mk:314: recipe for target `obj/local/armeabi/libImgFun.so' failed make: *[obj/local/armeabi/libImgFun.so] Error 1

答案:

I had the same problem on Windows 7. I was able to just use chmod to set the permissions manually, and then it worked. My best guess is that this is a bug with how Cygwin, Windows, and the build process interact.

翻译:

我有相同的问题在Windows 7。我可以只使用chmod来手动设置权限,然后它的工作。我最好的猜测是,这是一个bug与Cygwin,Windows,构建过程交互。

  • Open a console window
  • > bash
  • > cd /cygdrive/<driveletter>/<wherever your project is>/obj/local/armeabi
  • > chmod 777 ./*

  • 翻译:打开Cygwin
  • 输入:cd /cygdrive/放工程文件的盘符/工程文件目录/obj/local/armeabi
  • 输入:chmod 777 ./*
  • (注:上面的错误的结果是没有生成libs文件,但生成了obj文件,因此改这个错误的时候obj不要删)
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值