Closed thomasmcneill closed 4 years ago
You'll need to refresh libs, then do a clean build. That is part of the cn1lib.
The refresh is where I first saw the message. This is the Third empty project I pasted the code in to. The extension is up to date. Below is the code from the refresh.
ant -f A:\GoogleDrive\Projects\CameraKitDemo3 refresh-libs
refresh-libs-impl:
Deleting directory A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl
Generating GUI sources foo
No GUI Entries available
init:
deps-clean:
Updating property file: A:\GoogleDrive\Projects\CameraKitDemo3\build\built-clean.properties
Deleting directory A:\GoogleDrive\Projects\CameraKitDemo3\build
Deleting directory A:\GoogleDrive\Projects\CameraKitDemo3\native\internal_tmp
clean:
deps-jar:
Created dir: A:\GoogleDrive\Projects\CameraKitDemo3\build
Updating property file: A:\GoogleDrive\Projects\CameraKitDemo3\build\built-jar.properties
Created dir: A:\GoogleDrive\Projects\CameraKitDemo3\build\classes
Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
code size and wider device support
Created dir: A:\GoogleDrive\Projects\CameraKitDemo3\build\tmp
Compiling 1 source file to A:\GoogleDrive\Projects\CameraKitDemo3\build\tmp
Note: A:\GoogleDrive\Projects\CameraKitDemo3\src\com\torsioncycling\camerakitdemo3\CameraKitDemo3.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Created dir: A:\GoogleDrive\Projects\CameraKitDemo3\build\empty
Created dir: A:\GoogleDrive\Projects\CameraKitDemo3\build\generated-sources\ap-source-output
Compiling 1 source file to A:\GoogleDrive\Projects\CameraKitDemo3\build\classes
Note: A:\GoogleDrive\Projects\CameraKitDemo3\src\com\torsioncycling\camerakitdemo3\CameraKitDemo3.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Copying 1 file to A:\GoogleDrive\Projects\CameraKitDemo3\build\classes
Copied 2 empty directories to 2 empty directories under A:\GoogleDrive\Projects\CameraKitDemo3\build\classes
compile:
Created dir: A:\GoogleDrive\Projects\CameraKitDemo3\dist
Copying 1 file to A:\GoogleDrive\Projects\CameraKitDemo3\build
Not copying library A:\GoogleDrive\Projects\CameraKitDemo3\override , it's a directory.
Not copying library A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\cls , it's a directory.
Not copying library A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\stubs , it's a directory.
Not copying library A:\GoogleDrive\Projects\CameraKitDemo3\native\internal_tmp , it can't be read.
Copy libraries to A:\GoogleDrive\Projects\CameraKitDemo3\dist\lib.
Building jar: A:\GoogleDrive\Projects\CameraKitDemo3\dist\CameraKitDemo3.jar
To run this application from the command line without Ant, try:
java -jar "A:\GoogleDrive\Projects\CameraKitDemo3\dist\CameraKitDemo3.jar"
Created dir: A:\GoogleDrive\Projects\CameraKitDemo3\native\internal_tmp
Compiling 1 source file to A:\GoogleDrive\Projects\CameraKitDemo3\native\internal_tmp
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:5: error: package com.github.sarxos.webcam does not exist
import com.github.sarxos.webcam.Webcam;
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:6: error: package com.github.sarxos.webcam does not exist
import com.github.sarxos.webcam.WebcamEvent;
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:7: error: package com.github.sarxos.webcam does not exist
import com.github.sarxos.webcam.WebcamListener;
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:8: error: package com.github.sarxos.webcam does not exist
import com.github.sarxos.webcam.WebcamPanel;
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:9: error: package com.github.sarxos.webcam does not exist
import com.github.sarxos.webcam.WebcamResolution;
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:22: error: cannot find symbol
private Webcam webcam;
symbol: class Webcam
location: class CameraNativeAccessImpl
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:23: error: cannot find symbol
private WebcamPanel view;
symbol: class WebcamPanel
location: class CameraNativeAccessImpl
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:66: error: cannot find symbol
private synchronized Webcam getWebcam() {
symbol: class Webcam
location: class CameraNativeAccessImpl
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:169: error: cannot find symbol
private WebcamPanel getViewInternal() {
symbol: class WebcamPanel
location: class CameraNativeAccessImpl
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:282: error: cannot find symbol
private Dimension findLowestQuality(Webcam webcam) {
symbol: class Webcam
location: class CameraNativeAccessImpl
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:292: error: cannot find symbol
private Dimension findHighestQuality(Webcam webcam) {
symbol: class Webcam
location: class CameraNativeAccessImpl
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:68: error: cannot find symbol
webcam = Webcam.getDefault();
symbol: variable Webcam
location: class CameraNativeAccessImpl
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:69: error: cannot find symbol
webcam.addWebcamListener(new WebcamListener() {
symbol: class WebcamListener
location: class CameraNativeAccessImpl
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:104: error: package WebcamResolution does not exist
getWebcam().setViewSize(WebcamResolution.VGA.getSize());
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:175: error: cannot find symbol
WebcamPanel panel = new WebcamPanel(getWebcam()) {
symbol: class WebcamPanel
location: class CameraNativeAccessImpl
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:175: error: cannot find symbol
WebcamPanel panel = new WebcamPanel(getWebcam()) {
symbol: class WebcamPanel
location: class CameraNativeAccessImpl
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:248: error: package WebcamResolution does not exist
res = WebcamResolution.VGA.getSize();
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:251: error: package WebcamResolution does not exist
res = WebcamResolution.HD.getSize();
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:254: error: package WebcamResolution does not exist
res = WebcamResolution.FHD.getSize();
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:257: error: package WebcamResolution does not exist
res = WebcamResolution.UHD4K.getSize();
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:266: error: package WebcamResolution does not exist
res = WebcamResolution.QVGA.getSize();
A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:270: error: package WebcamResolution does not exist
res = WebcamResolution.VGA.getSize();
Note: A:\GoogleDrive\Projects\CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
22 errors
A:\GoogleDrive\Projects\CameraKitDemo3\build.xml:531: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 3 seconds)
It's possible your build.xml file is out of date. Compare your build.xml file with this one. In particular, look in the -post-jar
target. Classpath should be classpath="${run.classpath}:${build.classes.dir}:lib/impl/native/javase">
That got me further. The refresh works but the build fails. Attached is from the build server.
Could not find method implementation() for arguments [co.infinum:goldeneye:1.1.2] on root project 'CameraKitDemo3'.
I have the same issue. Steps to reproduce: create a new bare bones project, add the CameraKit cn1lib, try to refresh cn1libs... and you will see the error. Refreshing again or trying to compile don't solve the issue.
Adding the line <pathelement path="lib/impl/native/javase"/>
allows the project to compile, however this seems an issue of the updated version of the build.xml
provided by Codename One:
[...]
<target name="-post-jar">
<mkdir dir="native/javase" />
<mkdir dir="native/internal_tmp" />
<mkdir dir="lib/impl/native/javase" />
<path id="native.jars.class.path">
<pathelement path="${run.classpath}"/>
<pathelement path="${build.classes.dir}"/>
<pathelement path="lib/impl/native/javase"/>
[...]
CameraKitDemo3\lib\impl\native\javase\com\codename1\camerakit\impl\CameraNativeAccessImpl.java:5: error: package com.github.sarxos.webcam does not exist import com.github.sarxos.webcam.Webcam;
I could not find this in the extensions manager.