Description
@shopify/react-native-skia v2.5.3 added the Android WebGPU view manager (WebGPUViewManager.java, WebGPUView.java, WebGPUSurfaceView.java, WebGPUTextureView.java, WebGPUViewAPI.java) but did not ship matching prebuilt paper-architecture variants of the codegen output (SkiaWebGPUViewManagerDelegate.java, SkiaWebGPUViewManagerInterface.java). As a result, any project with newArchEnabled=false on Android fails to compile.
Root cause
android/build.gradle only applies the React Native gradle plugin (which runs codegen) when New Architecture is enabled:
if (isNewArchitectureEnabled()) {
apply plugin: "com.facebook.react"
}
WebGPUViewManager.java lives in android/src/main/java/ (always compiled) and unconditionally imports codegen output from com.facebook.react.viewmanagers. With new arch off, codegen never runs, so those classes don't exist.
The SkiaPictureView flow handles this correctly — paper variants are shipped in android/src/paper/java/com/facebook/react/viewmanagers/SkiaPictureViewManagerDelegate.java and …Interface.java. The same files are missing for the WebGPU view.
It looks like the same class of bug fixed for SkiaPictureView in #3535 / v2.4.6, but applied to the new WebGPU view manager.
Versions affected (verified by extracting npm tarballs):
| Version |
Has WebGPUViewManager.java |
Builds on old arch |
| 2.5.2 |
No |
✅ |
| 2.5.3 |
Yes |
❌ |
| 2.5.5 |
Yes |
❌ |
| 2.6.2 |
Yes |
❌ |
Workaround
Pin to 2.5.2.
As a heads up I used AI to help generate this issue for me.
React Native Skia Version
2.6.2 (also reproducible on 2.5.3, 2.5.5)
React Native Version
0.81.6
Using New Architecture
Steps to Reproduce
- In an Android project with
newArchEnabled=false in android/gradle.properties
- Install
@shopify/react-native-skia@2.6.2 (or any version ≥ 2.5.3)
- Run a release build:
cd android && ./gradlew bundleProdRelease
- Build fails at
:shopify_react-native-skia:compileReleaseJavaWithJavac with:
WebGPUViewManager.java:8: error: cannot find symbol
import com.facebook.react.viewmanagers.SkiaWebGPUViewManagerDelegate;
^
symbol: class SkiaWebGPUViewManagerDelegate
location: package com.facebook.react.viewmanagers
WebGPUViewManager.java:9: error: cannot find symbol
import com.facebook.react.viewmanagers.SkiaWebGPUViewManagerInterface;
^
symbol: class SkiaWebGPUViewManagerInterface
WebGPUViewManager.java:19: error: cannot find symbol
protected SkiaWebGPUViewManagerDelegate mDelegate;
^
symbol: class SkiaWebGPUViewManagerDelegate
location: class WebGPUViewManager
WebGPUViewManager.java:15: error: cannot find symbol
public class WebGPUViewManager extends ReactViewManager implements SkiaWebGPUViewManagerInterface<WebGPUView> {
^
symbol: class SkiaWebGPUViewManagerInterface
8 errors
Snack, Code Example, Screenshot, or Link to Repository
its a native error so a snack won't work
- In an Android project with
newArchEnabled=false in android/gradle.properties
- Install
@shopify/react-native-skia@2.6.2 (or any version ≥ 2.5.3)
- Run a release build:
cd android && ./gradlew bundleProdRelease
- Build fails at
:shopify_react-native-skia:compileReleaseJavaWithJavac with:
WebGPUViewManager.java:8: error: cannot find symbol
import com.facebook.react.viewmanagers.SkiaWebGPUViewManagerDelegate;
^
symbol: class SkiaWebGPUViewManagerDelegate
location: package com.facebook.react.viewmanagers
WebGPUViewManager.java:9: error: cannot find symbol
import com.facebook.react.viewmanagers.SkiaWebGPUViewManagerInterface;
^
symbol: class SkiaWebGPUViewManagerInterface
WebGPUViewManager.java:19: error: cannot find symbol
protected SkiaWebGPUViewManagerDelegate mDelegate;
^
symbol: class SkiaWebGPUViewManagerDelegate
location: class WebGPUViewManager
WebGPUViewManager.java:15: error: cannot find symbol
public class WebGPUViewManager extends ReactViewManager implements SkiaWebGPUViewManagerInterface<WebGPUView> {
^
symbol: class SkiaWebGPUViewManagerInterface
8 errors
Description
@shopify/react-native-skiav2.5.3 added the Android WebGPU view manager (WebGPUViewManager.java,WebGPUView.java,WebGPUSurfaceView.java,WebGPUTextureView.java,WebGPUViewAPI.java) but did not ship matching prebuilt paper-architecture variants of the codegen output (SkiaWebGPUViewManagerDelegate.java,SkiaWebGPUViewManagerInterface.java). As a result, any project withnewArchEnabled=falseon Android fails to compile.Root cause
android/build.gradleonly applies the React Native gradle plugin (which runs codegen) when New Architecture is enabled:WebGPUViewManager.javalives inandroid/src/main/java/(always compiled) and unconditionally imports codegen output fromcom.facebook.react.viewmanagers. With new arch off, codegen never runs, so those classes don't exist.The
SkiaPictureViewflow handles this correctly — paper variants are shipped inandroid/src/paper/java/com/facebook/react/viewmanagers/SkiaPictureViewManagerDelegate.javaand…Interface.java. The same files are missing for the WebGPU view.It looks like the same class of bug fixed for
SkiaPictureViewin #3535 / v2.4.6, but applied to the new WebGPU view manager.Versions affected (verified by extracting npm tarballs):
WebGPUViewManager.javaWorkaround
Pin to
2.5.2.As a heads up I used AI to help generate this issue for me.
React Native Skia Version
2.6.2 (also reproducible on 2.5.3, 2.5.5)
React Native Version
0.81.6
Using New Architecture
Steps to Reproduce
newArchEnabled=falseinandroid/gradle.properties@shopify/react-native-skia@2.6.2(or any version ≥ 2.5.3)cd android && ./gradlew bundleProdRelease:shopify_react-native-skia:compileReleaseJavaWithJavacwith:Snack, Code Example, Screenshot, or Link to Repository
its a native error so a snack won't work
newArchEnabled=falseinandroid/gradle.properties@shopify/react-native-skia@2.6.2(or any version ≥ 2.5.3)cd android && ./gradlew bundleProdRelease:shopify_react-native-skia:compileReleaseJavaWithJavacwith: