如何更改内置的C / C ++的路径指向一个已删除的Andr​​oid NDK-R9安装?路径、如何更改、Andr、NDK

由网友(你眼里有小星星)分享简介:我最近升级我的NDK从Android的NDK-R9到Android的NDK-R10(r10d要准确)。 Eclipse是4.4月神(月神服务版本1(4.4.1);建立ID:20140925-1800)。 Eclipse正在完全修补了其释放。我更新了所有的Eclipse插件(包括ADT),因此它们完全修补。我也改变了我的...

我最近升级我的NDK从Android的NDK-R9到Android的NDK-R10(r10d要准确)。 Eclipse是4.4月神(月神服务版本1(4.4.1);建立ID:20140925-1800)。 Eclipse正在完全修补了其释放。我更新了所有的Eclipse插件(包括ADT),因此它们完全修补。我也改变了我的 ANDROID_NDK_ROOT 的.bash_profile 指向新的NDK目录。

在Eclipse preferences→的Andr​​oid NDK→,Eclipse正在呈现出新的Andr​​oid NDK-R10路径(我不得不手动设置)。

根据项目属性→C / C ++常规→路径和符号,Eclipse中仍呈现旧的Andr​​oid NDK-R9的路径。

的Eclipse认为内置的路径,并取消选中的显示内置值的复选框,使所有的路径消失。此外,编辑... 的按钮是灰色的。

我grepped以下目录,我无法找到字符串的的Andr​​oid NDK-R9的:

在我的Eclipse工作区 〜/ .eclipse 在该项目的目录 〜/库 /应用/ Eclipse中 的/ etc OS X的计算机上 /库 OS X的计算机上

该项目构建的罚款。坏的配置仅仅是创建数百个错误,在列表中的问题标签的。 (要复制,您需要打开一个C或C ++文件):

在哪里设置从何而来呢?而且我怎么改变呢?

这似乎是相关的:如何在Eclipse CDT项目编译的Linux后删除自动发现的路径?但我无法找到的搜索选项→清除发现的条目现在的(这似乎是一个Eclipse的3.x的功能)。同上,用于 Eclipse CDT的无效项目路径。

这似乎是Eclipse的bug报告涵盖了问题:包括路径发现没有按T放弃对编译器的升级过时的路径。

解决方案   

在哪里设置来自何处?

它显示的信息是在项目的 PATHINFO 文件中。下面,该项目是一个叫AndroidPrng样本JNI的项目。

  $猫/Users/jww/Eclipse/.metadata/.plugins/com.android.ide.eclipse.ndk/AndroidPrng.pathInfo
T,1421045575000
我为/ opt / Android的NDK-R9 /来源/ CXX-STL / STLport的/ STLport的
我是/ usr /本地/ cryptopp / Android的armeabi /包括
我为/ opt / Android的NDK-R9 /来源/ CXX-STL /系统/包括
我是/ usr /本地/ cryptopp / Android的armeabi /有/ cryptopp
我,JNI
我为/ opt / Android的NDK-R9 /平台/ Android为14 /弓臂/ usr / include目录
我是/ usr /本地/ cryptopp / Android系统的x86 /包括
我是/ usr /本地/ cryptopp / Android系统的x86 /有/ cryptopp
我为/ opt / Android的NDK-R9 /平台/ Android为14 /拱86 / usr / include目录
我是/ usr /本地/ cryptopp / Android的MIPS /包括
我是/ usr /本地/ cryptopp / Android的MIPS /有/ cryptopp
我是/ usr /本地/ cryptopp / Android的armeabi-V7A /包括
我是/ usr /本地/ cryptopp / Android的armeabi-V7A /有/ cryptopp
i,/opt/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/$p$pbuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.6/include
i,/opt/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/$p$pbuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.6/include-fixed
我为/ opt / Android的NDK-R9 /平台/ Android为14 /拱MIPS / usr / include目录
研发,__ __ STDC,1
研发,__ INT64_MAX __,9223372036854775807LL
研发,__ LDBL_HAS_QUIET_NAN __,1
研发,__ WINT_TYPE __,无符号整型
研发,__ ORDER_LITTLE_ENDIAN __,1234
研发,__ DEC64_MAX_EXP __,385
研发,__ UINT_LEAST32_TYPE __,无符号整型
研发,__ UINT_FAST64_TYPE __,长长的无符号整数
研发,__ GXX_WEAK __,1
...
 

  

我grepped下列目录... 我的Eclipse工作区,〜/ .eclipse, ...

