Unable to launch cygpath - java

I am new to openCV and I downloaded it to work with it in Eclipse Juno.
I have download version 2.4.6 and I have download NDK version R9 and I am working on windows platform and still can't run the tutorials of openCV because of the following errors. I followed the steps on this documentation .
I tried to change the path on the build path part (C:\android-ndk\android-ndk-r9\ndk-build.cmd NDK_DEBUG=1)
[2013-10-29 18:06:56 - Unable to launch cygpath. Is Cygwin on the path?] java.io.IOException: Cannot run program "cygpath": CreateProcess error=2, The system cannot find the file specified
[2013-10-29 18:07:12 - ManagerActivity] Manifest attribute 'minSdkVersion' is set to '#ANDROID_NATIVE_API_LEVEL#'. Integer is expected.
[2013-10-29 18:07:13 - package] Manifest attribute 'minSdkVersion' is set to '#ANDROID_SDK_VERSION#'. Integer is expected.

I don't think you need Cygwin when using NDK-R9. I think it was integrated in with R8 (or whatever they did to get around it). So you can ignore that error. I get that error as well, I'm looking how to get rid of it. But this error does not stop me from compiling. I've been ignoring it.
As far as the other two errors, they mention it needs an integer value. You need to put this element into your Manifest.xml file:
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="18" />
... Or use the API level range you plan to comply with

i fixed the problem which was:
NDK version r9 .. has some issues so i have installed version r8b which solved the problem and worked fine .. :))

Related

Gradle aapt error: syntax ")" not found on Android Studio 1.5.1 Linux

