For questions related to the usage and features that are specific to version 4.2 of Android Studio - the official IDE targeted at Android development. When using this tag also include the more generic [android-studio] tag. Do NOT use this tag for questions about programming for Android in general; instead use the [android] tag.
Questions tagged [android-studio-4.2]
65 questions
5
votes
1 answer
How to make the .proto definition files visible in Android view in Android Studio (4.2)?
When using protobuf definitions in my gradle projects, protoc works as expected. Everything builds as it is supposed to do. However, when working in the Android view (I mean View->Project->Android), the definition file doesn't show up. On the…

F K
- 315
- 2
- 9
5
votes
3 answers
Disable Intellij @Nullable on "implement methods" when base method is androidx @Nullable
In Android Studio 4.2 beta 1, whenever I implement a method annotated with the androidx version of @Nullable, the IDE is automatically adding the jetbrains @Nullable annotation as well.
This is extremely annoying as it results in code like:
…

Android
- 1,230
- 12
- 20
5
votes
0 answers
How to see JetpackCompose kotlin source in Android Studio (4.2)?
When I command-click into the JetpackCompose function, all I see is below (as per Android Studio 4.2)
I click Download Sources, but nothing happens. I click Decompile to Java, it's relative cryptic code to understand the Java version of it. How…

Elye
- 53,639
- 54
- 212
- 474
4
votes
2 answers
Android Studio XML Render Problem - String Index Out Of Range:-1
When I adding android:autoFillHints="" attribute to the XML code of activity, design screen suddenly started giving an error.
First, the activity layout that I editing did not show anything on the design screen and there was error in just the…

kkrgzz
- 452
- 4
- 12
4
votes
2 answers
How to print log in compose
I want to print some logs for debug reason, it seems the print and Timber are all not work with compose, what's the alternative choice?

ccd
- 5,788
- 10
- 46
- 96
3
votes
0 answers
Android Studio opens the wrong file when debugging a variant
An Android app has two flavors A and B. Both have foo.java
src
A
java
foo.java
src
B
java
foo.java
In window Build Variants, I choose BDebug because I want to debug flavor B. I have breakpoints in foo.java of B. When I run the app, it…

Hong
- 17,643
- 21
- 81
- 142
3
votes
4 answers
Android Build Failed to Generate Signed APK after upgrade to Android Studio 4.2
Execution failed for task ':app:packageRelease'.
A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
com.android.ide.common.signing.KeytoolException: Failed to read key .... from…

Vaibhav
- 315
- 3
- 15
3
votes
1 answer
Android studio 4.2 doesn't find emulators, devices or AVD Manager
I just updated Android Studio from 4.1.3 to 4.2.
Now, it doesn't find any emulator or even my cell phone. It shows a message "Loading devices".
Also, when I click on AVD Manager, it doesn't open. It shows me this…

carlosabreu
- 89
- 8
3
votes
2 answers
Android Gradle Plugin 4.2.0 R8 ArrayIndexOutOfBoundsException
Today AS 4.2 hit stable. I updated my gradle distribution url to 6.7.1 like I was told, and Android Gradle Plugin to 4.2.0. If I update the AGP, my app no longer builds.
I don't understand the error or know where to look. Here is the…

Daniel Wilson
- 18,838
- 12
- 85
- 135
3
votes
1 answer
Updated to 4.2RC1 and transparent activities do not work ? Suddenly black
I have a sidemenu activity which appears over another activity.