標籤:src 編譯配置 can 編譯 abi utf-8 配置 c/c++ erb
1. .project 檔案
刪除全部包括 org.eclipse.cdt首碼的xml結點元素。以下是一個包括cdt的完整編譯設定檔。
<?xml version="1.0" encoding="UTF-8"?><projectDescription><name>xapp</name><comment></comment><projects></projects><buildSpec><buildCommand><name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name><triggers></triggers><arguments></arguments></buildCommand><buildCommand><name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name><arguments></arguments></buildCommand><buildCommand><name>com.android.ide.eclipse.adt.PreCompilerBuilder</name><arguments></arguments></buildCommand><buildCommand><name>org.eclipse.jdt.core.javabuilder</name><arguments></arguments></buildCommand><buildCommand><name>com.android.ide.eclipse.adt.ApkBuilder</name><arguments></arguments></buildCommand><buildCommand><name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name><triggers>full,incremental,</triggers><arguments></arguments></buildCommand></buildSpec><natures><nature>com.android.ide.eclipse.adt.AndroidNature</nature><nature>org.eclipse.jdt.core.javanature</nature><nature>org.eclipse.cdt.core.cnature</nature><nature>org.eclipse.cdt.core.ccnature</nature><nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature><nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature></natures></projectDescription>
buildCommand。和natuve中的那些元素都要刪掉。
2. 刪掉.cproject檔案,這個檔案是C/C++編譯配置。
3. 刪掉與src/, res/同級檔案夾的jni,以及jni下的armeabi
4. 將project從工作區間中移除。然後再次匯入。
這一步非常重要,工作區間緩衝了每一個project編譯結果。僅僅有這樣上面的全部改動才幹生效。
ref : http://pilcrowpipe.blogspot.com/2011/12/removing-native-support-from-android.html
Eclipse中移除native層編譯支援