App doesn't work after installation expo-av package
See original GitHub issueI just installed bare react-native app with expo-cli and install expo-av library (configure it of course), run it with react-native run-android, and it actually doesn’t work.

Expo CLI 2.11.9 environment info: System: OS: macOS High Sierra 10.13.6 Shell: 3.2.57 - /bin/bash Binaries: Node: 11.10.0 - /usr/local/bin/node npm: 6.8.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman IDEs: Android Studio: 3.3 AI-182.5107.16.33.5314842 Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: react: 16.6.3 => 16.6.3 react-native: 0.58.6 => 0.58.6 npmGlobalPackages: expo-cli: 2.11.9
my MainApplication.java
`package com.mytestapp;
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
import org.unimodules.adapters.react.ReactAdapterPackage;
import org.unimodules.adapters.react.ModuleRegistryAdapter;
import org.unimodules.adapters.react.ReactModuleRegistryProvider;
import org.unimodules.core.interfaces.Package;
import org.unimodules.core.interfaces.SingletonModule;
import expo.modules.constants.ConstantsPackage;
import expo.modules.permissions.PermissionsPackage;
import expo.modules.filesystem.FileSystemPackage;
import expo.modules.av.AVPackage;
import java.util.Arrays;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(Arrays.<Package>asList(
new ReactAdapterPackage(),
new ConstantsPackage(),
new PermissionsPackage(),
new FileSystemPackage(),
new AVPackage()
), Arrays.<SingletonModule>asList());
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new ModuleRegistryAdapter(mModuleRegistryProvider)
);
}
@Override
protected String getJSMainModuleName() {
return "index";
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
}
`
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Expo-AV Sound.playAsync() doesn't work with expo-av 9.2.3 ...
Run expo init my-app · Run expo install expo-av · Add some mp3 file to the root directory. I'm using this one. ·...
Read more >AV - Expo Documentation
Expo uses ExoPlayer implementation by default. To use MediaPlayer , add androidImplementation: 'MediaPlayer' to the initial status of the AV object. Acceptable ...
Read more >How to Add Videos to your Expo React Native Apps - YouTube
Hi everyone!Today I want to show you how to add videos to your expo react native app using the expo - av package...
Read more >How to add or play video in React Native Expo Application
Install a package using the command: npm install expo-av ... youtube link and start playing video, because the youtube link doesn't have any ......
Read more >Video player with React Native. Part 1: Expo | by Paul Keen
You can't use native modules with Expo. Must stick to supported SDK's. The standard library is limited. It is big but still doesn't...
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
Glad to hear that!
Try adding some
style={{ width: 300, height: 300 }}
to yourVideo
component. 🙂I was able to fix this issue by adding
to
android/app/build.gradle
. Could you please try this workaround?