我正在開發一款條碼掃描器應用程序。如何替換實現以在Android Build.gradle中編譯。 (Android Studio 2.3.3)
我的Android Studio版本2.3.3是
我一直在使用的build.gradle編譯(模塊:應用程序),但我發現這個庫建議使用實施在更換編譯。
我搜索了網上編譯由Android的工作室3.0 實施替換,但我在的Android 2.3.3工作室使用這個庫。
示例。
dependencies {
implementation 'com.budiyev.android:code-scanner:1.5.7'
}
當我把這個在我的gradle這個錯誤顯示。
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:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.budiyev.android:code-scanner:1.5.7' // HERE
testCompile 'junit:junit:4.12'
}
錯誤是:
Error:Failed to resolve: com.android.support:support-annotations:26.1.0
Install Repository and sync project
Show in Project Structure dialog
請告訴我,我怎麼能在我的Android工作室使用這個庫2.3.3
遺憾地說,什麼都不會發生同樣的錯誤消息。我加入了build.gradle編譯'com.budiyev.android:code-scanner:1.5.7',我替換了實現來編譯。 –
@Abhishekkumar按照https://github.com/yuriy-budiyev/code-scanner,你應該使用'implementation'com.budiyev.android:code-scanner:1.5.7''。 –
@IntelliJAmiya權利 –