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
答案:
up vote |
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不要刪)
|