OpenCV Android Studio 模块导入问题 [英] OpenCV Android Studio module importing issue

查看:68
本文介绍了OpenCV Android Studio 模块导入问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 OpenCV 导入到 android studio 项目,但没有激活next"和完成"按钮.所以我无法完成 OpenCV 导入.使用 Android Studio Arctic Fox 2020.3.1 并尝试不同版本的 OpenCV(4.5.3、3.4.1、3.4.15 等)有问题的截图 下一步和完成禁用禁用下一步和完成

尝试了 Android studio 4.2.2 - 它解决了我的问题.但是我还是不知道如何在北极狐中使用它

解决方案

这个Bug在Android studio Arctic Fox

这个问题不仅与 OpenCV 模块有关,所有库模块都会发生这种情况.

许多人在 issuetracker 上发布了这个问题,但没有人从 Android studio 团队方面得到解决方案.这是发布在 issuetracker 上的问题的一些链接.
链接 1 ,链接 2链接 3 ,链接 4 ,链接 5 ,链接 6 ,链接 7

这里是临时解决方法

  1. 复制sdk文件夹到你的项目目录

  2. settings.gradle

    中添加以下行

    包含':sdk'

  3. 点击立即同步

  4. 完成

如果您遇到以下错误(我在解决此问题时遇到此错误)

<块引用>

未找到 ID 为kotlin-android"的插件.

在根级build.gradle中添加下面的依赖,然后点击sync now

依赖项{类路径com.android.tools.build:gradle:4.2.2";类路径org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21";//添加这一行}

I`m trying to import OpenCV to android studio project, but have inactive "next" and "finish" button. So i cant finish OpenCV importing. Using Android Studio Arctic Fox 2020.3.1 and tried different version of OpenCV(4.5.3, 3.4.1, 3.4.15 etc.) There are screenshots of issue Next and Finish disabled Next and Finish disabled

Edit: Tried Android studio 4.2.2 - and it fix my problem. But i still dont know how to use it in Arctic Fox

解决方案

This Bug is in Android studio Arctic Fox

This issue is not about only OpenCV module, This is happening with all library modules.

Many people are posted this issue on issuetracker but nobody get solution from Android studio team side. here is some links of that issues posted on issuetracker.
Link 1 , Link 2 , Link 3 , Link 4 , Link 5 , Link 6 , Link 7

So here is Temporary Workaround

  1. copy sdk folder in your project directory

  2. Add below line in settings.gradle

    include ':sdk'

  3. click sync now

  4. Done

If you get below error (I got this error while solving this issue)

Plugin with id 'kotlin-android' not found.

add below dependency in root level build.gradle and click sync now

dependencies {
        classpath "com.android.tools.build:gradle:4.2.2"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21" // add this line
    }

这篇关于OpenCV Android Studio 模块导入问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