question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom Development Client Error When Compiled Against Android SDK 33

See original GitHub issue

Summary

If compileSDKVersion and targetSDKVersion are set to 33 in app/build.gradle, any subsequent custom development client generated will fail to run on Android with the error:

Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
          This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

What platform(s) does this occur on?

Android

Environment

  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 12.5
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
      Yarn: 1.22.10 - /usr/local/bin/yarn
      npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
      Watchman: 2022.02.21.00 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.11.3 - /Users/matthewbuckley/gems/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    IDEs:
      Android Studio: 2021.2 AI-212.5712.43.2112.8815526
      Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
    npmPackages:
      expo: ~46.0.7 => 46.0.7
      react: 18.0.0 => 18.0.0
      react-dom: 18.0.0 => 18.0.0
      react-native: 0.69.4 => 0.69.4
      react-native-web: ~0.18.7 => 0.18.7
    npmGlobalPackages:
      eas-cli: 0.60.0
      expo-cli: 6.0.2
    Expo Workflow: bare

Minimal reproducible example

  • npx create-expo-app my-app
  • cd my-app
  • expo install expo-dev-client
  • expo prebuild
  • Set compileSDKVersion and targetSDKVersion to 33 in app/build.gradle
  • Generate a custom development client (internal distribution) build using eas build
  • Install the build on a physical device
  • run expo start --dev client
  • run a to open on android
  • Error will show

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Yonomcommented, Aug 27, 2022

Compiling our rn project with expo-dev-client installed and compileSdkVersion = 33 but targetSdkVersion 31 causes a different issue in expo-dev-menu:

> Task :expo-dev-menu:compileDebugKotlin FAILED
e: node_modules/expo-dev-menu/vendored/react-native-gesture-handler/android/devmenu/com/swmansion/gesturehandler/PanGestureHandler.kt: (57, 36): 
Type mismatch: inferred type is Context? but Context was expected

I will create a fix for this in a minute…

1reaction
ahnafnafeecommented, Oct 24, 2022

Still encountering this issue in Pixel 7 with Android 13

Error: Exception in HostObject::get for prop 'NativeUnimoduleProxy': java.lang.SecurityException: Settings key: <bluetooth_name> is only readable to apps with targetSdkVersion lower than or equal to: 31

Found a similar issue here: https://github.com/expo/expo/issues/18738 with similar test devices (Android 13)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android app won't build -- The minCompileSdk (31) specified ...
Go to SDK manager in android studio and install 'Android api 31' · Go to build.gradle file and change complie SDK version 'x'...
Read more >
<uses-sdk> | Android Developers
Lets you express an application's compatibility with one or more versions of the Android platform, by means of an API Level integer.
Read more >
Known issues with Android Studio and Android Gradle Plugin
Compilation errors may arise in Kotlin MPP code due to missing symbols. Upgrading your Kotlin plugin to version 1.4 should resolve this issue....
Read more >
Device compatibility overview - Android Developers
As an app developer, you don't need to worry about whether a device is Android compatible, because only devices that are Android compatible...
Read more >
Emulator release notes - Android Developers
To ensure you have the latest version, check the SDK Manager for updates. To download previous versions of Android Emulator, see the Emulator...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found