我在Android Studio中开始了一个新项目,我想导入zxing-android-embedded以允许我在我的应用程序中创建一个简单的条形码扫描器。
这是build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.example.android.barcodescanner"
minSdkVersion 19
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.google.zxing:core:3.2.1'
compile 'com.journeyapps:zxing-android-embedded:3.2.0'
}
它显示错误
Error:(29, 13) Failed to resolve: com.google.zxing:core:3.2.1
Disable offline mode and sync projectShow in FileShow in Project Structure dialog
和
Error:(30, 13) Failed to resolve: com.journeyapps:zxing-android-embedded:3.2.0
Disable offline mode and sync projectShow in FileShow in Project Structure dialog
好吧,我搜索了Stack Overflow但无法找到最新的Dependency ZXing android嵌入式。