0

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.

Gtzzy
  • 519
  • 4
  • 18
  • The file is `.jar` or `.aar`? See https://github.com/Unity-Technologies/unity-ads-android/wiki/sdk_android_integration_guide – Douglas Nassif Roma Junior Sep 03 '16 at 01:39
  • @DouglasJunior I've tryed to use `.aar` but I didnt find the tool to import `.aar` package in Intellij IDEA. I did it through gradle aar explosion and that didnt work. – Gtzzy Sep 03 '16 at 10:14

1 Answers1

0

Have you tried with the latest version? It seems the issue has been addressed, as described here.

Brandon
  • 2,900
  • 1
  • 23
  • 36
  • I'm using latest version already. Actually problem was fixed somehow, I did nothing but it started to work. – Gtzzy Nov 30 '16 at 08:50