expo: class expo.modules.av.video.f doesn't have a primary constructor

Summary

Hello.

I work on an application that uses expo-av. The application was working well with the SDK 46 of expo. I made an update of the application to SDK 47 then ejected (npx expo prebuild --clean). In debug mode I have no problem (at least in appearance). But in release (npx expo run:andoid --variant release or npx react-native run-andoird --variant=release or ./gradelw assembleRelease) , the application crashes at startup. The logcat of android studio shows:

win=Window{2271c02 u0 Splash Screen com.parice02.video EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0 caller=com.android.server.wm.ActivityRecord.destroySurfaces:5251 com.android.server.wm.ActivityRecord.destroySurfaces:5232 com.android.server.wm.WindowState.onExitAnimationDone:5623 com.android.server.wm.WindowStateAnimator.onAnimationFinished:332 com.android.server.wm.WindowState.onAnimationFinished:6088 com.android.server.wm.-$$Lambda$dwJG8BAnLlvKNGuDY9U3-haNY4M.onAnimationFinished:2 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0$SurfaceAnimator:112
FATAL EXCEPTION: main
 Process: com.parice02.video, PID: 20238
 java.lang.IllegalArgumentException: class expo.modules.av.video.f doesn't have a primary constructor
at expo.modules.kotlin.views.d$a.a(Unknown Source:182)
at expo.modules.kotlin.views.d$a.y(Unknown Source:4)
at expo.modules.kotlin.views.f.a(Unknown Source:12)
at expo.modules.kotlin.views.g.b(Unknown Source:19)
at expo.modules.kotlin.views.GroupViewManagerWrapper.createViewInstance(Unknown Source:9)
...

Screenshot from 2023-01-15 15-05-16

What platform(s) does this occur on?

Android

Environment

    System:
      OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 18.13.0 - /usr/bin/node
      npm: 9.3.0 - /usr/bin/npm
    SDKs:
      Android SDK:
        API Levels: 28, 29, 30, 31
        Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.1, 30.0.2, 30.0.3, 31.0.0, 32.0.0
        System Images: android-30 | ARM 64 v8a, android-30 | Intel x86 Atom_64, android-30 | Google APIs ARM 64 v8a, android-30 | Google APIs Intel x86 Atom, android-31 | ARM 64 v8a, android-31 | Intel x86 Atom_64, android-31 | Google APIs ARM 64 v8a, android-31 | Google APIs Intel x86 Atom_64
        Android NDK: 22.1.7171670
    npmGlobalPackages:
      expo-cli: 6.1.0

Minimal reproducible example

Test video

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 2
  • Comments: 25 (8 by maintainers)

Most upvoted comments

This is weird, I’m sure the error happened before with expo-av@13.1.0 haha, but I tested again and now it works perfectly (with ProGuard). Thx @lukmccall!

Hmm, that is weird. It should work in 13.1.0. I’ll take a look into this issue that week.