问题
( again ) I want to use the ZXing library in my project, I followed this tutorial http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/ [ only difference I'm using netbeans ]after building zxing android project and marking it as a library, I wanted to od it as a library in my own project. After doing it, I can't build it. It looks like the R file can't be created in both [library and myProject ] for example:
error: constant expression required
case R.id.zxinglib_auto_focus:
回答1:
It can't be used as a library project directly, since it was not intended to be used as a library project, and this is generally discouraged. Please see my comments on that same post.
http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/#comment-159
回答2:
Try again after clean your project.It may happen that eclipse has not created ids of the view which you are using..
来源:https://stackoverflow.com/questions/13028945/zxing-project-as-library-in-a-project-wont-build