如何在Android中实现外部指纹设备SDK?

时间:2018-08-07 14:11:06

标签: android android-studio fingerprint android-fingerprint-api

我正在制作一个用于注册员工指纹以进行注册的应用程序。但是,我在应用程序中实现外部指纹设备SDK时遇到了困难。我已经将其导入为模块,但是gradle继续使我在同步时出错,并且同步失败并显示以下错误消息:

list1 = [[0, 0, 0, 0]] * 10
for i in range(len(list1)):
    for j in range(0, 10):
        list1[i][1] = j
print(list1)

#output:[[0, 9, 0, 0], [0, 9, 0, 0], [0, 9, 0, 0], [0, 9, 0, 0], [0, 9, 0, 0], [0, 9, 0, 0], [0, 9, 0, 0], [0, 9, 0, 0], [0, 9, 0, 0], [0, 9, 0, 0]]

#But I want the output to be: [[0, 0, 0, 0], [0, 1, 0, 0], [0, 2, 0, 0], [0, 3, 0, 0], [0, 4, 0, 0], [0, 5, 0, 0], [0, 6, 0, 0], [0, 7, 0, 0], [0, 8, 0, 0], [0, 9, 0, 0]]

这是我的毕业代码:

对于应用程序:

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project

对于项目:

apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
    applicationId "com.example.employeeRegistration"
    minSdkVersion 21
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    targetCompatibility 1.8
    sourceCompatibility 1.8
}
}

repositories {
google()
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
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 project(':readerUSBISO')
}

对于指纹SDK:

buildscript {

repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.1.3'


    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}
allprojects {
repositories {
    google()
    jcenter()

}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

在这种情况下帮助我。

0 个答案:

没有答案