1. 程式人生 > >[筆記]如何解決Your project contains C++ files but it is not using a supported native build system

[筆記]如何解決Your project contains C++ files but it is not using a supported native build system

最近因為專案需要下載Android終端模擬器(Android-Terminal-Emulator)原始碼進行除錯編譯,編譯過程中出現報錯
Error:Execution failed for task ':libtermexec:compileReleaseNdk'. > Error: Your project contains C++ files but it is not using a supported native build system. Consider using CMake or ndk-build integration with the stable Android Gradle plugin: https://developer.android.com/studio/projects/add-native-code.html or use the experimental plugin: https://developer.android.com/studio/build/experimental-plugin.html.
頓時不知道所以然,Google以後,在stackoverflow找到解決方法, 一、在專案的gradle.properties新增 android.useDeprecatedNdk=true 二、在module的build.gradle(Module:app)buildTypes上面新增sourceSets屬性
sourceSets { main { jni.srcDirs = [] } } buildTypes{ }
最後執行gradle指令碼更新build,在編譯module即可。 這個問題主要是因為Android studio以前使用ndkCompile後來廢棄掉了,Android-Terminal-Emulator沒有最近沒有更新的緣故。具體的編譯最新的NDK編譯方式可以看官網
同行的網友也寫過解決方案

相關推薦

[筆記]如何解決Your project contains C++ files but it is not using a supported native build system

最近因為專案需要下載Android終端模擬器(Android-Terminal-Emulator)原始碼進行除錯編譯,編譯過程中出現報錯 Error:Execution failed for task ':libtermexec:compileReleaseNdk'. &

Error:Execution failed for task ':app:compileDebugNdk'. > Error: Your project contains C++ files but...

dir ++ detail cut .net log nat failed 語句 編譯so包時報錯:Error:Execution failed for task ‘:app:compileDebugNdk‘. > Error: Your project contai

Error:Execution failed for task ':app:compileDebugNdk'. > Error: Your project contains C++ files but

Error:Execution failed for task ':app:compileDebugNdk'. > Error: Your project contains C++ files but it is not using a supported native build syste

swift 報錯 Call can throw, but it is not marked with 'try' and the error is not handled

在開發中使用正則表示式時報了這樣的問題:Call can throw, but it is not marked with 'try' and the error is not handled,即: let regex:NSRegularExpression = NSRegularExpression(pa

WCF : 修復 Security settings for this service require Windows Authentication but it is not enabled for the IIS application that ho

摘要 : 最近遇到了一個奇怪的 WCF 安全配置問題, WCF Service 上面配置了Windows Authentication. IIS上也啟用了 Windows Authentication, 但是仍然出現IIS沒有啟用Windows Authentication的問題. 在網路上能查到的資料很少.

Ubuntu 16.04: How to resolve libqt5x11extras5 (>= 5.1.0) but it is not going to be installed

Issue: When you install Virtualbox 5.1 on Ubuntu 16.04, you may encounter following error: [email protected]:~/Downloads# apt install virtualbox-5.

ubuntu 14.04 install g++ 問題"g++ : Depends: g++-4.8 (>= 4.8.2-5~) but it is not going to be installe"

Ubuntu 14.04通過 sudo apt-get install g++ 出現“g++ : Depends: g++-4.8 (>= 4.8.2-5~) but it is not going to be installed”錯誤, 是因為ubuntu 14.

Android開發:編譯執行提示"Your project contains errors..."

在編譯執行時,報出‘Your project contains errors,please fix them before running your application.’的提示框 在專案圖示會有

解決eclipse中web項目出現Project facet Java version 1.8 is not supported.的問題

get 可能 efault 安裝 lips index 選擇 data- all 解決eclipse中web項目出現Project facet Java version 1.7 is not supported.的問題 這個錯誤是因為eclipse中沒有jdk1.7,把

解決Project facet Java version 6.0 is not supported

專案中的jdk1.6不支援。說明專案是其他版本jdk編譯的,在eclipse裡執行時會報版本不支援。 解決辦法: 辦法1,選中專案 Properties , 選擇 Project Facets,右擊選擇 Java , Change Version ...   &

Project facet Java version 1.8 is not supported解決記錄

一看知道是因為jdk版本不一致所導致,如何解決? 方法一:  選中專案 Properties , 選擇 Project Facets,右擊選擇 Java , Change Version   

The content of the adapter has changed but ListView did not receive a notification的解決方案

在開發過程中,使用ListView時,發現這個錯誤偶爾會出現。特別是做壓力測試的時候,不停的點選重新整理,更容易出現這個錯誤。 在網上找了一下關於這個問題的解決辦法,說的是直接備份一份資料來源,我根據

解決ListView的The content of the adapter has changed but ListView did not receive a notification崩潰問題

最近在寫一個聚合工具箱的時候,添加了滑動返回功能,使用ListView時(不要問我為啥不用recycleview,小工具嘛,主要是邏輯,頁面都是次要的),遇到如下崩潰問題 java.lang.IllegalStateException: The content of t

完美解決Your Firefox profile cannot be loaded. It may be missing or inaccessible

週一上班,進後臺看資料,無奈IE實在不好用(不知道是不是我用opera太久的緣故)所以就上卡飯去下載了lawlietfox23.01版64位的Firefox來用,剛執行就顯示 Your Firefox profile cannot be loaded. It may be

Project facet Java version 1.7 is not supported.解決方法

最近遇到這個問題,在網上查到的解決方案基本都是下面幾個: 1、右擊專案,properties,project facets,改動java的version為1.7。 2、window,properties,java,compiler,改動compiler comlian

【ASP.NET Core】解決“The required antiforgery cookie "xxx" is not present”的錯誤

view 請求 cep lec hidden 擴展方法 url builder 驗證 當你在頁面上用 form post 內容時,可能會遇到以下異常: The required antiforgery cookie "????????" is not present.

Redis錯誤:(error) MISCONF Redis is configured to save RDB snapshots, but it is currently not able...

今天執行redis命令:move key22 2 時,報如下錯誤: (error) MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Comman

Eclipse離線安裝activiti報錯,缺少jar包(requires 'org.eclipse.emf 2.6.0' but it could not be found)

eclipse安裝activiti報錯,缺少jar包。具體報錯如下: Cannot complete the install because one or more required items could not be found. Software being installed: Activi

elasticsearch6.4 memory locking requested for elasticsearch process but memory is not locked

[2018-10-18T05:28:57,713][ERROR][o.e.b.Bootstrap ] [node-45] node validation exception[1] bootstrap checks failed[1]: memory locking requested for elastics

Added View has RecyclerView as parent but view is not a real child. Unfiltered index:0

公司專案列表用的開源專案BaseRecyclerViewAdapterHelper,版本號是2.1.3 測試反饋當快速下滑載入更多時,有時會崩潰,說是歷史遺留問題,所以沒怎麼在意 但今天有一個列表在三星S6上很容易崩潰,日誌如下 java.lang.IllegalStateExcep