I have Windows 8.1, Android Studio and NDK installed.
I am making an OCR android app and following this tutorial
http://www.codeproject.com/Tips/840623/Android-Character-Recognition
I am facing a problem at building the project.
I updated my PATH in System Variables to
“C:\Program Files\Java\jdk1.8.0_25\bin;D:\Softwares\Studies\Android\android-sdk\tools;D:\Softwares\Studies\Android\android-ndk-r10d”
And then first I executed “ndk-build” command on DOS which executed successfully and then when I executed this command
“android update project --path D:\Softwares\Studies\Android\OCR\Code_Project\tess-two-master\tess-two”
I got this error:
“ `'xcopy' is not recognized as an internal or external command, operable program or batch file`.
Error:
The project either has no target set or the target is invalid.
Please provide a --target to the 'android.bat update' command.
”
I ve searched all over the internet but could not find the solution, can you please help me with this?
Thanks
I have searched the whole internet and could not find a single place where the proper ans is given.
This had basically two parts:
i) "xcopy" is not recognized
ii) The project either has no target set or the target is invalid.
Please provide a --target to the 'android.bat update' command.
The first part part can be solved by any of the two ways:
i) Moving xcopy.exe file from Windows/System32 folder to android-sdk\tools folder OR
ii) Adding %SystemRoot%\system32 to PATH in System Variables in Environment Variables. The PATH must contain android-sdk\tools;android-ndk-r10d;%SystemRoot%\system32 at least.
Now comes the second part. Enter this command:
android update project --path (location of tess-two folder) --target android-19 (19 is the API level here and may vary)
for e.g. android update project --path D:\Softwares\Studies\Android\OCR\Code_Project\tess-two-master\tess-two --target android-19
THAT'S IT. Hope it is clear even to someone who is very new. :)
Ps. If you find it useful, please do vote up, I am new and need reputations. :)
This blogpost has a elaborate description on how to build tesseract on Windows using Eclipse.
Related
I am having issue when trying to associate my intelliJ project with JDK in JetStream Xsede cloud. Whey trying to access the directory through intelliJ, I can see a locked folder icon which don't allows to access it.
Steps that I followed to set the JDK in intelliJ:
Open project structure (CtrlAltShifts)
Go to Project Setting->project
Click on the new Button under Project SDK
Please let me know if any further information are required to recreate the issue.
I resolved this issue by performing
chmod 777 /usr/lib/jvm in the terminal.
Once I run this command, the lock design disappears, and the directory becomes accessible.
Thanks.
Prashant
I just started working with Cordova/PhoneGap and when I want to use the command "cordova run android" on my newly created application, it goes somewhat like this:
C:\Users\tobbog\Desktop\MyNewApp>cordova run android
ANDROID_HOME=C:\Users\tobbog\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_144
The system cannot find the path specified
However, the two paths above are both perfectly like that in my Environmental Variables. How can it be that it doesn't find the path?
Thanks in advance for any help!
Remove android by the below command
cordova platform rm android
Then add the version 5 by the below command
cordova platform add android#~5
That should help!
You may also want to place the paths in quotation marks " ", since it's possible the space in "Program Files" is throwing it off, I know this happens often when trying to run certain programs via command line that take file arguments. So maybe write it like this:
C:\Users\tobbog\Desktop\MyNewApp>cordova run android
ANDROID_HOME="C:\Users\tobbog\AppData\Local\Android\sdk"
JAVA_HOME="C:\Program Files\java\jdk1.8.0_144"
Can't be 100% sure though as I'm unfamiliar with what that program expects (cordova) and other options that may be supplied to it! You could always try checking the readme or documentation related to that program, it probably shows some examples as to how to run something similar.
See how it even changes in the Stack Overflow text formatting? It's possible once it hits that white space after Files (in C:\Program Files) that it's ignoring the rest of the path, so basically you're trying to specify this path for JAVA_HOME:
C:\Program
And that's it! Would explain why it can't find that path since you probably don't have just a "Program" directory!
I found the answer to my problem! The problem was that I installed and uninstalled the Android Development Kit before. During the uninstal, it didn't delete all of the folders so that I had to delete them manually before installing Android again.
I just install Android Studio 1.5 on Ubuntu 14.04. I created a new project and I get the following error:
Error:Could not determine Java version using executable /usr/lib/jvm/java-1.5.0-gcj/bin/java.
My /usr/lib/jvm/ contain:
java-1.5.0-gcj java-7-oracle java-gcj
java-1.5.0-gcj-4.8-amd64 java-8-oracle java-gcj-4.8
The Project Structure has the JDK location set up to /usr/lib/jvm/java-1.5.0-gcj. Should it me something else ? How can I know ?
Many thanks for you help !
I solved my problem by simply changing the JDK to /usr/lib/jvm/java-8-oracle. I still don't know why it works, or why it should have been like this at the first place.
Sorry for the question.
The problem occurred because location of the JDK directory was not defined correctly.
In Android studio File ->Project structure ->in left side tabs click on SDK location->define the directory where JDK is located .
For example:/usr/lib/jvm/java-8-oracle/jdk1.8.0_77 is my directory of JDK.The location can be different.
Another variant:
Replace homePath value in ~/.AndroidStudio1.5/config/options/jdk.table.xml on /usr/lib/jvm/java-8-oracle/bin/java
I'm building an Eclipse RCP application against Eclipse 3.7.1 and Java 1.6.
I'm also using Tycho to build, and have set up my RCP according to the Tycho tutorial from the EclipseCon 2011, to which I've stuck slavishly, apart from project names.
The application builds fine up until I get to Step 5 (adding a p2 repo, then adding a .product file. Well, it still builds fine, and everything is where it should be, but I cannot start the RCP by clicking on the .exe file from the repository in the workspace.
All I get is the old dreaded "The [RCP] executable launcher was unable to locate its companion shared library" error popup.
First of all I thought I might have set up the CLASS PATH incorrectly, but when I open a console and type javaw or java -version anywhere, it all works.
Also, when I go to the pluginsfolder in the p2 repository for the RCP in the workspace, and double-click on org.eclipse.equinox.launcher_1.2.0.v20110502.jar, the RCP starts, albeit without the splash screen.
This must surely mean my Java set up is correct, and it's not a class path problem?
I'm not sure where this problem might lie (I have a plugin, a feature, a product, a repository, and a parent package with the main pom), so if you let me know your suspicions where the error might come from, I'll be more than happy to post respective XML, build.properties, screenshots and what have you. Unless this is a common error with a common solution.
Many thanks in advance!
Oh yea: Windows 7 (64-bit), JDK and JRE both 64-bit as well, Eclipse EE 3.7.1 (I chose that because it contains the most plugins I'll need later by default).
UPDATE
I'm attaching my CLASS PATH Settings for reference.
User variables
CLASS PATH: C:\Program Files\Java\jdk1.6.0_30;.;
System variables
JAVA_HOME: C:\Program Files\Java\jdk1.6.0_30
Path: %JAVA_HOME%\bin;
UPDATE 2
When I let Tycho create a ZIP file in the p2 repository, and copy that from the repo to another location, unzip it and run the .exe, the application starts without problems. So I guess this query is partially solved, but I'd still be interested to hear why I wouldn't be able to start the application from the repository...
Today I came across the same issue. I guess you could find the solution here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=176084
In short, the problem in my case was, that the org.eclipse.equinox.launcher_1.2.0.v20110502.jar must be unpacked in the plugins folder under the folder name: org.eclipse.equinox.launcher_1.2.0.v20110502
... hope that helps!
In my case the error The [RCP] executable launcher was unable to locate its companion shared library was because my path was too long.
Same issue I was facing from yesterday. Today, I have changed path of project(git clone) and build it and able to run RCP executable.
I think this issue was because of path too long.
Error - JVM - BlackBerry 9800
Simulator
--------------------------------------- JVM: could not open
C:\Users\Bayron.Tellez\Downloads\eclipse-java-helios-win32\eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29\components\simulator\Java\net_rim_bis_lib.cod
My friend installed Eclipse with the Blackberry simulator. I'm assuming it was a portable installation because at no point we were prompted to install.
Now, he zipped it up and copied it to my machine when running I receive that error above. Obviously it's because it's trying to look for something on my friends directory. How can I change it to my path?
My path is:
C:\Eclipse\eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29\components\simulator\Java\net_rim_bis_lib.cod
Where do I change this?
I would suggest not running eclipse from a copy of someone else's installation. This will probably contain lots of installation-specific files which are unlikely to match your machine.
Why not install it yourself, then install the Blackberry Java Developer plugin? It's available at http://na.blackberry.com/eng/developers/javaappdev/devtools.jsp
You can change the early installed paths of all .cod files from xml.manifest
[Eclipse Installed Path]\plugins\net.rim.ejde.componentpack7.1.0\components\simulator\[BlackBerry simulator version].xml.manifest
Eg:
C:\Program Files\Eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.30\components\simulator\9800.xml.manifest
Then remove the [BlackBerry simulator version].xml.manifest.bin file.
Now it should be work.
You may also want to check file Settings.rc,
found in the folder
PATH\plugins\net.rim.ejde.componentpack4.6.1_4.6.1.49\components\bin
first you have a path to your eclipse installation, and then corresponding Simulator you are trying to run.
hope this helps,
Use notepad++ to replace all occurrances of old directory into new directory in the eclipse directory.
Start the eclipse, and click clean simulator button.
That should be all.
Though it is not advisable to run a copy of eclipse, there is a very simple way for one to solve such a problem: it is by running the clean.bat file that is in the simulator folder of the specific component pack version folder. The path to that file would look like this: PATH\plugins\net.rim.ejde.componentpack[BlackBerry version]\components\simulator\clean.bat
I think that would do.
Still, installing a new version is the best option.
It will be better you install it yourself frsh rather than copying it from friends machine.
But you can give it a try.
Goto your eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29 directory and check do on of these files contain this path:
plugin.properties
plugin.xml
META-INF/eclipse.inf
.options
Or else you could grep for problem path in your plugin directory and replace same with updated path.
This error occurse cause your simulator have previously loadded application. Removing them solve your problem.
How to remove installed Java programs on the simulator?
Quote from Reset and clean the blackberry simulator:
Are you sick of having a million icons on your BlackBerry simulator for every HelloWorld and demo project you have every tested? Try this to remove old programs from the simulator and start with a clean ribbon. From the command line browser to your rim jde directory, switch to the simulator sub directory and run clean.bat. This program takes longer than you would expect (about 30 seconds or so on my 3 ghz machine).
UPDATE
Also delete all [app name].cod|cso|debug|jar files from simulator folder Also make sure projects you don't want on simulator are not active and are not in build configuration.