That's what I did in the Intellij IDEA to link the Unity-ads into my project:
Added the following strings to the "android" section of build.gradle file:
dependencies {
compile files("libs/unity-ads.jar")
}
Pressed the Ctrl+Alt+Shift+S, went to the libraries and added the lib there. Then went to the modules and added the dependency to Android project part.
So it compiles successfully and crashes when I'm trying to show the add. Here is the log:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/unity3d/ads/android/R$layout;
at com.unity3d.ads.android.video.UnityAdsVideoPlayView.createView(UnityAdsVideoPlayView.java:225)
at com.unity3d.ads.android.video.UnityAdsVideoPlayView.<init>(UnityAdsVideoPlayView.java:62)
at com.unity3d.ads.android.view.UnityAdsMainView.createVideoPlayerView(UnityAdsMainView.java:184)
at com.unity3d.ads.android.view.UnityAdsMainView.setViewState(UnityAdsMainView.java:76)
at com.unity3d.ads.android.view.UnityAdsFullscreenActivity$UnityAdsPlayVideoRunner.run(UnityAdsFullscreenActivity.java:593)
I hope that somebody can help me because I'm really stucked with that problem right now.