Thursday, February 6, 2014

Rookie ask a question about zxing


            
(Java android double rookie, for both preschool level, trouble you)

Now want to use zxing, millet phone on a test scan 1D / 2D codes.
Zxing official website to download version 2.0 of the source, the source directory structure is as follows:


Look online posts learned, android directory should be inside the App Store BarcodeScanner (barcode scanner) source.
Under androidtest directory is the official online source that ZXing Test, and now I want to do is run androidtest want to compile the project.

I use the source androidtest directory built a project, import the core.jar file, while the package android-integration directory are put inside my new project. Now works only one mistake, I do not know how to solve is:
import android.support.v4.app.Fragment;
This package can not be imported, I do not know if this is what the package is the standard library android system inside the package, or a third party.
Ben google total collapse, Baidu did not find useful information, you come here to ask.
I hope you will help me find the top paste took part.

In addition, the Internet has a lot of articles reprinted introduce themselves compiled core.jar, but the article says is version 1.6.
I found that version 2.0 has been compiled core.jar, should not have to compile it yourself, right?
Reply:
IntentIntegratorSupportV4.java file inside
/ / Import android.support.v4.app.Fragment;
Commented out, use the Fragment also notes a few places.
Now up and running, you can also scan properly 1D / two-dimensional code it.

I did not know commented this thing, what affects the function.
Reply:
Just turned the next android system documentation, found
package
android.support.v4.app
This package which also does have
public class
Fragment

I do not know why I can not import this package works yet.
Many versions of the android sdk installed on my system.
2.3.3 / 4.0 / 4.0.3
Have tried.
Trouble you to the next to help.

300 points of the top of the next posts nobody.
Reply:
Oh. Solve this problem yourself. About the need to manually import the android-support-v4.jar.

Reply:
The reply was deleted at the moderator 2012-07-24 09:44:06

Reply:
reference to the third floor of the reply:
oh. Solve this problem yourself. About the need to manually import the android-support-v4.jar.


Well done.
Reply:
Thanks for sharing.
Reply:
Thanks for sharing, I also encountered the same problem
Reply:
Thanks for sharing, I also encountered the same problem, saying that you said that android-support-v4.jar Where can I find it?

No comments:

Post a Comment