Unburden
First of all, I would like to unburden: Android Studio completely sucks and it is by far the worst big IDE I've used all my life long! I got stuck on errors just for opening that thing! And when I have hardly fixed one, seventeen new ones come rightly from the hell to my screen! I am (trying) to use that piece of [you know] for 4 days now, and till now I was not able to code one single line of code! What does an IDE is supposed to be useful for again?
-- Edit1: I just installed the full 1.4.1 version right now and first thing it showed me was: WizardException: Ignoring unknown package filter 'source-25' and others errors.
-- Edit2: I did a new FRESH Mint 18 install in a completely clean partition, installed only Java 7 (Oracle) and tried to run the AS-1.5.1 but... the same error on install and a subtle different log of error messages (please, see the log here) when gradleing.
The problem
Ok, the last problem (1.5.1) is that now I am trying to make gradle to build the "project" (it is just an empty activity created by the wizard, default code untouched) and I get this error:
~/AndroidStudioProjects/MyApplication $ gradle clean build --stacktrace
Incremental java compilation is an incubating feature.
:clean UP-TO-DATE
:app:clean
//...[other succesfull msgs here]...
:app:mergeDebugResourcesAAPT err(Facade for 16120822): /home/sidney/Android/Sdk/build-tools/25.0.0/aapt: 3: /home/sidney/Android/Sdk/build-tools/25.0.0/aapt: Syntax error: Unterminated quoted string
AAPT err(Facade for 22545775): /home/sidney/Android/Sdk/build-tools/25.0.0/aapt: 3: /home/sidney/Android/Sdk/build-tools/25.0.0/aapt: Syntax error: Unterminated quoted string
//...[other repeated errors here]...
Exception in thread "png-cruncher_8" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /home/sidney/Android/Sdk/build-tools/25.0.0/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 60 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
//...[other repeated errors here]...
--- UPDATE: Please, see this other log of the external terminal used to run AS ---
What I've tried to solve that:
Install aapt system-wide;
Switch from Java 8 to Java 7;
Change gradle to off-line;
Change JDK configs to switch from the AS one to the system one;
Set SLAVE_AAPT_TIMEOUT to 30 (I changed back as you can see in the log link)
Set ANDROID_EMULATOR_FORCE_32BIT to true;
Install via ubuntu-make and also via ppa;
And so many others things I could find over Internet.
Environment specs
Linux Mint 18 (32 bits)
AS 1.5.1 (now (trying to use) 2.1.0)
Java Oracle 8 (Already tried the 7)
Why don't I just switch to Eclipse with plug-in
I have a course in mind (in Udacity) and they use that "thing" and it is a prerequisite. I've sent 3 e-mails to them questioning about the possibility of use other IDEs but without answer after 4 days, unfortunately.
Thank you so much for any help!
That error looks like your build tools aren't properly installed/set up. The aapt distributed with the build tools is versioned/linked with the tools, so studio probably isn't going to grab the random system level one. Have you attempted to install them, or did the older Studio version fail to prompt you to do so?
Beyond that, I'm afraid that Studio 1.4 is very deprecated and was missing many, many fixes that are in the newer versions, so it's somewhat likely that you would run into random errors with that version :-( What errors were you encountering with 2.2.1? It would be easier for the Studio team to help address those versus anything you find in 1.4.
My solution? Buy a 64 bits laptop! No installation error, no gradle error, no java error, no error anymore.

Java error while running maxent in biomod2

I am running maxent from R, in the package biomod2 and the following error appeared. I do not come from a technical background and wasn't sure why is this error happening. Is it a memory problem or someone said the java path is not set. But I followed the instructions to set maxent to run in R and also downloaded Java Platform, Standard Edition Development Kit and set a path for it as explained in this pdf: http://modata.ceoe.udel.edu/dev/dhaulsee/class_rcode/r_pkgmanuals/MAXENT4R_directions.pdf
I would be really grateful if you could help me understand this problem and any solution to it.
Thanks a lot
Error in file(file, "rt") : cannot open the connection
In addition: Warning messages:
1: running command 'java' had status 1
2: running command 'java -mx512m -jar E:\bioclim_2.5min\model/maxent.jar environmentallayers
="rainfed/models/1432733200/m_47203134/Back_swd.csv"
samplesfile="rainfed/models/1432733200/m_47203134/Sp_swd.csv"
projectionlayers="rainfed/models/1432733200/m_47203134/Predictions/Pred_swd.csv"
outputdirectory="rainfed/models/1432733200/rainfed_PA1_Full_MAXENT_outputs"
outputformat=logistic redoifexists visible=FALSE linear=TRUE quadratic=TRUE
product=TRUE threshold=TRUE hinge=TRUE lq2lqptthreshold=80 l2lqthreshold=10
hingethreshold=15 beta_threshold=-1 beta_categorical=-1 beta_lqp=-1
beta_hinge=-1 defaultprevalence=0.5 autorun nowarnings notooltips
noaddsamplestobackground' had status 1
3: In file(file, "rt") :
cannot open file 'rainfed/models/1432733200/rainfed_PA1_Full_MAXENT_outputs/rainfed_PA1_
Full_Pred_swd.csv': No such file or directory
I've just manage to solve this problem - it is a problem with the file path specified. For me, I had a space in one of the folder names which was not accepted in the path to the maxent.jar file. From looking at your error, it looks like it might be the two backslashes.
E:\bioclim_2.5min\model/maxent.jar
should probably read
E:/bioclim_2.5min/model/maxent.jar

Android - IntelliJ make fails with the "Error:android-apt-compiler .... execution failed with exit code -1073741819"

I know this question has been asked prior to this in here and here
but I can't seem to find a solution to this issue.
I checked every single thing from
Checking all the resource files, manually running through the strings.xml to even updating IntelliJ Idea (I am using IntelliJ 13) not the Android studio, but unfortunately nothing seems to work.
I am using app-compact in my project to show the ActionBar in Android Versions prior to Honeycomb.'
> Error:android-apt-compiler: Command
> "D:\AndroidSDK\build-tools\19.0.2\aapt.exe package -m
> --auto-add-overlay --extra-packages android.support.v7.appcompat --output-text-symbols C:\Users\Mushtaq\.IntelliJIdea13\system\compile-server\hac_89cbbfa5\android\intermediate_artifacts\HAC\r_txt
> -J C:\Users\Mushtaq\.IntelliJIdea13\system\compile-server\_temp_\android_apt_output5484624330942511062tmp
> -M C:\Users\Mushtaq\Desktop\HAC\AndroidManifest.xml -S C:\Users\Mushtaq\Desktop\HAC\res -S
> C:\Users\Mushtaq\Desktop\HAC\library\appcompat_v7\res -I
> D:\AndroidSDK\platforms\android-19\android.jar" execution failed with
> exit code -1073741819
Finally found the issue, I was had a messed up drawable xml which had a truncated xml namespace, which in turn did not let the R class to generate.
The weird part is it was not showing up in any of the IDE's, it was failing silently and had to go through each and every file to come up with Issue. Not cool Android Lint/IDE, wasted almost a day.
If your Rclass does not generate it is ALWAYS and I mean ALWAYS the issue is with a resource file, do not look/think for one second that the issue is at some place else.Lesson learnt the hard way.
Edit :
I don't understand why the error message thrown by the IDE has to be so cryptic.

Setting the location of debug.keystore for command-line build without rewriting Ant targets

When I run "ant debug" from the command line, I get the following error message:
[apkbuilder] keytool error: java.io.FileNotFoundException: \stulab2\folderRedir
ection$.android\debug.keystore (The system cannot find the path specified)
BUILD FAILED
e:\programs\java\android-sdk\tools\ant\build.xml:919: The following error occurred while executing this line:
e:\programs\java\android-sdk\tools\ant\build.xml:930: The following error occurred while executing this line:
e:\programs\java\android-sdk\tools\ant\build.xml:295: com.android.sdklib.build.ApkCreationException: Unable to get debug signature key
at com.android.sdklib.build.ApkBuilder.getDebugKey(ApkBuilder.java:277)
A very long stack trace follows.
The problem is that I am on a public computer and do not have write access to the folder where Ant expects to find .android\debug.keystore. Some research found the following in the Android documentation:
If necessary, you can change the location/name of the debug keystore/key or supply a custom debug keystore/key to use. However, any custom debug keystore/key must use the same keystore/key names and passwords as the default debug key (as described above). (To do so in Eclipse/ADT, go to Windows > Preferences > Android > Build.)
Unfortunately, this doesn't explain how to change the locationof the debug keystore using the command-line tools.
Several months ago, someone asked basically the same question here on stackoverflow: How can I specify location of debug keystore for Android ant debug builds?. The best answer so far is to rewrite the -do-debug target. From what I can tell, I would also need to set the properties specified.
One problem with this answer is that it uses the same properites as the release build does. Also, it would be nice to simply set the correct properties rather than rewriting (and debugging) the whole -do-debug target. Does anyone know if there are properties that can be set to specify the location of the debug.keystore file?
In .bashrc, set the ANDROID_SDK_HOME environment variable to the location of your Android SDK installation. For example:
export ANDROID_SDK_HOME="/home/myusername/path/to/androidsdk"
Then, in a new shell, running ant debug creates a ${ANDROID_SDK_HOME}/.android/debug.keystore file.
Alternatively, without changing the variable globally, you can simply run:
ANDROID_SDK_HOME="/home/myusername/path/to/androidsdk" ant debug

SunTlsRsaPremasterSecret KeyGenerator not available

I encountered an error when my application tries to load a RSA Algorithm provider class from JAVA. The exception stack is as follow:
javax.jms.JMSException: RSA premaster secret error
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1255)
at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1350)
at org.apache.activemq.ActiveMQConnection.setClientID(ActiveMQConnection.java:388)
at com.trendmicro.tmsm.TMSMAgent.open(TMSMAgent.java:63)
Caused by: javax.net.ssl.SSLKeyException: RSA premaster secret error
at com.sun.net.ssl.internal.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:97)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:634)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:226)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:516)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:454)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:884)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1112)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:623)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
at org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:115)
at java.io.DataOutputStream.flush(DataOutputStream.java:106)
at org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:167)
at org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:237)
at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:168)
at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:84)
at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:74)
at org.apache.activemq.transport.failover.FailoverTransport.doReconnect(FailoverTransport.java:715)
at org.apache.activemq.transport.failover.FailoverTransport$2.iterate(FailoverTransport.java:115)
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available
at javax.crypto.KeyGenerator.<init>(DashoA13*..)
at javax.crypto.KeyGenerator.getInstance(DashoA13*..)
at com.sun.net.ssl.internal.ssl.JsseJce.getKeyGenerator(JsseJce.java:223)
at com.sun.net.ssl.internal.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:89)
... 22 more
I've googled the error message and most of posts says it's because JVM cannot find sunjce_provider.jar. However, I can find the file in /Library/Java/Home/lib/ext folder.
The platform is Mac OS X 10.6 and Java version is 1.6.0_17.
My questions are:
Why JVM does not search /Library/Java/Home/lib/ext for jar files?
Can we change CLASSPATH or java.ext.dirs property by modify any config file?
Any suggestion to solve this problem?
Thanks in advance.
I've had the same problem after upgrading to new Java version on Mac.
My (maven) project ran OK from command line but got the "SunTlsRsaPremasterSecret" error in Eclipse.
The solution was to remove Installed JREs in Eclipse configuration and add them again (using the "Search..." button).
had a similar issue. Adding the classpath to the ext directory fixed it for me. This fix worked for me on windows 7 with java 1.6
java -Djava.ext.dirs=lib -classpath "%java_home%\lib\ext\*" myapp.jar
I think we find the root cause so here is an answer of my own question.
the Java system property "java.ext.dirs" in Mac OS X 10.5 is:
/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext. The sunjce_provider.jar should be in /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext but also be found in /Library/Java/Extensions/ in the problem mac.
the sunjce_provider.jar in /Library/Java/Extensions/ belongs to Java Cryptography Extension(JCE) 1.2.2, which has been installed in the mac. JCE 1.2.2 is an optional package of J2SE 1.3.1 and may not includes enough libraries for J2SE 1.4 and later.
the Java applcation works normally after all JCE 1.2.2 related jar files have been removed from /Library/Java/Extensions/.
It happened to me while launching the tomcat server from eclipse. I solved it by changing the configuration in Windows -> Preferences -> Java -> Installed JREs -> Edit. I had to update all the JRE system libraries with the corresponding jars from the folders in:
%JAVA_HOME%/jre/lib/ext
%JAVA_HOME%/jre/lib/
It seems that after the last update I have changed the JRE_Home but forgot those libraries.
I also had this issue, noticed that the problem was in my Eclipse configuration.
Window > Preferences > Java > Installed JREs > jdk8_64bit > Edit...
The path of my sunjce_provider.jar was pointing to jdk8_64bit\lib\ext\sunjce.provider.jar. It should point to the JRE's equivalent in jdk8_64bit\jre\lib\ext\sunjce.provider.jar.
Had to spend almost a day on this while trying to use JavaMail in Eclipse Luna.
Tried all approaches suggested in various forums, but no luck.
Digged into the complete flow and found the exception arising due to Class is on BootClassPath
from KeyAgreement.getInstance()->JceSecurity.canUseProvider()->JceSecurity.getVerificationResult()->JarVerifier.verify()
void verify()
throws JarException, IOException
{
if (jarURL == null) {
throw new JarException("Class is on the bootclasspath");
}.......
I removed sunjce_provider jar from \ext\ folder and can send mail now.
This might not be right but atleast a quick workaround.
Refer Eclipse bug.
I know, I am joining late here. But for me, this error came suddenly as soon as I changed the Preference -> Java -> Installed JREs -> Execution Environments as JavaSE-1.8 to jdk1.8 path. But it should be jre1.8 path.
I don't know why is it happening now. But It sorted the problem.
Probable solution: Check if jdk path is set till C:\Program Files\Java\jdk1.8.0_171 but not including bin
In my case, I got above same issue, after reading above solutions, I changed JRE Definition and Restore Default. It is working fine now.

Categories

Resources