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 有关啊

  • 2023-09-21 16:49:06

    用webpack.ProvidePlugin来解决Photo-Sphere-Viewer旧版本浏览器兼容问题

    上篇文章已经搭建了最基本的项目,我用手机下载了一个版本62.点开头的chrome apk来测试。 果真白屏,啥也没有,也看不到报错信息。 赶紧安装 vconsole ,重启,刷新,依然白屏,连vconsole也没有。这可咋弄。 想了下,这浏览器老的是可以呀,还得修改编译参数,加大es5的处理。 根目录有一个配置文件 .browserslistrc 里面的配置如下