当前位置:   article > 正文

Plugin [id: ‘com.android.application‘, version: ‘8.1.1‘, apply: false] was not found in any of the_plugin [id: 'com.android.application', version: '8

plugin [id: 'com.android.application', version: '8.2.2', apply: false] was n

Android Studio 配置OpenCV

 新建一个空项目,一定要测试确保没有问题

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  你导入的是啥用啥,新版本不用改自动生成的

  1. pluginManagement {
  2. repositories {
  3. google()
  4. mavenCentral()
  5. gradlePluginPortal()
  6. }
  7. }
  8. dependencyResolutionManagement {
  9. repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
  10. repositories {
  11. google()
  12. mavenCentral()
  13. }
  14. }
  15. rootProject.name = "opencv"
  16. include(":app")
  17. include ':opencv49'

复制的内容 

  1. pluginManagement {
  2. repositories {
  3. google()
  4. mavenCentral()
  5. gradlePluginPortal()
  6. }
  7. }
  8. dependencyResolutionManagement {
  9. repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
  10. repositories {
  11. google()
  12. mavenCentral()
  13. }
  14. }
  15. rootProject.name = "opencv"
  16. include(":app")

6.成功编译

 

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/288895
推荐阅读
相关标签
  

闽ICP备14008679号