remobile / react-native-file-transfer

A file-transfer for react-native, code come from cordova, support for android and ios
MIT License
85 stars 22 forks source link

Linking of project does not work [android] / [iOS] #2

Closed gorjanz closed 8 years ago

gorjanz commented 8 years ago

When I try to use this module, and build the app for the android platform, I get the following error:

FAILURE: Build failed with an exception.

On iOS, there is the following error: Undefined symbols for architecture x86_64: "_OBJCCLASS$_CDVInvokedUrlCommand", referenced from: objc-class-ref in libRCTFileTransfer.a(CDVFileTransfer.o) "_OBJCCLASS$_CDVPlugin", referenced from: _OBJCCLASS$_CDVFileTransfer in libRCTFileTransfer.a(CDVFileTransfer.o) "_OBJCCLASS$_CDVPluginResult", referenced from: objc-class-ref in libRCTFileTransfer.a(CDVFileTransfer.o) "_OBJCMETACLASS$_CDVPlugin", referenced from: _OBJCMETACLASS$_CDVFileTransfer in libRCTFileTransfer.a(CDVFileTransfer.o)

happyEgg commented 8 years ago

@gorjanz In you project settings.gradle!! you add project(':react-native-cordova').projectDir = new File(rootProject.projectDir, '../node_modules/@remobile/react-native-cordova/android')

nlindroos commented 8 years ago

@gorjanz What is not mentioned in https://github.com/remobile/react-native-file-transfer/blob/master/README.md is that @remobile/react-native-cordova is a requirement for @remobile/react-native-file-transfer.

To enable @remobile/react-native-file-transfer, in addition to the steps mentioned in the readme:

  1. run npm i --save @remobile/react-native-cordova,
  2. add
include ':react-native-cordova'
project(':react-native-cordova').projectDir = new File(rootProject.projectDir, '../node_modules/@remobile/react-native-cordova/android')

to your main project's settings.gradle file.