赞
踩
新建一个空项目,一定要测试确保没有问题
Plugin [id: 'com.android.application', version: '8.1.1', apply: false] was not found in any of the following sources:
1. opencv 和app的build版本要一致
2.注释代码
3.添加 namespace
namespace "org.opencv"
4.修改opencv代码
settings.gradle.kts
settings.gradle
两个文件里的代码要一致 别少了最后一行导入opencv库
5.修改后完整代码 到此处问题已解决
include ':opencv49
opencv49 你导入的是啥用啥,新版本不用改自动生成的
- pluginManagement {
- repositories {
- google()
- mavenCentral()
- gradlePluginPortal()
- }
- }
- dependencyResolutionManagement {
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
- repositories {
- google()
- mavenCentral()
- }
- }
-
- rootProject.name = "opencv"
- include(":app")
- include ':opencv49'
复制的内容
- pluginManagement {
- repositories {
- google()
- mavenCentral()
- gradlePluginPortal()
- }
- }
- dependencyResolutionManagement {
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
- repositories {
- google()
- mavenCentral()
- }
- }
-
- rootProject.name = "opencv"
- include(":app")
6.成功编译
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。