解决方法 在build.gradle(module:app)里加上以下语句 implementation 'com.google.zxing:core:3.3.3@jar' implementation 'com.google.zxing:android-core:3.3.0@jar'