Ok, I ran some of the demos under the simular from eclipse. Submitted a desktop build and got a jar. Now how do I run the jar? It doesn't seem
to be directly runnable.
Also, where should I have found this information instead of asking
a bonehead question here?
> Buildfile: G:\share\projects\eclipse\Charts Demo\build.xml
>
> jar:
> [echo] Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
> [echo] code size and wider device support
> [copy] Copying 1 file to G:\share\projects\eclipse\Charts Demo\build\tmp
> [javac] G:\share\projects\eclipse\Charts Demo\build.xml:147: warning: 'includeantruntime' was not set, defaulting to
> build.sysclasspath=last; set to false for repeatable builds
> [javac] Compiling 25 source files to G:\share\projects\eclipse\Charts Demo\build\tmp
> [javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
> [javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
> [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
> [javac] Note: Some input files use or override a deprecated API.
> [javac] Note: Recompile with -Xlint:deprecation for details.
> [javac] Note: G:\share\projects\eclipse\Charts Demo\src\com\codename1\demos\charts\ChartDemosForm.java uses unchecked
> or unsafe operations.
> [javac] Note: Recompile with -Xlint:unchecked for details.
> [javac] 3 warnings
> [jar] Building jar: G:\share\projects\eclipse\Charts Demo\dist\Charts Demo.jar
> [javac] G:\share\projects\eclipse\Charts Demo\build.xml:171: warning: 'includeantruntime' was not set, defaulting to
> build.sysclasspath=last; set to false for repeatable builds BUILD
> SUCCESSFUL Total time: 1 second
Normally, desktop build was supposed to return exe file for windows and dmg for Mac. Something might have gone wrong for you to get jar file.
You can find bunch of information on How do I page and here's a link to desktop build.
Another thing you can do is prefix your Google search with https://www.codenameone.com.
For example, search for desktop build like this: https://www.codenameone.com desktop application
I will also suggest you follow Codenameone blog, as new features, latest release and archive of many cool stuff released in the past are available there.
Related
I'm getting this error. It all started when I tried to make use of react-native-camera and run my project
> Task :react-native-camera:compileGeneralDebugJavaWithJavac
> Task :app:mergeDexDebug FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
252 actionable tasks: 33 executed, 219 up-to-date
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Users\joans\Desktop\Project\new_project\node_modules\react-native-camera\android\src\main\java\com\google\android\cameraview\Camera2.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D8: Cannot fit requested classes in a single dex file (# methods: 65711 > 65536 ; # fields: 71075 > 65536)
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
.....
* What went wrong:
Execution failed for task ':app:mergeDexDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
Please, any suggestions would be helpful
I received this "BUILD FAILED" while trying to install EJBCA on UBUNTU 18.04. The following messages appeared below "BUILD FAILED":
/opt/ejbca_ce_6_15_2_1/build.xml:1323: The following error occurred while executing this line:
/opt/ejbca_ce_6_15_2_1/modules/build.xml:260: The following error occurred while executing this line:
/opt/ejbca_ce_6_15_2_1/modules/cesecore-p11/build.xml:16: Compile failed; see the compiler error output for details.
Above the Build Failed message there were a total of 39 "javac" errors, specifying the problem. Some of those are:
jar:
[mkdir] Created dir: /opt/ejbca_ce_6_15_2_1/modules/cesecore-p11/build
[javac] Compiling 1 source file to /opt/ejbca_ce_6_15_2_1/modules/cesecore-p11/build
[javac] /opt/ejbca_ce_6_15_2_1/modules/cesecore-p11/src/sun/security/pkcs11/CESeCoreUtils.java:15: error: package sun.security.pkcs11.wrapper is not visible
[javac] import static sun.security.pkcs11.wrapper.PKCS11Constants.CKA_SENSITIVE;
[javac] ^
[javac] (package sun.security.pkcs11.wrapper is declared in module jdk.crypto.cryptoki, which is not in the module graph)
Others are like:
137: error: cannot find symbol
[javac] if ( e.getErrorCode()==CKR_ATTRIBUTE_READ_ONLY ) {
[javac] ^
[javac] symbol: variable CKR_ATTRIBUTE_READ_ONLY
[javac] location: class CESeCoreUtils
The complete list of errors in this link https://pastebin.com/LMzDhdKn
Most likely you are not using one of the supported JDK versions. In the beginning of your build log (which you haven't pasted here) it prints what java version is used by your system. Make sure this is a supported one (from the EJBCA documentation). Since you are using Ubuntu, I'd recommend installing the OpenJDK 8 packages, and making sure this is used by configuring Ubuntu to use this, with the 'update-java-alternatives' command.
The build log should then print in the beginning that OpenJDK 8 (with some specific build number) is being used.
Project will not build: error: package java.util.logging does not exist [javac] import java.util.logging.Level;
Steps to reproduce: (eclipse neon)
1. create a new codenameone project.
2. open codenameone settings, download admob extension
3. refresh cn1libraries.
Gets the following errors. Note that the native android does not have the java util. Why is it using javase ?
Buildfile: /Users/sam/dev/wordtime5_ws/test2/build.xml
jar:
[echo] Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
[echo] code size and wider device support
[copy] Copying 1 file to /Users/sam/dev/wordtime5_ws/test2/build/tmp
[javac] /Users/sam/dev/wordtime5_ws/test2/build.xml:147: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to /Users/sam/dev/wordtime5_ws/test2/build/tmp
[copy] Copying 11 files to /Users/sam/dev/wordtime5_ws/test2/build/tmp
[jar] Building jar: /Users/sam/dev/wordtime5_ws/test2/dist/test2.jar
[javac] /Users/sam/dev/wordtime5_ws/test2/build.xml:171: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to /Users/sam/dev/wordtime5_ws/test2/native/internal_tmp
[javac] /Users/sam/dev/wordtime5_ws/test2/lib/impl/native/javase/com/codename1/admob/AdMobNativeImpl.java:16: error: package java.util.logging does not exist
[javac] import java.util.logging.Level;
[javac] ^
[javac] /Users/sam/dev/wordtime5_ws/test2/lib/impl/native/javase/com/codename1/admob/AdMobNativeImpl.java:17: error: package java.util.logging does not exist
[javac] import java.util.logging.Logger;
[javac] ^
[javac] 2 errors
I needed to create a new codenameone project and copy my sources into that. My project was over a year old.
I wanted to dive into CN1 soures. I've followed this and this tutorial with git. However in NetBeans when I ctrl-click on a CN1 object it shows "Showing generated source file. No sources are attached to class' JAR file.". If I attach the sources I've just downloaded ie "CodenameOne/CodenameOne/src" the sources are still unfound!
I tried to clean and build the project but errors appeared :
Building jar: /home/pathTo/CodenameOneSRC/CodenameOne/CodenameOne/dist/CodenameOne.jar
CodenameOne.jar:
JavaSE.init:
JavaSE.deps-jar:
Created dir: /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build
Updating property file: /home/pathTo/myProject/build/built-jar.properties
Created dir: /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/classes
Created dir: /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/empty
Created dir: /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/generated-sources/ap-source-output
Compiling 21 source files to /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/classes
warning: [options] bootstrap class path not set in conjunction with -source 1.7
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java:115: error: package com.jhlabs.image does not exist
import com.jhlabs.image.GaussianFilter;
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java:8757: error: cannot find symbol
GaussianFilter gf = new GaussianFilter(radius);
symbol: class GaussianFilter
location: class JavaSEPort
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java:8757: error: cannot find symbol
GaussianFilter gf = new GaussianFilter(radius);
symbol: class GaussianFilter location: class JavaSEPort
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
1 warning
/home/pathTo/myProject/nbproject/build-impl.xml:914: The following error occurred while executing this line:
/home/pathTo/myProject/nbproject/build-impl.xml:1445: The following error occurred while executing this line:
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/nbproject/build-impl.xml:937: The following error occurred while executing this line:
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/nbproject/build-impl.xml:269: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 14 seconds)
Furthermore the project cannot be run anymore because the main class is not found (although I added the ports/JavaSE.jar in the run section).
What can I do to correctly attach sources and make change to CN1 source code ?
Any help appreciated,
Regards
You need the cn1-binaries project and need to make sure the paths within the JavaSE project lead to valid locations within that project.
E.g. GaussianFilter is defined within Filters.jar that resides in that project.
I am having a problem building from the server. My project is an Android application using Netbeans IDE. When I run my application everything works fine, the the compiler reports no error at all. But when I send the server build Netbeans report a successful build but but when I login to the build server what i see there is a Build Fail with an error log.
The following is the error log I get from the build server:
Executing: /home/ec2-user/android-sdk/tools/android create project --target android-14 --name MyApplication --path /tmp/build4676848571336833460xxx/MyApplication --activity MyApplicationStub --package com.mycompany.myapp Created directory /tmp/build4676848571336833460xxx/MyApplication/src/com/mycompany/myapp
Added file /tmp/build4676848571336833460xxx/MyApplication/src/com/mycompany/myapp/MyApplicationStub.java
Created directory /tmp/build4676848571336833460xxx/MyApplication/res
Created directory /tmp/build4676848571336833460xxx/MyApplication/bin
Created directory /tmp/build4676848571336833460xxx/MyApplication/libs
Created directory /tmp/build4676848571336833460xxx/MyApplication/res/values
Added file /tmp/build4676848571336833460xxx/MyApplication/res/values/strings.xml
Created directory /tmp/build4676848571336833460xxx/MyApplication/res/layout
Added file /tmp/build4676848571336833460xxx/MyApplication/res/layout/main.xml
Created directory /tmp/build4676848571336833460xxx/MyApplication/res/drawable-hdpi
Created directory /tmp/build4676848571336833460xxx/MyApplication/res/drawable-mdpi
Created directory /tmp/build4676848571336833460xxx/MyApplication/res/drawable-ldpi
Added file /tmp/build4676848571336833460xxx/MyApplication/AndroidManifest.xml
Added file /tmp/build4676848571336833460xxx/MyApplication/build.xml
Added file /tmp/build4676848571336833460xxx/MyApplication/proguard-project.txt
Executing: /home/ec2-user/android/ant/bin/ant release Buildfile: /tmp/build4676848571336833460xxx/MyApplication/build.xml
-set-mode-check:
-set-release-mode:
-release-obfuscation-check:
[echo] proguard.config is proguard.cfg
[echo] Proguard.config is enabled
-pre-build:
-check-env:
[checkenv] Android SDK Tools Revision 22.2.1
[checkenv] Installed at /home/ec2-user/android-sdk
-setup:
[echo] Project Name: MyApplication
[gettype] Project Type: Application
-build-setup:
[getbuildtools] Using latest Build Tools: 18.1.1
[echo] Resolving Build Target for MyApplication...
[gettarget] Project Target: Android 4.0
[gettarget] API level: 14
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /tmp/build4676848571336833460xxx/MyApplication/bin/res
[mkdir] Created dir: /tmp/build4676848571336833460xxx/MyApplication/bin/rsObj
[mkdir] Created dir: /tmp/build4676848571336833460xxx/MyApplication/bin/rsLibs
[mkdir] Created dir: /tmp/build4676848571336833460xxx/MyApplication/gen
[mkdir] Created dir: /tmp/build4676848571336833460xxx/MyApplication/bin/classes
[mkdir] Created dir: /tmp/build4676848571336833460xxx/MyApplication/bin/dexedLibs
[echo] ----------
[echo] Resolving Dependencies for MyApplication...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
[echo] ----------
[echo] Building Libraries with 'release'...
[subant] No sub-builds to iterate on
-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 405 source files to /tmp/build4676848571336833460xxx/MyApplication/bin/classes
[javac] /tmp/build4676848571336833460xxx/MyApplication/src/com/mycompany/myapp/MyApplicationStub.java:119: error: unreported exception IOException; must be caught or declared to be thrown
[javac] i.start();
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 error
BUILD FAILED
/home/ec2-user/android-sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/home/ec2-user/android-sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
Total time: 26 seconds
Don't add exception throws statements to the start() callback.