2015-07-20 56 views
-3

我正在使用zxing發佈的build 3.2。從git hub下載並在eclipse中導入。導入後,我將java編譯器設置爲1.7並添加core.jar,但庫中仍存在一些錯誤,請給我建議解決它。無法在Android項目中導入Zxing Library

在此先感謝。

+2

什麼是錯誤? – user3290180

+0

R無法解析爲變量 – user3382728

+0

此接受的答案可能會幫助您 http://stackoverflow.com/questions/7824730/r-cannot-be-resolved-to-a-variable – user3290180

回答

0

通過Intent使用zxing不是更容易嗎? (https://github.com/zxing/zxing/wiki/Scanning-Via-Intent

IntentIntegrator integrator = new IntentIntegrator(yourActivity); 
integrator.initiateScan(); 

public void onActivityResult(int requestCode, int resultCode, Intent intent) { 
    IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent); 
    if (scanResult != null) { 
    // handle scan result 
    } 
    // else continue with any other code you need in the method 
    ... 
} 
相關問題