日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

zxing 扫码第三方SDK版本不兼容问题

發布時間:2023/12/19 综合教程 29 生活家
生活随笔 收集整理的這篇文章主要介紹了 zxing 扫码第三方SDK版本不兼容问题 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在AndroidStudio環境下,或許會遇到下面的問題:

Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
> Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.

 

表示測試版本與測試版本不一致,這種問題網上給出的答案是: Rebuilde Project。

可是每次創建Activity和打開AndroidStudio都要Rebuilde Project太麻煩了。

在使用 zxing 掃碼插件的時候又遇到了這么個問題 :

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.github.yuzhiqiang1993:zxing:2.1.8] C:Usersasd25.gradlecaches ransforms-1files-1.1zxing-2.1.8.aara404ff49b2cb172765d68a2248efaa73AndroidManifest.xml as the library might be using APIs not available in 15
Suggestion: use a compatible library with a minSdk of at most 15,
or increase this project's minSdk version to at least 16,
or use tools:overrideLibrary="com.yzq.zxinglibrary" to force usage (may lead to runtime failures)

說是MinSdk版本過低,于是修改了下 :

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "he3.sd"
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.1'
    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'
    compile 'com.github.huangyanbin:SmartTable:2.2.0'
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support:support-vector-drawable:26.1.0'
    /*添加依賴*/
    implementation 'com.github.yuzhiqiang1993:zxing:2.1.8'
}

 

問題都解決了。

總結

以上是生活随笔為你收集整理的zxing 扫码第三方SDK版本不兼容问题的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。