1.开源库地址: https://github.com/PaddlePaddle/LiteKit
2.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion "30.0.1"
defaultConfig {
applicationId "com.baidu.litekit.demo"
minSdkVersion 15
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
buildTypes {
debug {
ndk {
abiFilters 'armeabi-v7a'
abiFilters 'arm64-v8a'
}
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
//noinspection GradleCompatible
implementation 'com.android.support:cardview-v7:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.baidu.litekit:handgesturedetector:0.3.0'
implementation 'com.baidu.litekit:portraitsegmentation:0.3.0'
implementation 'com.baidu.litekit:videosuperresolution:0.3.0'
implementation 'com.baidu.litekit:ocr:0.3.0'
// implementation 'com.baidu.litekit:handgesturedetector:0.2.0'
// implementation 'com.baidu.litekit:portraitsegmentation:0.2.0'
// implementation 'com.baidu.litekit:videosuperresolution:0.2.0'
}
3.错误信息:
Execution failed for task ':app:mergeDebugResources'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.baidu.litekit:handgesturedetector:0.3.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/baidu/litekit/handgesturedetector/0.3.0/handgesturedetector-0.3.0.pom
- https://jcenter.bintray.com/com/baidu/litekit/handgesturedetector/0.3.0/handgesturedetector-0.3.0.pom
- file:/D:/LiteKitDemo/app/git clone https:/gitee.com/paddlepaddle/LiteKit/Android/repository/com/baidu/litekit/handgesturedetector/0.3.0/handgesturedetector-0.3.0.pom
Required by:
project :app
Could not find com.baidu.litekit:portraitsegmentation:0.3.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/baidu/litekit/portraitsegmentation/0.3.0/portraitsegmentation-0.3.0.pom
- https://jcenter.bintray.com/com/baidu/litekit/portraitsegmentation/0.3.0/portraitsegmentation-0.3.0.pom
- file:/D:/LiteKitDemo/app/git clone https:/gitee.com/paddlepaddle/LiteKit/Android/repository/com/baidu/litekit/portraitsegmentation/0.3.0/portraitsegmentation-0.3.0.pom
Required by:
project :app
Could not find com.baidu.litekit:videosuperresolution:0.3.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/baidu/litekit/videosuperresolution/0.3.0/videosuperresolution-0.3.0.pom
- https://jcenter.bintray.com/com/baidu/litekit/videosuperresolution/0.3.0/videosuperresolution-0.3.0.pom
- file:/D:/LiteKitDemo/app/git clone https:/gitee.com/paddlepaddle/LiteKit/Android/repository/com/baidu/litekit/videosuperresolution/0.3.0/videosuperresolution-0.3.0.pom
Required by:
project :app
Could not find com.baidu.litekit:ocr:0.3.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/baidu/litekit/ocr/0.3.0/ocr-0.3.0.pom
- https://jcenter.bintray.com/com/baidu/litekit/ocr/0.3.0/ocr-0.3.0.pom
- file:/D:/LiteKitDemo/app/git clone https:/gitee.com/paddlepaddle/LiteKit/Android/repository/com/baidu/litekit/ocr/0.3.0/ocr-0.3.0.pom
Required by:
project :app
它这不是有文档吗?没有上传到maven仓库,需要你克隆下来本地引入。我就搞不懂,文档摆在那里,你不好好看文档,有啥好问的
build.gradle(project)需要配置一下maven