Questions tagged [android-runtime]

The Android Runtime, or ART for short, is an Android runtime which was made available in Android 4.4 and is the default runtime in Android from 5.0 onward, superseding the Dalvik runtime. ART compiles app's bytecode to native code using the dex2oat on-device compiler suite and executes them.

175 questions
50
votes
2 answers

Difference between dexopt and dex2oat?

Google is moving from Dalvik to ART(Android Runtime). I was trying to understand, how it is going to improve the performance. The best explanation I found is the below image: One of the main component which has changed is dexopt to dex2oat. Since I…
Gokul Nath KP
  • 15,485
  • 24
  • 88
  • 126
33
votes
7 answers

What does OAT mean?

We know that Dalvik uses APK, DEX, and ODEX files. And we know this abbreviation means via AOSP source or Developers site. (like this - https://source.android.com/devices/tech/dalvik/dex-format.html) DEX means Dalvik EXcutable file. ODEX means…
Snowcat8436
  • 331
  • 1
  • 3
  • 4
32
votes
2 answers

Art: Verification of X took Y ms

I've got a warning in my logcat: W/art: Verification of void com.myapp.LoginFragment$override.lambda$logIn$5(com.myapp.LoginFragment, java.lang.Throwable) took 217.578ms Here's the code: subscription = viewModel.logIn() …
Lovis
  • 9,513
  • 5
  • 31
  • 47
22
votes
1 answer

Android native crash initiating from /system/framework/arm/boot.oat

After recent update of my application in Google Play, I started receiving lot of crash reports, all of them are from Samsung devices with Android 5. Lower android versions work fine and devices of other manufacturers with Android 5 work fine too. I…
19
votes
1 answer

Android FinalizerDaemon hanging up

I'm having a really weird problem in an Android app. After a certain point (around when the main activity starts and a fragment is displayed) the FinalizerDaemon just stops processing objects and garbage keeps piling up. Looking at a thread dump, it…
17
votes
2 answers

Marshmallow permission implementation

I am trying to add Android 6.0 support in my Existing Android App. I have used SYNCADAPTER to sync data. its working fine till API 22. but in 23 (ANDROID 6.0) they have remove Group permission AUTHENTICATE_ACCOUNTS. I found sample how to get…
15
votes
1 answer

onRequestPermissionsResult not working in fragment

i'm trying to implement Marshmallow's permission support, but my code inside "onRequestPermissionsResult" is never called. When working in an Activity its working but in fragment I am facing the problem i.e, the control is not coming in…
15
votes
2 answers

Load DEX file dynamically on Android 5.0

Prior to Android 5.0 I was able to load DEX files dynamically using DexClassLoader and calling loadClass() method but with the latest Android version I get a ClassNotFoundException. Here is what I am doing: Generate DEX…
garibay
  • 1,046
  • 1
  • 10
  • 12
14
votes
2 answers

How exactly does JVM differ from Dalvik and/or ART?

Firstly, I think I may have titled this question poorly, but I couldn't think of the right words, so please, feel free to suggest an edit and I will make it, so that the question is more educational and relevant to others. I know that javax.Swing…
Mat Jones
  • 936
  • 1
  • 10
  • 27
13
votes
1 answer

AndroidJunit4 doesn't accept space function test name?

I have the following test, where the test name is with space and backtick for my instrumental test @RunWith(AndroidJUnit4::class) class MyTestClass { @Rule @JvmField var activityRule: ActivityTestRule =…
Elye
  • 53,639
  • 54
  • 212
  • 474
11
votes
1 answer

Android Garbage Collector Freed Memory

I'm working on an app that handles a lot of allocations (on the order of 4 million doubles and a million classes). I was looking through garbage collector logs and I'm seeing different amounts of memory total being freed across different…
David M
  • 841
  • 6
  • 23
10
votes
2 answers

Android - Suspending all threads took: * ms

I'm having these warnings in my logcat even after a while that i left the application. (Didn't kill though, just pressed back to leave it.) 05-03 13:43:42.955 13047-13053/package W/art: Suspending all threads took: 7.873ms 05-03 13:44:32.458…
yahya
  • 4,810
  • 3
  • 41
  • 58
10
votes
3 answers

Android Studio java.lang.NoSuchMethodError with an imported library

I imported the commons-codec-1.10.jar following the next steps: Under de app directory created a libs directory Copied manually the .jar inside the libs directory Right click the .jar inside android-studio and clicked Add as library Added this…
8
votes
0 answers

ART: Verification of method() took X ms - takes a few minutes

Lately when I try debugging an android test instrumentation APK, every time the app is launched I see something like this in the logcat W/com.myapp: Verification of void com.myapp.test.hiptest.Actionwords.function0() took 158.211ms W/com.myapp:…
dasfima
  • 4,841
  • 3
  • 21
  • 24
8
votes
2 answers

Override android:vmSafeMode attribute for debug builds

While trying to optimize the build and deployment speed for debugging an app I found large chunk of time was spent executing /system/bin/dex2oat during installation. This is the ART ahead of time compiler. I found when targeting API 22 you can now…
BrentM
  • 5,671
  • 3
  • 31
  • 38
1
2 3
11 12