Search code examples
android-studiozxingbarcode-scanner

zxing barcode unused import statement


I have a project with zxing barcode, after change build.grade like this

    dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'

    //add zxing dependency
    implementation 'com.journeyapps:zxing-android-embedded:3.0.2@aar'
    implementation 'com.google.zxing:core:3.3.0'

    //add google API
    implementation 'com.google.android.gms:play-services:12.0.1'
    implementation 'com.android.support:multidex:1.0.3'
    }

message error for

import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;

the error said "unused import statement"

Because of that my activity error for IntentIntegrator, it said cannot resolve symbol, I used Android Studio 3.1.2.


Solution

  • I trying to clean and rebuild, but the result is same. So after several day I trying again to export the Apk, and test on my real device I don't no its working or not when runing on devices, and I am surprised the result is working well. I don't no why....because Android Studio find many errors and warnings. But when runing it, its working well.