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
2
votes
0 answers

What is HeapTrim in the means of ART

I have a RecyclerView which displays some items including Bitmaps that can be local or loaded from a remote path. The RecyclerView performs well, and the amounts of memory being freed by the GC seem to be normal. Once I noticed the following in the…
Droidman
  • 11,485
  • 17
  • 93
  • 141
2
votes
2 answers

inflate a view without XML in Android

first of all, please any one can tell me is it possible to inflate a view without XML ? Description is like this: I have dynamically generated a view hierarchy by coding, like Relative layout contain 4 Linear layouts -1st Linear Layout contain…
akash kubavat
  • 847
  • 6
  • 17
2
votes
1 answer

Crash on 5.0 but ok on other platforms

ERR LOG: E/art(1564): Throwing OutOfMemoryError "Failed to allocate a 14908018 byte allocation with 10763166 free bytes and 10MB until OOM" E/AndroidRuntime(1564): Error reporting crash E/AndroidRuntime(1564): java.lang.OutOfMemoryError:…
Don Tan Xu Dong
  • 409
  • 4
  • 7
2
votes
0 answers

Is accessing a local variable is much more efficient than accessing a field in ART?

I've read this here: Accessing a local variable is much more efficient than accessing a field in the Dalvik VM And Android has used ART since the 4.4 release. Is accessing a local variable since 4.4 much more efficient than accessing a field in…
Hung Minh Tran
  • 120
  • 1
  • 6
2
votes
1 answer

Android 5.0 ART native DeleteGlobalReference(jobject) is failing

I have an SDK/NDK based app that creates native buffers and then reads/writes data to there to communicate through JNI bridge. in 4.4 (DALVIK) it functions OK - or at least it was not throwing an exception. Once ART became mandatory, i.e. Lollipop -…
narkis
  • 335
  • 1
  • 7
  • 17
2
votes
1 answer

Unified stack for native and Java in Android Runtime (ART)

https://developer.android.com/guide/practices/verifying-apps-art.html#Stack_Size This document says that the ART has a unified stack for native and Java. Could you tell me what does it mean? I understand that thread's stack-size can be defined only…
korg
  • 68
  • 5
1
vote
1 answer

Is asking for runtime permission necessary in android if I am writing to my apps internal directory?

Is it necessary to ask for runtime permission for my app that has read and write external storage permission declared in manifest.xml file? Note,I am only reading and writing to my app internal directory(com.mypackagename). I am not reading or…
1
vote
1 answer

Does calling Java's JVM instance-altering functions have any affects in an Android application?

For example, in Java's Locale class documentation it says that Locale.setDefault() Sets the default locale for this instance of the Java Virtual Machine. This does not affect the host locale. Since Android OS (aka the host) doesn't use JVM, and…
M.Ed
  • 969
  • 10
  • 12
1
vote
0 answers

E/AndroidRuntime: FATAL EXCEPTION: main macbook M1

The project run with no error on my MacBook intel chip but it gave me E/AndroidRuntime: FATAL EXCEPTION: main on M1 chip I can't find where the problem is. I suppose there is no error in my code because is already run on other devices and just…
narsan
  • 62
  • 10
1
vote
0 answers

What does "loading a class" mean with the Android Runtime (ART) when using reflection?

I try to understand the process of ART when using reflection. As it can be seen in the simple example below, the DexClassLoader is used to load a class from the DEX-file. The question now is what is ART doing internally when loading a class? From…
JANO
  • 2,995
  • 2
  • 14
  • 29
1
vote
0 answers

Accessing parts of odex file dynamically

I want to access parts of the odex file of my android app. Better yet, the odex file of another application ( when it has for example configured my app permitting access to its odex file). From what I've found this far, I need to have a rooted…
1
vote
0 answers

[Wi-Fi]Enterprise suggested network cannot be edited in Android R

Issue detail: We have added a suggested network in other system app(android:sharedUserId="android.uid.system"), and the security type of this network is EAP-SIM. This network can establish connection successful, but the Settings will crash if we…
balabala
  • 11
  • 1
1
vote
1 answer

Is java’s WORA concept targeted at the OS or hardware and how does the Android Runtime manage it?

Although I’ ve practiced a lot on C/C++ , I’m still pretty new to programming and now I’m learning the basics of Java. Java’s ‘Write Once, Run Everywhere’ concept has always confused me. Are Languages such as C completely portable at a source level…
GrainX
  • 13
  • 3
1
vote
0 answers

Class loader subsystem in Dalvik and ART

From all the google I/O and blogs that I have read on Dalvik and ART I get to know info on how Dalvik is different from JVM in terms of ability to run multiple VMs, how JIT and AOT compiler makes runtime better, How profiler guided compilation helps…
Sourabh Saldi
  • 3,567
  • 6
  • 34
  • 57
1
vote
1 answer

app crashes: E/AndroidRuntime + android.support.v4.content.FileProvider class not found

Recently, I've migrated to AndroidX because I couldn't run react-native run-android and it suggested me to add tools:replace="android:appComponentFactory" to my tag in my AndroidManifest.xml file. so after searching a lot I was somehow…