Ziggeo / ReactNativeSDK

React Native SDK
Apache License 2.0
7 stars 6 forks source link

Can't upload from path with args #26

Closed diesmori closed 5 years ago

diesmori commented 5 years ago

I'm trying to use uploadFromPath(myVideoUrl,argsMap), where argsMap is an object like this:

var argsMap = {
        tags: "johndoe",
        expiration_days: 1,
        video_profile: "_video_profile_lightweight",
        auto_pad: true,
        data: '{"source":"app"}'
      };

...but it crashes immediately. If I use an empty argsMap, the function works fine. With just one argument, it fails too.

I'm using "react-native": "0.59.2", "react-native-ziggeo-library": "^1.3.8"

3akat commented 5 years ago

Hi @diesmori! Checking.

3akat commented 5 years ago

Please, take a look at version 1.3.9. Make sure to update gradle config for android project:
Open up android/app/build.gradle and insert the following line inside the android block:

compileOptions {
             sourceCompatibility JavaVersion.VERSION_1_8
             targetCompatibility JavaVersion.VERSION_1_8
}
diesmori commented 5 years ago

I tried with 1.3.9 version, but then I got some package incompatibilities. Then, I started anothen project from zero, just installed Ziggeo, step by step, and got error: cannot find symbol import com.ziggeo.ZiggeoPackage; at MainApplication and MainActivity.

Please check what's going on. The dependencies at package.json are ``` "dependencies": { "react": "16.8.3", "react-native": "0.59.2", "react-native-ziggeo-library": "^1.3.9" }


Thank you in advance.
3akat commented 5 years ago

Please, open

yourApp\android\app\src\main\java\com\reactnativedemo\MainApplication.java

and replace import com.ziggeo.ZiggeoPackage; with import com.ziggeo.modules.ZiggeoPackage;

diesmori commented 5 years ago

Now it works!

I had to deal with this error:

Error:Cannot fit requested classes in a single dex file.Try supplying a main-dex list.

It was managed with THIS

I have some minor issues, but I think it's about my development. Thanks!

3akat commented 5 years ago

Thanks diesmori, will add a note regarding multidex in readme