ms88privat / react-native-video-gstreamer

react-native video component for android with gstreamer
21 stars 7 forks source link

react native 0.24, installation causes app launch to fail #4

Closed abbasfreestyle closed 8 years ago

abbasfreestyle commented 8 years ago

I've in installed this component following the instructions, but unfortunately the app fails to launch. Here's my code following the instructions:

android/settings.gradle

rootProject.name = 'navigator'

include ':app'
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':ReactNativeMediaPlayerAndroid', ':app'
project(':ReactNativeMediaPlayerAndroid').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video-gstreamer/android')

android/app/build.gradle

dependencies {
    compile project(':react-native-vector-icons')
    compile project(':ReactNativeMediaPlayerAndroid') 
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:23.0.1"
    compile "com.facebook.react:react-native:+"  // From node_modules
}

android/app/src/main/java/com/navigator/MainActivity.java

package com.navigator;

import com.facebook.react.ReactActivity;
import com.oblador.vectoricons.VectorIconsPackage;
import com.nick.reactnativemediaplayer.MediaPlayerPackage;
import com.nick.devicecontroller.DeviceControllerPackage;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;

import java.util.Arrays;
import java.util.List;

public class MainActivity extends ReactActivity {

    @Override
    protected String getMainComponentName() {
        return "navigator";
    }

    @Override
    protected boolean getUseDeveloperSupport() {
        return BuildConfig.DEBUG;
    }

    @Override
    protected List<ReactPackage> getPackages() {
        return Arrays.<ReactPackage>asList(
            new MainReactPackage(),
            new VectorIconsPackage(),
            new MediaPlayerPackage(),
            new DeviceControllerPackage(this)
        );
    }
}

I've unzipped the lib.zip file and placed it in node_modules/react-native-video-gstreamer/android/src/main/jniLibs/ < (placed armeabi and armeabi-v7a folders in here)

I'm testing my app on a real android device. Galaxy Note 5. Have i done anything wrong here? Many Thanks.

ms88privat commented 8 years ago

Hi, I'm sorry. I can not really help here anymore, this project was initially programmed by a freelancer I paid. I only made it open source to share it. It did work well for specific use cases on RN 0.16.

abbasfreestyle commented 8 years ago

No worries, thanks for your response. i appreciate it.