报错:Collection contains no element matching the predicate.
build:gradle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 33
defaultConfig {
applicationId "car.bkrckj_logo.com.car2021"
minSdkVersion 28
targetSdkVersion 33
versionCode 1
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk {
moduleName "serial_port"
ldLibs "log", "z", "m"
abiFilters "armeabi", "armeabi-v7a"
/* //选择要添加的对应 cpu 类型的 .so 库。
abiFilters 'armeabi-v7a'//上下三行都为后加的
// 还可以添加 'x86', 'x86_64', 'mips', 'mips64'*/
}
externalNativeBuild {//weihojia
cmake {
cppFlags "-std=gnu++11"
// 注意!!!! 注意!!!!!!
//如果是用 Linux 开发的的用户下面这行代码不用动,如果是 Win 用户请把 下面这行代码注释了
// arguments "-DANDROID_TOOLCHAIN=gcc", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_STL_FORCE_FEATURES=OFF"
}
}
}
externalNativeBuild {//weihojia
cmake {
path "CMakeLists.txt"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
dataBinding {
enabled true
}
repositories {
flatDir {
dirs 'libs'
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
aaptOptions {//深度学习
noCompress "tflite"
noCompress "lite"
}
buildToolsVersion '28.0.3'
ndkVersion '27.1.12297006'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation files('libs/camerautil.jar')
implementation files('libs/core.jar')
//noinspection GradleCompatible
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation project(path: ':openCVLibrary347')
// implementation project(path: ':openCVLib452')
testImplementation 'junit:junit:4.13.2'
implementation project(':library')
implementation(name:'usbSerialForAndroid-debug', ext:'aar')
implementation(name:'BottomNavigationViewLibrary-debug', ext:'aar')
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.7'
implementation 'com.github.castorflex.verticalviewpager:library:19.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
// implementation 'com.android.support:design:+'
implementation 'com.rmtheis:tess-two:9.0.0'//文字识别依赖库
compile 'org.tensorflow:tensorflow-lite:+' // TensorFlow Lite 深度学习交通标志物
}
build:gradle(project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven{ url "https://maven.aliyun.com/nexus/content/groups/public/"}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
maven{ url "https://maven.aliyun.com/nexus/content/groups/public/"}
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}