I'm using dx.bat to prepare my java code and java libraries I'm using for device. I have several .jar's, and the tool always hangs on the same class. It doesn't finish or report any errors. If I remove the .jar that contains that class, then dx.bat completes successfully, but the app won't run, of course, because classes are missing.
The .jar causing problems is aws-android-sdk-1.4.0-core.jar, from Amazon. The class is com/amazonaws/javax/xml/stream/StaxErrorReporter$1.class
I've searched extensively and found other dx errors, but not this one. Has anyone else seen this happen?
UPDATE: I'm running dx.bat from a java build tool I made when it hangs. I tried running the same command from the windows command line, and it runs just fine. So the problem appears to be with java?
Well, it turns out the problem was my java code that was running dx.bat. The issue is explained here:
Java Process with Input/Output Stream
I redirected the error stream, and now it's working.
Related
Im still on my big project with the topic of porting a big program written in c/c++ to Android.
It worked out fine so far and I could build it succesfully. But there is a problem when executing the files. First of all, there a problem with the libraries. I understand that RPATH is not provided with android.
So doing the following helped a little: LD_LIBRARIES_PATH=./lib programmBinary -v
This command shows the version info.
However, if I want to execute the program with this command it is stuck. Every binary I want to execute with this command is stuck and hangs up. For example there is a binary file which creates an .img during the build process. The binary depends on several other files in order to build the .img file. All necessary file are on the device. When executing the command to create the image its immediately stuck.
Could that be a problem with this command?
I also tried changing my CMakeLists.txt and set the it to set (CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
Nothing changed. -v works and the rest not.
Any idea?
Maybe the problem lays somewhere else? In addition, some infos:
The program builds fine on linux. The .img File also creaties fine. Except when im using the LD_LIBRARIES_PATH=... command. Then I get an error message on Linux too. It says:
Error 3.1: Failure during initialization: File "" is unreadable.
Logic error: Error building kernel image. Image not saved.
fish: Job 1, 'LD_LIBRARY_PATH=./lib executable filename.img' terminated by signal SIGILL (Illegal instruction)
I appreciate any help.
Thank
Thomas
I tried to send my CodenameOne application to the build server, but I keep getting this build server error: http://pastebin.com/Rr2GLQWR
(It contains too many characters for Stackoverflow..)
It is running in the simulator and the last line of the error says
(build should be done)
I found a possible solution giving it the android.gradle = false build hint, but that didn't matter though.
I have no clue what is wrong.
Do you have a file named .class within your distribution?
Did you change the java language level to Java 8 or something like that in the project after it was created?
You can't do that if you originally created a Java 5 project see http://www.codenameone.com/blog/java-8-support.html
I'm relatively new to Android and I have a problem using the ndk-build command.
I use the NDK r9d under Windows 7 64bits.
When I run my build system which creates my Android project (makefiles etc...) and then creates a process running ndk-build.cmd (I checked that it is call in the Android project) I get the error:
make.exe: *** create_child_process: DuplicateHandle(In) failed (e=6)
But when I run ndk-build.cmd "manually" in the windows command console in the same Android project created by my build system (or any Android project) everything is working.
I did find some related questions like here:
https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014825836
https://cygwin.com/ml/cygwin/2004-09/msg01506.html
But all I found says either that it's a problem of make version which is not (I think) since ndk-build works fine when I use it "manually" or it says that it is related to stdin handling and again I don't think that the issue here. Plus all the anwsers that I found was related to a similar error but not exactly the same:
process_easy: DuplicateHandle(In) failed (e=6)
Maybe someone knows the meaning of my error message. I don't think that's specific to Android ndk-build but maybe.
Thank you for reading (and sorry for any english mistakes, I am french and not fluent in english)
Finaly, I found a solution to my problem here:
http://www.zeusedit.com/zforum/viewtopic.php?t=174
I am not sure about what the problem was but according to this link, it was related to the make environment and the handles.
The solution : Instead of using the createProcess function (from Windows) directly to call ndk-build.cmd, I created a batch file containing:
start ndk-build.cmd
And I called this batch (.bat) via the createProcess function.
I let you see the link for more details.
So, I have tried everything that I know of possible. I ran an export CLASSPATH=/path/to/bin/classes, and it still isn't able to find the output. I've tried running the command from $PWD/bin/classes, the project's root, and STILL am having troubles getting this to work properly. I have the latest version of the ndk (r8-1 at the time of this writing) and the sdk as well. Generating header files via command line, etc.
So far, I've seen Javah error while using Jni, as well as another question which specified the same problem and received the same answers.
I'm running Arch Linux (Archbang, specifically) in x86_64.
Here's my invocation and output (executed from $PROJECT_ROOT/bin/classes):
javah -d ../../jni com.example.fibonnacinative.libfib
Error: Could not find class file for 'com.example.fibonnacinative.libfib'
I've tried with the -classpath, -verbose, etc. flags and neither appear to help. -classpath just spits out the same error, and -verbose does not give me any information apart from the output I've posted.
Halp?
Yup! It was based on my stupidity.
I should have followed casing conventions for LibFib by typing com.example.fibonnacinative.LibFib as opposed to libfib.
Note: the class itself is typically camel case, whereas the rest of the package directive is lowercase. These are just conventions, mind you.
Sorry folks.
I am trying to resolve this issue http://code.google.com/p/android/issues/detail?id=24417
I want to put a break point (or logs if possible) in the regionMatches() method of java.lang.String package in Android ICS.
I tried multiple times using Eclipse, the code never breaks at that point. I even tried putting a break-point into a calling method and then Stepping into it, but it simply doesn't works for String.java but works fine for every other thing I tried.
I have the same problem with JDK 1.5. The problem is that you class files doesn't contain some debug byte-code information. Solution, that I found was to download the source and recompile it's with debug information enabled.
See Determine whether .class file was compiled with debug info? for more details.