问题
I downloaded QRScanner project from https://github.com/littlemonkeyltd/QRScanner and replace "codename1.arg.android.xapplication=" line in codenameone_library_appended.properties file. While building the library, it gives following error.
E:\QRScanner-master\src\org\littlemonkey\qrscanner\QRScanner.java:27Stubbing
Class: E:\QRScanner-master\build\stubs\org/littlemonkey/qrscanner/NativeScanner.java
: error: package com.codename1.ext.codescan does not exist
6 warnings
import com.codename1.ext.codescan.CodeScanner;
E:\QRScanner-master\src\org\littlemonkey\qrscanner\QRScanner.java:28: error: package com.codename1.ext.codescan does not exist
import com.codename1.ext.codescan.ScanResult;
Update 1: I have added the cn1-codescan.cn1lib dependencies but same problem as above exists...
-Unzipped cn1-codescan.cn1lib and kept main.zip inside lib folder
-changes in build.xml
<target name="-pre-compile">
<echo>Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
code size and wider device support</echo>
<mkdir dir="build/tmp"/>
<javac destdir="build/tmp"
source="1.5"
target="1.5"
bootclasspath="lib/CLDC11.jar"
classpath="lib/main.zip:${javac.classpath}:${build.classes.dir}">
<src path="${src.dir}"/>
</javac>
</target>
nbproject/project.properties file:
javac.classpath=\
${file.reference.CLDC11.jar}:\
${file.reference.CodenameOne.jar}:\
${file.reference.CodenameOne_SRC.zip}:\
${file.reference.QRScanner-override}:\
${file.reference.main.zip}
file.reference.main.zip=lib/main.zip
# Space-separated list of extra javac options
You can view the project here to see if I had done anything wrong:
https://drive.google.com/open?id=0B8ATnICIY2S8VzN0cGpwUTJLZTg
Thankyou
回答1:
Fork and download CodeScanner from here and include the relevant package in your project.
来源:https://stackoverflow.com/questions/42246554/littlemonkey-qrcode-scanner-library-patch-issue-while-generating-cn1lib-library