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.
Related
I am facing an issue while upgrading wolfssl to 4.4.0 in internal tool.
Any help/hints would be highly appreciated.
Below are the steps/process followed to do so -
wolfssl-4.4.0 code copied to tool/main project.
wolfssl-4.4.0 added as a project in the tool Solution/sln.
Required macros have been enabled in wolfssl-4.4.0 project.
Dir-Path for the output library is configured.
Newly added wolfssl-4.4.0 project compiled & lib is generated in the configured dir.
Now the startup project / main project "test tool" is configured for newly added wolfssl-4.4.0 - Include directory path is updated in Test tool.
The Required macros have been enabled in the Test tool.
On the start of the build compilation -
all the sub-projects compiled successfully.
Encounters compilation error the moment it starts "Test tool"/main project/startup project compilation.
Error is pointing to wolfssl file, error is -
wolfssl-4.4.0\wolfssl\wolfcrypt\asn.h(75) : error C2059: syntax error : 'string'
Error code & location seems to not be very useful to resolve it.
Note -
MVS2008 has been used to build test tool.
We have verified below mentioned possible missing configurations -
All required macro.
Include path for directory.
Library path & generation.
Availability of required files.
configuration - comparison with existing library which is working well.
Please suggest anything which can help us to resolve mentioned error.
Thanking You.
I am trying to convert to UWP my desktop application Computator.NET (written in WinForms) which is using InstallShield for it's installer but DAC does not seem to find executable. It looks like it thinks that exe file is some temporary installer file. Log from the process is below:
WARNING: DesktopAppConverter : warning 'W_PACKAGE_DEPENDENCY_ADDED': A
dependency on framework package 'Microsoft.VCLibs.140.00.UWPDesktop'
was added to the AppxManifest.xml. See
'http://go.microsoft.com/fwlink/?LinkId=821959' for guidance on
installing the package prior to local deployment. Otherwise, if this
is in error, remove the corresponding entry from Dependencies in the
AppxManifest.xml before packaging and deploying your application.
WARNING: DesktopAppConverter : warning 'W_DISCOVERED_EXE_NOT_FOUND':
Discovered shortcut indicates the app executable should be
'\WINDOWS\Installer{FA089B43-0451-420A-968B-DCC3C55644C7}_8C37B49DBB16422C8EF917F2AEA02293.exe',
but this file cannot be found. WARNING: DesktopAppConverter : warning
'W_DISCOVERED_EXE_NOT_FOUND': Discovered shortcut indicates the app
executable should be
'\WINDOWS\Installer{FA089B43-0451-420A-968B-DCC3C55644C7}_A9A8E5CA913F4E1EB7F6ACDB86DAFB8B.exe',
but this file cannot be found. WARNING: DesktopAppConverter : warning
'W_DISCOVERED_EXE_NOT_FOUND': Discovered shortcut indicates the app
executable should be '\Windows\SysWOW64\msiexec.exe', but this file
cannot be found. WARNING: DesktopAppConverter : warning
'W_EXE_NOT_DISCOVERED': The application executable could not be
determined from any shortcut. MakeAppx will fail until you fix the
Application Executable property in the AppxManifest.xml WARNING:
DesktopAppConverter : warning 'W_INSTALL_PATH_NOT_DISCOVERED':
Converter could not determine your application's install path. Please
use the -AppInstallPath parameter to move app binaries outside of VFS.
WARNING: DesktopAppConverter : warning
'W_CANNOT_MAKEAPPX_WITHOUT_EXE': Unable to create appx package without
setting the 'Application Executable' property in the AppxManifest.xml.
Please set the 'Application Executable' property in the
AppxManifest.xml before calling makeappx manually. Warning Summary:
W_PACKAGE_DEPENDENCY_ADDED A dependency on framework package
'Microsoft.VCLibs.140.00.UWPDesktop' was added to the
AppxManifest.xml. See 'http://go.microsoft.com/fwlink/?LinkId=821959'
for guidance on installing the package prior to local deployment.
Otherwise, if this is in error, remove the corresponding entry from
Dependencies in the AppxManifest.xml before packaging and deploying
your application.
W_DISCOVERED_EXE_NOT_FOUND Discovered shortcut indicates the app
executable should be
'\WINDOWS\Installer{FA089B43-0451-420A-968B-DCC3C55644C7}_8C37B49DBB16422C8EF917F2AEA02293.exe',
but this file cannot be found.
W_DISCOVERED_EXE_NOT_FOUND Discovered shortcut indicates the app
executable should be
'\WINDOWS\Installer{FA089B43-0451-420A-968B-DCC3C55644C7}_A9A8E5CA913F4E1EB7F6ACDB86DAFB8B.exe',
but this file cannot be found.
W_DISCOVERED_EXE_NOT_FOUND Discovered shortcut indicates the app
executable should be '\Windows\SysWOW64\msiexec.exe', but this file
cannot be found.
W_EXE_NOT_DISCOVERED The application executable could not be
determined from any shortcut. MakeAppx will fail until you fix the
Application Executable property in the AppxManifest.xml
W_INSTALL_PATH_NOT_DISCOVERED Converter could not determine your
application's install path. Please use the -AppInstallPath parameter
to move app binaries outside of VFS.
W_CANNOT_MAKEAPPX_WITHOUT_EXE Unable to create appx package without
setting the 'Application Executable' property in the AppxManifest.xml.
Please set the 'Application Executable' property in the
AppxManifest.xml before calling makeappx manually.
I am runing Dekstop App Converter using fairly simple command:
DesktopAppConverter.exe -Installer C:\Computator.NET\Computator.NET.Installer.v2.1.0.beta.exe -InstallerArguments "/S" -Destination C:\Computator.NET\Appx -PackageName "Computator.NET" -Publisher "CN=Pawel Troka" -Version 2.1.0.0 -MakeAppx
It seems like this issue is because of the way InstallShield installer is working.
Fortunetely there is an easy way to resolve this - we need to pass path to executable, just like it -AppExecutable "path_to_your_exe_file_after_installation"
So my final command looked like this:
DesktopAppConverter.exe -Installer
C:\Computator.NET\Computator.NET.Installer.v2.1.0.beta.exe
-InstallerArguments "/S" -Destination C:\Computator.NET\Appx -PackageName "Computator.NET" -Publisher "CN=Pawel Troka" -Version 2.1.0.0 -MakeAppx -AppExecutable "C:\Program Files (x86)\Computator.NET\Computator.NET.exe" -Sign
Note that I also added -MakeAppx and -Sign arguments, this is because I wanted it to be ready for testing - just needed to install certificate auto-generated.cer to Trusted Root Certification Authorities after conversion and my appx was ready to be installed and tested on my developer machine.
This tutorial was really helpful during the process and also this article helped me a bit.
I'm trying to debug code as it runs on my Android test device. I sent a build to the CN1 server and downloaded the resulting sources.zip, which I then used to create a project in Android Developer Studio.
When I compile using
Compile SDK Version: API21 or API 22 with
Build Tools Version: 21.1.2 or 22.0.1, respectively
I get the following compile errors:
C:\home\dev\ProxyServerDebug\build\intermediates\res\merged\debug\values-v23\values-v23.xml
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(18) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\opt\android-sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
When I compile using
Compile SDK Version: API 23
Build Tools Version: 23.0.2
I get the following compile errors:
C:\home\dev\ProxyServerDebug\src\main\java\com\codename1\impl\android\AndroidImplementation.java
Error:(4563, 21) error: cannot find symbol method setLatestEventInfo(Activity,String,String,PendingIntent)
C:\home\dev\ProxyServerDebug\src\main\java\com\codename1\impl\android\PushNotificationService.java
Error:(110, 18) error: cannot find symbol method setLatestEventInfo(PushNotificationService,String,String,PendingIntent)
Is it just a matter of setting the correct SDK and Build Tools versions? or am I missing something else? BTW, sources were generated this morning, so I should be on the latest CN1 3.3 release.
If I recall correctly it should be 22.0.1 the reason build fails by default is that you need to configure an external gradle directory as explained in How to build the native Android sources from Codename One's build server
I have not done any build on the server before, but I have created numerous applications on my system. When trying to send this particular application to the build server, it was giving error on netbeans. This was the error I was getting:
init:
deps-clean:
Updating property file: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\built-clean.properties
Deleting directory C:\Users\Olubori\Documents\NetBeansProjects\Interview\build
refresh-libs:
Deleting directory C:\Users\Olubori\Documents\NetBeansProjects\Interview\lib\impl
clean:
copy-desktop-override:
Created dir: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\classes
copy-libs:
deps-jar:
Updating property file: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\built-jar.properties
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: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\tmp
Compiling 1 source file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\tmp
Created dir: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\empty
Compiling 1 source file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\classes
warning: [options] bootstrap class path not set in conjunction with -source 1.5
1 warning
Copying 1 file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\classes
compile:
Created dir: C:\Users\Olubori\Documents\NetBeansProjects\Interview\dist
Copying 1 file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build
C:\Users\Olubori\Documents\NetBeansProjects\Interview\nbproject\build-impl.xml:990: The following error occurred while executing this line:
C:\Users\Olubori\Documents\NetBeansProjects\Interview\nbproject\build-impl.xml:834: copylibs doesn't support the "excludeFromCopy" attribute.
BUILD FAILED (total time: 0 seconds)
What could be the cause and how will I solve it?
Just remove that attribute from the XML build file, its a NetBeans bug: https://groups.google.com/d/msg/codenameone-discussions/X_HMILMsw_Y/jE0xDsL7nfAJ
I am using Eclipse 3.6 (Helios64) and m2eclipse 0.12.1.20110112-1712. I have a new project that only contains two classes that builds a jar. When I right click the project and select "Run As -> Maven package", I get the following error:
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # switch-provisioning-rest-client --- [INFO] Compiling 2 source files to C:\Devel\EclipseProjects\MyProject\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
javac: invalid flag: -s
...
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
When I set up a run configuration with the Goals "package -X", the project builds without error. If I run a configuration with the goal set to compile, it builds without error and I can then run "Maven package" successfully.
This is the only project I'm having issues with. All my other projects build sucessfully when doing a "Maven package".
There's nothing exceptional about the project pom.xml. It refers to the same parent pom as the other projects and contains its project specific dependencies.
Has anybody got any ideas what could be different about this project?
TIA!
This issue was answered on the m2eclipse mailing list:
http://dev.eclipse.org/mhonarc/lists/m2e-users/msg01818.html
Although my pom had 1.6 as the version, the project configuration hadn't been updated.
From: Benjamin Bentmann
This issue is not really specific to m2e but applies to mvn in general, as such the Maven user list might provide a better audience for help.
IIRC, the specific error means you trying to use a JDK 1.5 while you need JDK 1.6+ where the javac option in question was added. Assuming your project should actually compile against JDK 1.5, downgrading the maven-compiler-plugin version might also do, I would expect it started to use the -s option when the annotation processing support was added.