dalvik

Does the Dalvik file format (*.dx) support more instructions than a Java .class file?

Is there anything the Dalvik VM supports (in terms of bytecode) which is not used currently because the .class files don't have it? As an example, if people would write their own Source-to-DX converter for their functional language XYZ, would they be able to implement e. g. full tail calls although the .class file does support tail call...

Android: Conversion to Dalvik format failed: Unable to execute dex: null

I'm trying to use the SmugFig SmugMug API on Android. It was designed for J2SE I would imagine, so I'm not sure it will even work on Android, but I figured it was worth trying as opposed to trying to create my own API. When I load the project though, I get the following error: Conversion to Dalvik format failed: Unable to execute de...

Why is the JVM stack-based and the DalvikVM register based?

I'm curious, why did Sun decide to make the JVM stack-based and Google decide to make the DalvikVM register based? I suppose the JVM can't really assume that a certain number of registers are available on the target platform, since it is supposed to be platform independent. Therefor it just postpones the register-allocation etc, to the ...

WITH_OBJECT_HEADERS enabled GC from Dalvik?

Hello, As I know Dalvik VM does not support generational GC as default. But, I found "WITH_OBJECT_HEADERS" compilation flag which could be related with generational GC from HeapInternal.h file. typedef struct DvmHeapChunk { #if WITH_OBJECT_HEADERS u4 header; const Object *parent; const Object *parentOld; const Object *m...

Speed up compilation with mockito on Android

I am currently developing an android app in eclipse using: One project for the app One project for the tests (Instrumentation and Pojo tests) In the test project, I am importing the mockito library for standard POJO testing. However, when I import the library, the compilation time skyrockets from 1 second to about 30 seconds in eclip...

How to load a Java class dynamically on android/dalvik?

I'm wondering if and how one can load dex or class files dynamically in dalvik, some quick'n'dirty test function I wrote was this: public void testLoader() { InputStream in; int len; byte[] data = new byte[2048]; try { in = context.getAssets().open("f.dex"); ...

Resolve error while loading 'dexed' JAR on Android

Hi, I'm trying to make a bundle for Felix on Android which may take photos regularly. All the code compiles well and it can be resolved by Felix, but when I try to start it, I get an exception (java.lang.VerifyError) and this trace in logcat : I/dalvikvm( 738): Failed resolving Lbarcode/android/CameraHandler; interface 1 'Landroid/har...

ClassNotFoundException Android

Hey y'all, So I ran into a problem today while working on my Android program. I have a class that turns that an XML string into a Java object (third party) and it works fine in as a regular java project but on Android I get this weird error: 06-21 22:44:26.402: DEBUG/App(259): java.lang.ClassNotFoundException: com.package.mycode.Class ...

Dalvik JIT compiler on Linux X86 or Mac build

Hello, As I've heard from Google IO 2010 session, Dalvik JIT compiler just support ARM processor. Do this mean my own build of Android source on Linux X86 or Mac OS X can not support JIT compiler? Should I use some target board with ARM processor to test Dalvik JIT compiler? Thanks! ...

The control flow of Dalvik Virtual Machine's application method

Dear Sirs, We are implementing some of the event callbacks of JVMTI ( http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/ ) in the Dalvik VM. However, we are having trouble in event Method_Entry and Method_Exit. In our current implementation, we can only intercept the Method_Entry event of the some system initialization methods, including...

eclipse fails to "build workspace" on large android files...?

hi there! i have a severe problem with eclipse, where i need to compile a somewhat larger class. by "larger" i mean, the class has about 5000 lines of code... problem is that on saving this project, eclipse takes several seconds (30-40) to "build the workspace". to be exact, it says "50%" and keeps saying that for 30-40 seconds. then, ...

Conversion to Dalvik format failed with error 1 with javax/net/SocketFactory.class

Hello everyone! Encounter this problem when trying to Build Project getting such output in console: [2010-07-19 23:29:23 - myProject] trouble processing "javax/net/SocketFactory.class": [2010-07-19 23:29:23 - myProject] Attempt to include a core VM class in something other than a core library. It is likely that you have attempted to i...

How to integrate Scala into core Android platform?

I am interested in integrating Scala (or some other non-Java JVM-language) into the android platform. I am not referring to writing an android application with Scala, that I did early early on, but actually hooking into the build process that builds the android platform source tree. I imagine this will be a matter of hooking into the mak...

Class instance sizes in Android

Hi guys, I'm currently implementing some image processing code for Android. I'm aware of the memory limits and am happy to code within them. However, I cannot find any documentation that lets me work out how many bytes are used for each instance of a given class that I might want to instantiate (on the heap). I'm an experienced C++ pro...

what is the most viable free alternative to java language?

With Oracle suing Google over Dalvik's patent infringements, I'm wanting to get off the Java bus I've been on for 10+ years. I really enjoy coding in Java, love the tools (eclipse, profilers, etc...), cross platform, garbage collection, etc... What is the best alternative out there? I'd like to build cool gui's, mobile apps, web apps,...

DalvikVM Vs JavaVM in Android?

Hi Folks, In General, Android runs the each App as a seperate process in Dalvik Vm. I got this from the Doc. But i can not understand what is the main reason to go to Dalvik VM for Android. What are the Advantages it has than Java VM. Share your Knowledge. It helps. Thanks in Advance. ...

How can I compile Dalvik to run it locally on Linux?

What are the minimal steps necessary (including retrieving the source code) to compile and run just the Dalvik virtual machine on Linux? Thanks. ...

Reference a jar or compile it with Dalvik?

I have a jar that I need to reference from my Android project. I also have the src of the jar, so I could include it in the project itself. I was wondering if referencing a jar vs. compiling it in with the project using Dalvik makes any difference in terms of final Dalvik package size that gets generated. ...

Is it possible to block outgoing SMS on an Android phone?

Is there a way to listen for outgoing SMS messages in Android? If so, is it possible to prevent the message from being sent? ...

Having trouble getting Joda-time to run on Android.

Hello, I'm learning Android and have need for dates/times. I was recommended Joda-time by a colleague, which seems to be exactly what I need to make progress. Unfortunately, I'm having trouble getting it to work. I'm using intellij and this is Android 2.2. Steps I took: Download the Joda-time jar from the website. Intellij > File > ...