[expo-splash-screen] expo install expo-splash-screen will install old version of package and lead to compilation error
See original GitHub issueđ Bug Report
Summary of Issue
Following the tutorial for expo-splash-screen installation on bare react native projects will lead to compilation errors https://github.com/expo/expo/tree/master/packages/expo-splash-screen#-installation-in-bare-react-native-projects
expo install expo-splash-screen
will execute yarn add expo-splash-screen@^0.3.1
Then when running âyarn androidâ it will throw
MainActivity.java:19: error: incompatible types: boolean cannot be converted to Class<? extends ViewGroup>
SplashScreen.show(this, SplashScreenImageResizeMode.CONTAIN, false);
If i manually update to the latest 0.4.0 yarn add expo-splash-screen@~0.4.0
the issue is resolved.
Environment - output of expo diagnostics
& the platform(s) youâre targeting
Expo CLI 3.22.3 environment info:
System:
OS: Windows 10 10.0.18362
Binaries:
Node: 14.4.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Users\Myself\AppData\Roaming\npm\yarn.CMD
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
npmPackages:
expo: ~38.0.1 => 38.0.8
react: ~16.11.0 => 16.11.0
react-dom: ~16.11.0 => 16.11.0
react-native: ~0.62.2 => 0.62.2
react-native-web: ~0.11.7 => 0.11.7
Android
Reproducible Demo
Steps to Reproduce
expo init test -t bare-minimum cd test expo install expo-splash-screen react-native run-android
Expected Behavior vs Actual Behavior
The expected behavior is for compilation to succeed.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
SplashScreen - Expo Documentation
The SplashScreen module from the expo-splash-screen library is used to tell the splash screen to remain visible until it has been explicitly told...
Read more >Execution failed for task ':expo-splash-screen ... - Stack Overflow
Task :expo-splash-screen:compileDebugKotlin FAILED w: Runtime JAR files in the classpath should have the same version.
Read more >@expo/configure-splash-screen | Yarn - Package Manager
This package provides CLI command that helps you configure expo-splash-screen module. You can use it to configure your native iOS and Android project ......
Read more >expo-splash-screen - npm
Provides a module to allow keeping the native Splash Screen visible until you choose to hide it.. Latest version: 0.17.5, last published: a ......
Read more >Expo SDK 38 is now available - DEV Community â â
Today, we're announcing our summer 2020 release, âď¸ Expo SDK 38 ... can run expo client:install:ios and expo client:install:android .
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@gabrielbezerra81 I was having the same issue and I was able to solve it via the following steps:
use_unimodules!
touse_unimodules!(exclude: ['expo-splash-screen'])
After doing this and running a fresh
pod install
I was able to use theSplashScreen.preventAutoHideAsync
andSplashScreen.hideAsync
methods with their desired functionality.youâre looking at the master branch, you should check the sdk-* branch bundledNativeModules.json when looking for the required dependency.
that said, i just published a release of the
expo
package to point toexpo-splash-screen@^0.5.0
inbundledNativeModules
for sdk 38. this will fix the warning that users see when installingexpo-splash-screen
alongside theexpo
package. the original topic of this issue was resolved previously but the fix resulted in this aforementioned warning, and that is now resolved inexpo@38.0.10
.@gabrielbezerra81 @Commoddity - letâs track the issue youâre encountering in https://github.com/expo/expo/issues/9286. i pinged @bbarthec about it