Status Update
Comments
co...@hotmail.com <co...@hotmail.com> #2
al...@google.com <al...@google.com> #3
Routing to Android Studio component for triage to Layoutlib team.
ri...@google.com <ri...@google.com>
di...@google.com <di...@google.com>
jg...@google.com <jg...@google.com> #4
The issue is that in Android Studio Giraffe, the rendering is done using a version of the Android platform corresponding to API 33, where the field ACTION_SCROLL_IN_DIRECTION
does not exist. To workaround this issue, you can either use Android Studio Iguana which renders layout with the Android platform compatible with API 34. Or more simply, you can select API 33 in the API menu of the layout editor instead of API 34.
jg...@google.com <jg...@google.com>
an...@google.com <an...@google.com> #5
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Iguana | 2023.2.1 Canary 7
- Android Gradle Plugin 8.3.0-alpha07
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
lb...@gmail.com <lb...@gmail.com> #6
Tried to update to grade 8.3.0-alpha15 , tried to "repair IDE" with all steps too.
A layout that shows fine on a new project doesn't show up at all on the original project that worked fine in the past...
Android Studio Iguana | 2023.2.1 Canary 15
Build #AI-232.10227.8.2321.11145877, built on November 27, 2023
Runtime version: 17.0.9+0--11084592 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 3072M
Cores: 12
Registry:
debugger.watches.in.variables=false
Non-Bundled Plugins:
Show As ... (1.1.1)
cn.jxzhang.plugin.json-formatter (1.4)
com.intellij.marketplace (232.10227.13)
String Manipulation (9.12.0)
GenerateSerialVersionUID (3.0.3)
idea.plugin.protoeditor (232.9559.10)
com.steve.plugins.autoscroll (1.1)
com.dethlex.numberconverter (1.5.0)
izhangzhihao.rainbow.brackets (2023.3.7)
com.ppismerov.ksvu (0.0.1)
net.aquadc.mike.plugin (0.30)
com.developerphil.adbidea (1.6.11)
GenerateSerializationHelpers (1.0.6)
Description
Version used: 1.12.0
Devices/Android versions reproduced on: Android Studio Layout Editor
In a Androidx.drawerlayout.widget.DrawerLayout layout, if using core-ktx:1.12.0 the following error is thrown in Android Studio (Build #AI-223.8836.35.2231.10671973) Layout editor:
ava.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.android.layoutlib.common.util.ReflectionUtils.invoke(ReflectionUtils.java:80)
at com.android.layoutlib.bridge.android.support.DrawerLayoutUtil.openDrawer(DrawerLayoutUtil.java:59)
at com.android.layoutlib.bridge.android.support.DrawerLayoutUtil.openDrawer(DrawerLayoutUtil.java:53)
at android.view.BridgeInflater.postInflateProcess(BridgeInflater.java:696)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.postInflateProcess(RenderSessionImpl.java:697)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.postInflateProcess(RenderSessionImpl.java:702)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:368)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:450)
at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:122)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:701)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$8(RenderTask.java:848)
at com.android.tools.idea.rendering.RenderExecutor$runAsyncActionWithTimeout$3.run(RenderExecutor.kt:200)
at com.android.tools.idea.rendering.RenderExecutor$PriorityRunnable.run(RenderExecutor.kt:298)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoSuchFieldError: ACTION_SCROLL_IN_DIRECTION
at androidx.core.view.accessibility.AccessibilityNodeInfoCompat$AccessibilityActionCompat.<clinit>(AccessibilityNodeInfoCompat.java:748)
at androidx.drawerlayout.widget.DrawerLayout.updateChildAccessibilityAction(DrawerLayout.java:950)
at androidx.drawerlayout.widget.DrawerLayout.openDrawer(DrawerLayout.java:1751)
at androidx.drawerlayout.widget.DrawerLayout.openDrawer(DrawerLayout.java:1792)
at androidx.drawerlayout.widget.DrawerLayout.openDrawer(DrawerLayout.java:1776)
... 20 more
With the result being that the navigation drawer is shown, but none of the rest of the layout is.
If I switch back to androidx.core:core-ktx:1.10.1, the error goes away.