简体   繁体   English

如何将ZXing集成到Android Studio项目中,以便我可以在Core目录中编辑代码

[英]How to integrate ZXing in Android Studio project so that I can edit code in the Core directory

I've been able to add ZXing by simply adding the dependency in my gradle file, however this doesn't let me edit the code of ZXing. 我已经可以通过简单地在gradle文件中添加依赖项来添加ZXing,但这不能让我编辑ZXing的代码。

I'm wanting to access the 2d boolean array that is passed to the Decoder class in ZXing core directory, however to do this I need to edit the code directly. 我想访问传递到ZXing核心目录中的Decoder类的2d布尔数组,但是要执行此操作,我需要直接编辑代码。

I tried adding ZXing Core as a module, but as it has no gradle files I could not. 我尝试将ZXing Core添加为模块,但是因为它没有gradle文件,所以我不能。

How can I integrate ZXing in this way? 如何以这种方式集成ZXing? (ie in such a way that I can edit the files of the library) (即以我可以编辑库文件的方式)

In case anyone has the same problem as me, I had to download the source files for ZXing core, create a new android studio project using those downloaded source files, make sure that project compiled smoothly on its own, then in my actual project, I added to the dependencies section of my cradle file: 万一有人遇到与我相同的问题,我必须下载ZXing core的源文件,使用这些下载的源文件创建一个新的android studio项目,确保该项目可以自己顺利编译,然后在我的实际项目中,我添加到我的摇篮文件的依赖项部分:

compile project(":ZXINGPROJECTNAME") 编译项目(“:ZXINGPROJECTNAME”)

Don't leave out that colon. 不要遗漏那个冒号。 Worked fine after that 之后工作正常

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Android Studio中打开Zxing项目并进行编译? - How to open Zxing project in Android Studio and compile it? Android Studio QR码扫描仪Zxing。 如何在我的应用程序中打开QR码扫描的结果(URL链接)? - Android Studio QR Code Scanner Zxing. How can I open the Result of the QR Code scan (URL Link) within my Application? 如何构建,集成和编译由google-protobuf创建的java代码到Android Studio项目中 - How do I build, integrate, and compile java code created by google-protobuf into an Android Studio Project 如何在Visual Studio项目中集成Java和Python? - How can I integrate both Java and Python in a Visual Studio project? 在Android studio中添加ZXing android项目作为库 - Add ZXing android project as library in android studio 如何将ZXING导入android studio? - How to import ZXING to android studio? Zxing项目条形码扫描仪如何支持“工业2之5条形码”? -安卓 - How can support “Industrial 2 of 5 barcode” in Zxing project barcode scanner? -Android 如何包含Java src代码,以便我可以在Android Studio中使用它 - How to include java src code so i can use it inside Android studio 我可以在Java应用程序中集成android代码吗? - Can I integrate android code in java applications? 我应该将哪个文件夹导入android studio,以便可以打开现有项目? - What Folder should I import into android studio so I can open an existing project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM