Android Studio Linking an external C++ project 时候 报Invalid file name. Expected: CMakeLists.txt
Android Studio 右键Linking an external C++ project 时候
报Invalid file name. Expected: CMakeLists.txt错误
查看Android Studio 源码:
@Nullable
private String validateProjectFilePath(@NotNull File file) {
if (!file.exists()) {
return "The selected file does not exist";
}
if (myBuildSystemCombo.getSelectedItem() == BuildSystem.CMAKE && !file.getName().equals("CMakeLists.txt")) {
return "Invalid file name. Expected: CMakeLists.txt";
}
else if (myBuildSystemCombo.getSelectedItem() == BuildSystem.NDK_BUILD && !FileUtilRt.extensionEquals(file.getPath(), "mk")) {
return "Invalid file extension. Expected: .mk";
}
return null;
}
发现是选择条目必须是BuildSystem.CMAKE,也就是必须选择路径,如果直接复制粘贴的路径,就会提示错误。
解决方案:
一步步选择CmakeLists.txt路径即可,不要直接粘贴CmakeLists.txt的路径就不会出现这个错误.
Android Studio Linking an external C++ project 时候 报Invalid file name. Expected: CMakeLists.txt的更多相关文章
- 错误异常 (1)Android Studio错误提示:Gradle project sync failed. Basic functionality (eg. editing, debugging) will not work properly
[已解决]Android Studio错误提示:Gradle project sync failed. Basic functionality (eg. editing, debugging) wil ...
- Android Studio导入github下载的project和module
前言:我们以前eclispe时代, 经常都是跑到github浏览第三方开源资源,然后下载下来,运行一下sample之类的,学习没有接触的第三方安卓库,但是到了Android Studio,在githu ...
- Android Studio错误提示:Gradle project sync failed. Basic functionality (eg. editing, debugging) will not work properly
Android Studio中出现提示: Gradle project sync failed. Basic functionality (eg. editing, debugging) will n ...
- Android Studio怎样加入工程(project)为library(针对非gradle)
这篇文章还是针对非gradle build的project,gradle build有一些区别.在Eclipse要引用别的project为本project的library非常easy,可是在Andro ...
- Android Studio卡在refreshing gradle project的原因和快速解决办法
Android Studio更新后一直Refreshing的解决办法! 这个问题遇到过很多次,网上也有很多解决办法,但是好像都没有发现refreshing gradle project在做什么. 一般 ...
- [转载]Android Studio卡在refreshing gradle project的原因和快速解决办法
转载请注明出处:http://blog.csdn.net/u013005791/article/details/60143750 这个问题遇到过很多次,网上也有很多解决办法,但是好像都没有发现refr ...
- Android studio打开之后 cannot load project: java.lang.NUllpointerException
参考来源:http://bbs.csdn.net/topics/391014393 关闭网络,重新打开Android studio就好了.(但是原因不清楚是为什么?) Internal error. ...
- Android Studio设置自己主动编project
在Eclipse自己主动编译兄弟习惯,刚搬到Android Studio.当然,错过这个功能,自己主动编译每次执行意味着更短的时间. Android Studio里面事实上也是有自己主动编译功能的,只 ...
- Android Studio: Failed to sync Gradle project 'xxx' Error:Unable to start the daemon process: could not reserve enough space for object heap.
创建项目的时候报错: Failed to sync Gradle project 'xxx' Error:Unable to start the daemon process: could not r ...
随机推荐
- 【Nutch2.2.1基础教程之1】nutch相关异常
1.在任务一开始运行,注入Url时即出现以下错误. InjectorJob: Injecting urlDir: urls InjectorJob: Using class org.apache.go ...
- java 编码转换
在网络中爬取到的数据,编码可能与当前编译器的编码不相同,而导致可能产生显示乱码的问题.那么如何将网络的编码,转换为当前编译器认可的编码(一般为UTF-8),就是个问题了. 主要使用了两个方法: Str ...
- open_basedir restriction in effect. File() is not within the allowed path(s)
目前发现eaccelerator安装之后如果php.ini中设置open_basedir将导致open_basedir的一些报错(open_basedir restriction in effect. ...
- 手机user agent大全下载 整理发布一批移动设备的user agent【分享】
手机user agent大全下载 整理发布一批移动设备的user agent[分享] 很多人朋友在玩浏览器的时候 或者写软件的时候需要用到 user agent 这个东西 修改这个 可以使自己的浏览器 ...
- Java学习笔记--Swing2D图形
1.处理2D图形 要想使用java 2D库绘制图形,需要获得一个Graphics2D类对象.这个类是Graphics类的子类.paintComponent方法自动获得一个Graphics2D类对象,我 ...
- github在eclipse中的配置
http://www.cnblogs.com/yejiurui/archive/2013/07/29/3223153.html http://blog.csdn.net/shehun1/article ...
- KEIL里 Volatile的用法
volatile用于防止相关变量被优化. 例如对外部寄存器的读写.对有些外部设备的寄存器来说,读写操作可能都会引发一定硬件操作,但是如果不加volatile,编译器会把这些寄存器作为普通变量处理,例如 ...
- 解决kibana 4 关于响应时间的问题
"message" => " 10.252.142.174 [12/Sep/2016:16:43:47 +0800] \"GET /resources/j ...
- 转:Asp.Net MVC中DropDownListFor的用法
在Asp.Net MVC中可以用DropDownListFor的方式来让用户选择已定列表中的一个数值.用法不复杂,这里简单做一个记录. 首先我们要定义一个 Model ,用户在 DropDownLis ...
- 给Select赋值 innerHTML 不兼容IE6\IE7\IE8\IE9
<select class="b-select" id="location-province" name="Province" def ...