2012-01-30 71 views
1

我試圖編譯從以下鏈接斑馬線:安卓斑馬線條形碼掃描得到約束不匹配

http://code.google.com/p/zxing/source/checkout

但不要讓她的編譯。它給我以下錯誤:

Bound mismatch: The generic method of(E, E...) of type EnumSet<E> is not applicable for the arguments (BarcodeFormat, BarcodeFormat, BarcodeFormat, BarcodeFormat). The inferred type BarcodeFormat is not a valid substitute for the bounded parameter <E extends Enum<E>> 

我讀肖恩和RIZ之間的對話,在以下鏈接:

http://groups.google.com/group/zxing/browse_thread/thread/2c775d28da3c8454/ac2eb3b45cd3f9bd?show_docid=ac2eb3b45cd3f9bd

我不明白的

You should not be including 
CaptureActivity in your code. You should be including core.jar. 

如果我不意思包括core.jar,我將無法獲得

import com.google.zxing.BarcodeFormat 

那麼我該如何解決這個問題。我想了解zxing作者編寫的代碼。我不想使用意圖。

回答

1

我確定這意味着你實際上並沒有編譯你從Subversion簽出的代碼,因爲它肯定會編譯。您可能會混合舊版本的core/庫(未使用enum)與android/代碼的新版本,該版本確實如此。

+0

是的,也許我正在做同樣的事情,你說的。我在哪裏可以得到最新的core.jar文件 – 2012-01-30 13:45:29

+0

你可以從你簽出的源代碼構建它。在'core /'運行'ant'' – 2012-01-30 16:12:57

+0

謝謝兄弟。它真的幫助我編譯代碼。以及你們使用導入android.provider.ContactsContract這是支持API LEVEL 5(Android 2.0),以便它將如何支持Android 1.6? – 2012-01-31 03:38:53