有这里两个问题。首先,该项目位于我的桌面上,而不是我的工作区目录。第二,在 org.eclipse.cdt.ui 100的日志文件条目淹没了条目 com.android.ide 15项。 eclipse.ndk

那么,你的grep之前,执行:

  RM用户/ JWW / Eclipse中/ .metadata / .plugins / org.eclipse.cdt.ui / *。日志
 

这会产生管理grep的结果。

  

和我怎么改变呢?

练习留给读者

您可以手动编辑;或者你可以删除它,Eclipse将重新创建与新的NDK相关的路径。

I recently upgraded my NDK from android-ndk-r9 to android-ndk-r10 (r10d to be exact). Eclipse is 4.4 Luna (Luna Service Release 1 (4.4.1); Build id: 20140925-1800). Eclipse is fully patched for its release. I updated all the Eclipse plugins (including ADT) so they are fully patched. And I also changed my ANDROID_NDK_ROOT in .bash_profile to point to the new NDK directory.

Under the Eclipse Preferences → Android → NDK, Eclipse is showing the new android-ndk-r10 path (I had to set it manually).

Under the Project Properties → C/C++ General → Paths and Symbols, Eclipse is still showing the old android-ndk-r9 path.

Eclipse considers the path built-in, and unchecking the Show built-in values check box makes all the paths disappear. In addition, the Edit... button is greyed out.

I've grepped the following directories, and I cannot find the string "android-ndk-r9":

My Eclipse workspace ~/.eclipse The project's directory ~/Library /Application/Eclipse /etc on the OS X machine /Library on the OS X machine

The project builds fine. The bad configuration just creates hundreds of errors in the list on the Problems tab. (To duplicate, you need to open a C or C++ file):

Where is the setting coming from? And how do I change it?

This appears to be related: How to remove auto-discovered paths after compiling on Linux from Eclipse CDT project?. But I can't find Discovery Options → Clear discovery entries now (it appears to be a Eclipse 3.x feature). Ditto for Eclipse CDT Invalid Project Path.

This appears to be the Eclipse bug report covering the issue: Include path discovery doesn't discard obsolete paths on compiler upgrade.

解决方案

Where is the setting coming from?

It appears the information is held in the project's pathInfo file. Below, the project is a sample JNI project called AndroidPrng.

$ cat /Users/jww/Eclipse/.metadata/.plugins/com.android.ide.eclipse.ndk/AndroidPrng.pathInfo 
t,1421045575000
i,/opt/android-ndk-r9/sources/cxx-stl/stlport/stlport
i,/usr/local/cryptopp/android-armeabi/include
i,/opt/android-ndk-r9/sources/cxx-stl/system/include
i,/usr/local/cryptopp/android-armeabi/include/cryptopp
i,jni
i,/opt/android-ndk-r9/platforms/android-14/arch-arm/usr/include
i,/usr/local/cryptopp/android-x86/include
i,/usr/local/cryptopp/android-x86/include/cryptopp
i,/opt/android-ndk-r9/platforms/android-14/arch-x86/usr/include
i,/usr/local/cryptopp/android-mips/include
i,/usr/local/cryptopp/android-mips/include/cryptopp
i,/usr/local/cryptopp/android-armeabi-v7a/include
i,/usr/local/cryptopp/android-armeabi-v7a/include/cryptopp
i,/opt/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.6/include
i,/opt/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.6/include-fixed
i,/opt/android-ndk-r9/platforms/android-14/arch-mips/usr/include
d,__STDC__,1
d,__INT64_MAX__,9223372036854775807LL
d,__LDBL_HAS_QUIET_NAN__,1
d,__WINT_TYPE__,unsigned int
d,__ORDER_LITTLE_ENDIAN__,1234
d,__DEC64_MAX_EXP__,385
d,__UINT_LEAST32_TYPE__,unsigned int
d,__UINT_FAST64_TYPE__,long long unsigned int
d,__GXX_WEAK__,1
...

I've grepped the following directories ... "My Eclipse workspace, ~/.eclipse, " ...

There were two problems here. First, the project is located on my desktop, and not my workspace directory. Second, the 100's of entries in the log files under org.eclipse.cdt.ui drowned out the entries 15 entries for com.android.ide.eclipse.ndk.

So, before you grep, perform:

rm Users/jww/Eclipse/.metadata/.plugins/org.eclipse.cdt.ui/*.log

That will produce manageable grep results.

And how do I change it?

Exercise left to the reader.

You can edit by hand; or you can delete it and Eclipse will recreate it with the new NDK-related paths.

阅读全文

相关推荐

最新文章