Plugin with id ‘kotlin-android’ not found
在build.gradle(:app)中添加以下内容
buildscript {ext {Kotlin_Verion = "1.9.10"}dependencies {classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$Kotlin_Verion"}repositories {mavenCentral()}
}
再在工程的build.gradel中添加如下内容
id 'org.jetbrains.kotlin.android' version '1.9.10' apply false
版本根据实际情况修改.
如下图
命名空间问题
在opencv的build.gradle中添加工程的命名空间即可.
如下图
import org.opencv.BuildConfig
gradle.properties
android.defaults.buildfeatures.buildconfig=true
error: package org.opencv.engine does not exist
opencv build.gradle
buildFeatures {aidl true}