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.

building android fails

See original GitHub issue

Hi, I have react-native@0.25.1 tried to install it with rnpm - changes to myApp/android/… were done, when I do ~ react-native run-android I get:


/Users/yonatan/avgenMobile/android/app/src/main/java/com/avgenmobile/MainActivity.java:4: error: cannot find symbol
import com.brentvatne.RCTVideo.ReactVideoPackage;
                              ^
  symbol:   class ReactVideoPackage
  location: package com.brentvatne.RCTVideo
/Users/yonatan/avgenMobile/android/app/src/main/java/com/avgenmobile/MainActivity.java:39: error: cannot find symbol
            new ReactVideoPackage()
                ^
  symbol:   class ReactVideoPackage
  location: class MainActivity
2 errors

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

17reactions
mroswaldcommented, May 21, 2016

For every wondering how to solve without touching node_modules: Check android/app/src/main/java/com/netoptv/MainActivity.java and change

import com.brentvatne.RCTVideo.ReactVideoPackage;

to

import com.brentvatne.react.ReactVideoPackage;
0reactions
arasemamicommented, Oct 7, 2018

Hi guys, I have the same issue, package.json -->

    "react": "16.5.0",
    "react-native": "0.57.0",
    "react-native-video": "^3.2.1",
    "react-native-video-controls": "^2.2.3"
  },

MainApplication.java ----->

import com.brentvatne.react.ReactVideoPackage;
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
            new ReactVideoPackage()
      );
    }```


settings.gradle ---->

`include ':react-native-video'
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer')
`
Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to build project with Android studio - Stack Overflow
File->Other Settings->Default Project Structure · Under Project Settings: Project, set Project SDK as Android SDK. · Click Edit button · For Android SDK,...
Read more >
Why does a build fail in Android Studio even if I don't have any ...
There are several causes for gradle build fail in Android studio. Few reasons might be: * Dependencies added * Importing the project from...
Read more >
[FIXED] Android build failures `No matching variant of ... - GitHub
Hey all, I'd like to share an update on a series of build failures React Native & Expo users have been experiencing when...
Read more >
Known issues with Android Studio and Android Gradle Plugin
Known issues with Android Studio and Android Gradle Plugin · Error when rendering Compose Preview · Error when using different passwords for key...
Read more >
Fix Gradle Build Error in Android Studio | Compilation failed
Tutorial to fix errors encountered while running the android application. This video includes some ways in which you can fix Gradle build ......
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