Iam trying to run draw9patch tool from android sdk(ver.10), and it gives me exception with error trace like this:
sh ./draw9patch
Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173)
at java.awt.Window.<init>(Window.java:437)
at java.awt.Frame.<init>(Frame.java:419)
at javax.swing.JFrame.<init>(JFrame.java:218)
at com.android.draw9patch.ui.MainFrame.<init>(MainFrame.java:44)
at com.android.draw9patch.Application$1.run(Application.java:48)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:647)
at java.awt.EventQueue.access$000(EventQueue.java:96)
at java.awt.EventQueue$1.run(EventQueue.java:608)
at java.awt.EventQueue$1.run(EventQueue.java:606)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:617)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Ok, problem solved.
I removed OpenJDK, and installed oracle jdk, and now everything works fine.
This means that either your computer is running no X or similar or that it can not connect to the X server (e.g. because you are logged in from a remote via ssh without X forwarding).
If you are running X, it may mean that some library path is messed up and the java executable is not able to find some libX* libraries.
Related
I need to evaluate the image quality of several images using the arcoreimg tool to process a failed build in Unreal using blueprints.
I'm running on a Mac, but far more familiar with a PC. I've tried the following:
./arcoreimg eval-img --input_image_path=/Users/scull/Documents/Proj/Content/images/s_recog_turl.png
No such file or directory
I have located the ptdbtool_macos_lipobin tool in the ~Library and tried running it from there but to no avail:
/Users/Shared/Epic Games/UE_4.21/Engine/Plugins/Runtime/GoogleARCore/Binaries/ThirdParty/Google/ARCoreImg/Mac
Can anyone point out where I'm going wrong?
To my future self:
Use
./ptdbtool_macos_lipobin eval-img --input_image_path=/Users/scull/Documents/Proj/Content/images/s_recog_turl.png
Looks like someone at Android forgot to rename the executable to arcoreimg.
I try to figure out some problem caused by thread sync in mips android, I installed valgrind in my mips machine, It is ok when using memcheck, but when I changed the option to --tool=helgrind, logcat says this:
I/start_valgrind.sh( 9328): link_image[2207]: 9329 could not load needed library '/data/local/Inst/lib/valgrind/vgpreload_drd-mips32-linux.so' for '/system/bin/app_process' (mips_relocate_got[1749]: 9329 cannot locate 'sched_yield'...
I located sched_yield in /system/lib/libc.so, but I can't find a way to add it to the link path; I using valgrind-3.10.0 and my android system version is 4.1.
So is it possible to run helgrind/drd in android? Thanks!
On my Windows 7 platform, I have the latest version of adt bundle (20140321) and ndk (r9d) installed. The installation is as clean as it gets. The environment variables NDK_ROOT, PATH, etc. are all defined properly.
The application that I am working on has some native code that gets built with armeabi-v7a ABI. The app platform is andorid-19. Project settings define build as "ndk-build NDK_DEBUG=1."
From Eclipe, when I debug my application on my samsung tablet as "Android Java Application," everything works as expected. However, when I try to debug the app as "Android Native Application," I get the following error:
Attempting to connect debugger to 'com.mycomp.myapp' on port 8604
gdbserver output:
Cannot attach to lwp 28275: Operation not permitted (1)
Exiting
Verify if the application was built with NDK_DEBUG=1
The application runs fine on the device though.
I have looked at various messages on stackoverflow. However, I could not find any concrete step to fix this problem. Would appreciate if you can guide me in the right direction. Regards.
I have same problem. After wasting some time I found that when I return my simple function without any operation problem does not occurs.
void dmpBuffer(char* msg, unsigned char* buffer, int buffLen)
{
//return;
char szDumpBuffer[128];
for(int i=0; i<buffLen; i++)
sscanf(&szDumpBuffer[i*2], "%02X", buffer[i]);
LOGE("%s:%s", msg, szDumpBuffer);
}
maybe it is because of memory problems.
Update:
As I had Guessed it was memory problem.
My BIG mistake was using sscanf instead of sprintf!!!
My problem solved.
I was only looking for an ssh terminal that didn't require rooting my phone when I stumbled across Terminal-IDE and I am THRILLED that I did! (More from its creator here.) It's an Android development environment designed to work on the portable computers known as "Android phones" and it includes what you might call an "accessable Linux operating system for non-rooted phones."
OK, now that you know what the platform is, the issue is that when I start the provided sshd and log into the phone remotely using ssh, I can't seem to get any of the java (Dalvik) machinery to work, while the same action typed locally works fine. A simple example is the Hello World Tutorial, wherein you run the java compiler thus:
# javac hello.java
The result from the local interface is a bright-shiny new hello.class. When done from the ssh login (running bash), it results in:
# javac hello.java
Dalvik VM unable to locate class 'com/spartacusrex/spartacuside/external/javac'
java.lang.NoClassDefFoundError: com/spartacusrex/spartacuside/external/javac
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.spartacusrex.spartacuside.external.javac
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
... 1 more
Of course, one looks to environment variables...
The following are in the local environment but are either not in the remote environment or are different:
LOOP_MOUNTPOINT=/mnt/obb
ASEC_MOUNTPOINT=/mnt/asec
ANDROID_PROPERTY_WORKSPACE=9,131072
ANDROID_SOCKET_zygote=10
ANDROID_BOOTLOGO=1
BOOTCLASSPATH=/data/data/com.spartacusrex.spartacuside/files/system/classes/android.jar:/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/HTCDev.jar:/system/framework/HTCExtension.jar:/system/framework/com.htc.framework.jar:/system/framework/filterfw.jar:/system/framework/com.htc.android.bluetooth.jar:/system/framework/wimax.jar:/system/framework/com.orange.authentication.simcard.jar
PATH=/data/data/com.spartacusrex.spartacuside/files/bin:/data/data/com.spartacusrex.spartacuside/files/local/bin:/data/data/com.spartacusrex.spartacuside/files/android-gcc-4.4.0/bin:/data/data/com.spartacusrex.spartacuside/files/system/bin:/data/data/com.spartacusrex.spartacuside/files/system/bin/bbdir:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
PWD=/data/data/com.spartacusrex.spartacuside/files/system/src/helloworld
EXTERNAL_STORAGE=/mnt/sdcard
The following are in the remote environment but are either not in the local environment or are different:
ANDROID_PROPERTY_WORKSPACE=10,32768
ANDROID_BOOTLOGO=1
USER=username
BOOTCLASSPATH=/data/data/com.spartacusrex.spartacuside/files/system/classes/android.jar:/system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
PATH=/data/data/com.spartacusrex.spartacuside/files/bin:/data/data/com.spartacusrex.spartacuside/files/local/bin:/data/data/com.spartacusrex.spartacuside/files/android-gcc-4.4.0/bin:/data/data/com.spartacusrex.spartacuside/files/system/bin:/data/data/com.spartacusrex.spartacuside/files/system/bin/bbdir:/sbin:/system/sbin:/system/bin:/system/xbin
PS1=\[\033[01;32m\]$USER\[\e[1;31m\]\[\e[1;33m\]#\[\e[1;35m\]$HOSTNAME\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$
MKSH=/system/bin/sh
APK=/data/app/com.spartacusrex.spartacuside-1.apk
LOGNAME=username
EXTERNAL_STORAGE=/sdcard
Of course, my attention has flowed to "BOOTCLASSPATH". I'd never heard of BOOTCLASSPATH before, but it appears to be the replacement for just plain ole "CLASSPATH" we java coders are familiar with...
Proposed solutions are to be found on the code.google.com website under "issues", but none of them work.
The solution is to simply alter BOOTCLASSPATH to contain the same contents in the remote login as with the local one.
Of course, "out of the box," this should not be a problem one encounters. But, Terminal-IDE is a young environment and this is just one of the growing pains.
I am a new Fedora user (having previously always used ubuntu), and I am trying to download eclipse. Unfortunately, "sudo yum install eclipse" is returning "no package eclipse available". I assume this means that I am missing the correct repo, but I can't seem to find the right one / how to add it to my repo list for this version. My version of fedora is centos5 based, and my current repo list is the following:
$ yum repolist
Loaded plugins: fastestmirror, security
repo id repo name status
amzn amzn-v0.9-Base 2,041
rpmforge RHEL 2010.11 - RPMforge.net - dag 10,733
repolist: 12,774
I am doing all of this just for the sake of being able to build android applications from the command line. As far as I understand, running tools/android update sdk requires eclipse (since it is currently giving me an error complaining that eclipse is missing) That said, I am perfectly happy to not install eclipse, if there is a way around it.
The error I am getting from /tools/android update sdk is:
No command line parameters provided, launching UI.
See 'android --help' for operations from the command line.
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3550 or swt-pi-gtk in swt.library.path, java.library.path or the jar file
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.gtk.OS.<clinit>(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at com.android.sdkmanager.Main.showMainWindow(Main.java:297)
at com.android.sdkmanager.Main.doAction(Main.java:265)
at com.android.sdkmanager.Main.run(Main.java:99)
at com.android.sdkmanager.Main.main(Main.java:88)
Thanks in advance for any input anyone has!
Regards
Avtar
Download Eclipse from here:
http://www.eclipse.org/downloads
You will get a fresher version than from Linux repo.
Eclipse is available on RPMFusion[1], so it'd be great if you install RPMFusion repo (they come in two versions: Free and non-free. I highly recommend installing both)
[1] http://rpm.pbone.net