Your project contains C++ files but it is not using a supported native build system.

2018-01-16 19:26:41

错误信息

Error:Execution failed for task ':dmo:compileDebugNdk'.

> Error: Your project contains C++ files but it is not using a supported native build system.

  Consider using CMake or ndk-build integration. For more information, go to:

   https://d.android.com/r/studio-ui/add-native-code.html

  Alternatively, you can use the experimental plugin:

   https://developer.android.com/r/tools/experimental-plugin.html


错误解决办法,从网上搜索的,不知道为什么会有这样的解决方案,

sourceSets { main { jni.srcDirs = [] } }

正确解决方案

sourceSets { main { jniLibs.srcDirs = [] } }

这样就可以运行了,是不是跟我再main下面建的文件夹就是jniLibs 有关啊

  • 2020-01-03 00:36:00

    break和continue详解for循环

    1. break:直接跳出当前循环体(while、for、do while)或程序块(switch)。其中switch case执行时,一定会先进行匹配,匹配成功返回当前case的值,再根据是否有break,判断是否继续输出,或是跳出判断(可参考switch的介绍)。 2. continue:不再执行循环体中continue语句之后的代码,直接进行下一次循环。