I am new to using PhoneGap and am trying to setup the example app, i'm using PhoneGap version 2.9.0 and apache-ant-1.9.1.
I have configured apache ant, installed the WebWorks SDK and have setup the project.properties file.
The error seems to be that it cannot find the 'CordovaExample' file in the temporary folder, i have checked the folder and it has the following files in it: 'CordovaExample.jdp', 'CordovaExample.jdw' and 'CordovaExample.rapc' (among various others). Am i missing some configuration so that it should search for one of these 3 files, instead of just 'CordovaExample'?
The error is shown below when the 'ant blackberry build' command is run:
jamest#JT1 /c/Development/FirstApp
$ ant blackberry build
Buildfile: c:\Development\FirstApp\build.xml
blackberry:
build:
generate-cod-name:
[echo] Generated name: CordovaExample.cod
clean:
[delete] Deleting directory c:\Development\FirstApp\build
package-app:
[mkdir] Created dir: c:\Development\FirstApp\build\widget
[copy] Copying 22 files to c:\Development\FirstApp\build\widget
[zip] Building zip: c:\Development\FirstApp\build\CordovaExample.zip
build:
[exec] [INFO] Parsing command line options
[exec] [INFO] Parsing bbwp.properties
[exec] [INFO] Validating application archive
[exec] [INFO] Parsing config.xml
[exec] [INFO] Populating application source
[exec] [INFO] Compiling BlackBerry WebWorks application
[exec] I/O Error: C:\Users\jamest\AppData\Local\Temp\widgetGen.584154969137
3014448670.tmp\CordovaExample (The system cannot find the file specified)
[exec] [ERROR] RAPC exception occurred
BUILD SUCCESSFUL
Total time: 8 seconds
I've searched the web, but can't find any similar questions so any help would be much appreciated.
Thanks
Ensure that you are using JDK 6 and NOT JDK 7 - WebWorks requires that version according to the BB support forums:
Please note that you need JDK6 (32-bit) to be installed and referenced
by the tools. Based on the sample it seems to be referencing JDK7.
If you do not require JDK7 explicitly, the safest option is to
uninstall all existing JDK/JREs from your PC (this includes both
64-bit and 32-bit) versions from Program Files and Program Files
(x86); respectively. And then install only JDK6 (which automatically
includes the JRE) that is 32-bit.
Apparently you might even need a specific build of JDK 6:
I noticed that JDK1.6 build 43 had the same behaviour during the
packaging process [...]
I had to roll back to JDK1.6 build 30 before I could sign and package
my webworks apps again.
First time I also Face same problem :-
To solve it :-
I use following step:-
Move to JDK 1.7 to JDK 1.6
follow the process as per this link http://docs.phonegap.com/en/2.1.0/guide_getting-started_blackberry_index.md.html
Modify .properties file
use signtool to sign the app using keys
then you will get Install able files
Related
I have jenkins on ubuntu. Building worked fine until I started to use android ndk.
latest ndk is downloaded and extracted into /opt/android-sdk-linux/ndk-bundle
In /etc/profile.d/android.sh is:
export ANDROID_HOME="/opt/android-sdk-linux"
export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH"
export ANDROID_NDK_HOME="/opt/android-sdk-linux/ndk-bundle"
but I got still error:
:common:compileDebugNdk FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':common:compileDebugNdk'.
NDK not configured.
Download the NDK from http://developer.android.com/tools/sdk/ndk/. Then add ndk.dir=path/to/ndk in local.properties.
(On Windows, make sure you escape backslashes, e.g. C:\ndk rather than C:\ndk)
The message says it all. You should add a text file local.properties to the project directory on the Linux machine, with one line
ndk.dir=/opt/android-sdk-linux/ndk-bundle
This file is usually in .gitignore, and Android Studio generates it automatically. But when you build your project in Jenkins, it does not open Android Studio.
I found a salesforce plugin for intellij IDEA (link), and now trying to install it. The problem is, i've never done this before. So according to instruction:
How to build and install
Until the plugin is released into the IntelliJ plugins repository, you
can following these instructions for manually building and installing
the plugin from GitHub:
Update the ANT script salesforce-plugin-xml with the location of your IntelliJ IDEA install
<!--property name="idea.path" value="C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0.2"/-->
<property name="idea.path" value="/Applications/IntelliJ IDEA 13.app"/>
Execute the 'package' target of the ANT script - this will create a salesforce-plugin-#.#.zip file in the out directory
Go into IntelliJ IDEA settings under Plugins and select "Install plugin from disk". Select the zip file and click Ok.
I downloaded a project from github, added path to idea to salesforce-plugin.xml. Then i realized that i don't have an ant to build it. I installed homebrew, installed ant, checked the version (ant appeared, ok).
Then i stuck. I tried different combinations, how to package the plugin, The last attempt is when i changed salesforce-plugin.xml to build.xml and wrote in terminal:
ant package build.xml
got:
Buildfile: /Users/cooler/Downloads/salesforce-plugin-master/build.xml
BUILD FAILED
/Users/cooler/Downloads/salesforce-plugin-master/build.xml:36: taskdef
class com.intellij.ant.Javac2 cannot be found using the classloader
AntClassLoader[]
Can you help me please to do this in right way!?
BTW, i use Mavericks
On a Mac, you need to add /Contents to the root path of the IDEA installation. For example:
<property name="idea.path" value="/Applications/IntelliJ IDEA 14.app/Contents"/>
When generating ant build scripts:
build -> generate ant build
-> check "use current idea instance for idea.home property"
Re-generate the ant build scripts. Now the build should work propertly.
I've just updated my Worklight Studio from 6.0.0.1 to 6.1.0 and with the update I've gone ahead and updated the worklight-build-tools.jar on my path. It's worth mentioning that my team has already updated the project we're working on to 6.1.0.
Following the update, I ran the ANT tasks to build and deploy all project artifacts.
The result, I wasn't able to deploy the adapters to the local development server.
I unzipped the worklight-build-tools.jar and poked around for a while and found the adapter-deployer task has been moved to a different location within the jar. I added the new taskdef to my build.xml and got the error below.
Can someone shed some light on this? The class doesn't seem to exist in the jar at all.
Here is the error from the ant:
Buildfile: /Users/mario/Documents/workspace/workspace-myproject/MyWorklightProject/build.xml
BUILD FAILED
/Users/mario/Documents/workspace/workspace-myproject/MyWorklightProject/build.xml:35: taskdef class com.ibm.worklight.config.ant.appserver.UpdateAppServerTask cannot be found
using the classloader AntClassLoader[/Users/mario/Documents/workspace/workspace-myproject/MyWorklightProject/worklight-build-tools.jar]
You can find worklight-ant-builder.jar and worklight-ant-deployer.jar after installing Worklight Server 6.1, and looking in the WL_INSTALL_DIR/WorklightServer/ folder.
worklight-ant-builder.jar is for these tasks:
http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.deploy.doc%2Fdevref%2Fr_ant_tasks_deploy_projects.html
http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.deploy.doc%2Fdevref%2Fr_ant_tasks_buld_deploy_apps.html
worklight-ant-deployer.jar is for these tasks:
http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.deploy.doc%2Fdevref%2Fr_ant_tasks_buld_deploy_adapters.html
http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.deploy.doc%2Fdevref%2Fr_ant_tasks_for_deploying_and_configuring.html
I'm getting this error from a while. I have 28 classes in a project and when I run it fails to make the package. It says:
"Error: jar command failed: jar -cfm "E:\Blackberry Workspace\Kenexa\deliverables\Standard\7.1.0\Kenexa.jar" C:\Users\Acer\AppData\Local ... Kenexa
line 0 BlackBerry Packaging Problem"
But when I limit the classes to 24 then it makes the package. Is it related to some size limit while making the package? What should I do to make the package successfully?
Thanks
Answer from Blackberry Support
Are you using the BlackBerry JDE or BlackBerry Java Plug-in for Eclipse?
If you are using the BlackBerry JDE you could be running into an issue where you have reached the maximum supported length for a command line (all files are listed on a command line). If this is the case you could resolve it by reducing the number of classes (as you have done) or by reducing the length of the path to your source files (move them closer to the root of your drive).
Mark Sohm
BlackBerry Development Advisor
So, I just have to change my workspace folder name from "Blackberry Workspace" to "Workspace". The command line was not taking long path.
After breaking out the troubled command :
/usr/jdk/jdk1.5.0_07/bin/java -Dant.home=. -cp $CLASSPATH:./build/classes org.apache.tools.ant.Main -emacs bootstrapI got the error:
BUILD FAILED
Could not load the version information
Before breaking out the above commad line I ran a complete ./build.sh and ./build install command and got:
Buildfile: build.xml
bootstrap:
prepare:
check_for_optional_packages:
build:
Created dir: /export/home/rs841k/tmp/apache-ant-1.6.0/build/lib
Compiling 233 source files to /export/home/rs841k/tmp/apache-ant-1.6.0/build/cla
sses
javac:
Does anyone have any idea what is happening here and how to resolve it?
This is happening: You're passing source and target parameters to javac. Source seems to be 1.5, and target 1.1. This is a combination that is not allowed. The compiler does not know how to build JVM-1.1-compatible byte code from your sources, which might use 1.5-specific features.
This Oracle article explains the details:
javac does not accept a target (or compilation strategy) lower than the source language it is configured to accept. Each new version of the source language is generally accompanied by a new ClassFile version that allows the ClassFile to give meaning to new bytecode instructions, flags, and attributes. Encoding new source language constructs in older ClassFile versions is likely to be difficult. How would javac encode annotations from the Java 1.5 source language without the Runtime[In]Visible[Parameter]Annotations attributes that appeared in the 49.0 ClassFile?