Questions tagged [dalvik]

Dalvik is a virtual machine used by Google's Android operating system.

From Wikipedia:

Dalvik is the process virtual machine (VM) in Google's Android operating system. [...] Programs are commonly written in Java and compiled to bytecode. They are then converted from Java Virtual Machine-compatible .class files to Dalvik-compatible .dex (Dalvik Executable) files before installation on a device. The compact Dalvik Executable format is designed to be suitable for systems that are constrained in terms of memory and processor speed. [...]

A tool called dx is used to convert some (but not all) Java .class files into the .dex format. Multiple classes are included in a single .dex file. Duplicate strings and other constants used in multiple class files are included only once in the .dex output to conserve space. Java bytecode is also converted into an alternative instruction set used by the Dalvik VM.

1028 questions
33
votes
14 answers

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…
Adam Haile
  • 30,705
  • 58
  • 191
  • 286
33
votes
1 answer

What are the 37 Java API packages possibly encumbered by the May 2014 Oracle v Google decision?

What are the 37 Java API packages possibly encumbered by the May 2014 Oracle v Google decision? What are the 3 packages that the Appellate Court decided were essential to the language? How can I avoid using the encumbered APIs in my Java code? If…
Karl the Pagan
  • 1,944
  • 17
  • 17
31
votes
4 answers

Disadvantages in Multidexing the android application

Recently I have read about the Dalvik 65K method limit. I have understood that the method invocation list can only invoke first 65536 method references. To tackle this, we have a number of solutions. One of which being multidexing where we split the…
adnaan.zohran
  • 809
  • 9
  • 21
30
votes
3 answers

Is Dalvik's memory model the same as Java's?

Is Dalvik's memory model the same as Java's? I am particularly interested in whether reads and writes of reference and non-long/non-double primitive variables are atomic, but I would also like to know whether there are any differences between the…
Daniel Trebbien
  • 38,421
  • 18
  • 121
  • 193
30
votes
2 answers

Android Understanding Heap Sizes

I'm fairly new to Android development and I can't seem to grasp the Java Out of Memory exception. I know it means that my app has gone over the VM budget but after Googling this many times I still don't seem to grasp this concept. I'm afraid that my…
John P.
  • 4,358
  • 4
  • 35
  • 47
29
votes
2 answers

How does Mono for Android work?

I am interested in how Mono for Android (by Novell) works. My biggest question is around the actual runtime's that are used. Is MfA providing a Mono runtime that wraps and calls down to the Dalvik runtime or is the Dalvik completely bypassed in…
nicholas.hauschild
  • 42,483
  • 9
  • 127
  • 120
29
votes
2 answers

Does android system include JVM?

I know android system include the Dalvik virtual machine(DVM) But i didn't understand if android system include JVM also Or DVM is a replacement for JVM? Thanks
user1019872
  • 649
  • 2
  • 9
  • 14
28
votes
1 answer

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…
Octoberdan
  • 460
  • 5
  • 10
28
votes
2 answers

Android Studio Slow Debugging on Device

All was well until very recently when I noticed that debugging has become very slow. I do not recall any drastic changes that would cause this. UI Navigation has a noticeable lag and network operations take forever. This is somewhat remedied if I…
AlexVPerl
  • 7,652
  • 8
  • 51
  • 83
28
votes
3 answers

Android: javac vs Dalvik

My understanding is that Google didn't like Oracle's licensing policy for using the JRE in Java ME so it just rewrote it using its own JVM specification that mimics the JRE but behaves a little bit differently, especially when it comes to making…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
27
votes
7 answers

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?
Steve
  • 1,512
  • 1
  • 14
  • 17
27
votes
5 answers

How to run Frege programs on Android?

I'm interested in programming for Android in functional languages, preferably close to Haskell. Frege seems to be a good choice. I found that somebody has already done such a proof-of-concept application, but I couldn't find its sources or anything…
Petr
  • 62,528
  • 13
  • 153
  • 317
27
votes
7 answers

How to solve the issue with Dalvik compiler limitation on 64K methods?

My team and I have inherited a large Android project from another team. The whole application with all the included libraries is reported to have around 35000 methods. We now have the task to implement a new service in the app where we need to use…
rfgamaral
  • 16,546
  • 57
  • 163
  • 275
26
votes
6 answers

java.lang.IllegalArgumentException: Rect should intersect with child's bounds

In Android Studio after starting a new project, and selecting a Tabbed Activity, after the project is build, I get this error in the Android Monitor: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.app, PID: 23581 …
goetz
  • 2,018
  • 2
  • 30
  • 33
26
votes
2 answers

Is Dalvik even more memory hungry than HotSpot in terms of object sizes?

I've been wondering how much memory does an Object occupy on Android. There are numerous resources (like this) related to HotSpot JVM telling that an empty object takes 8 bytes and an empty array 12 bytes and that all objects are aligned to 8 byte…
Gena Batsyan
  • 736
  • 5
  • 14
1 2
3
68 69