Google Play Services - Ads throws java.exe exited with code 2

LarsNymandLarsNymand DKMember ✭✭
edited June 2017 in Xamarin.Forms

I tried to add this component today, but after adding it, I started to receive java.exe exited with code 2 exception.

Is this a bug in the component or do I have to change something to make this work?

Thank you in advance

Best Answer

Answers

  • LarsNymandLarsNymand DKMember ✭✭

    Thank you @Xami3 I think I misunderstood the other threads. I thought this error only came if one of those were enabled.

    I enabled Multidex which game me the same error as in this thread: https://forums.xamarin.com/discussion/88955/upgraded-to-android-7-0-no-longer-builds

    After moving android-sdk to a folder without spaces and changed the sdk path in visual studio (tools -> options -> xamarin)

    now everything compiles but no ads were showing.

    I will have to investigate that some more.

  • Xami3Xami3 PKMember, University ✭✭✭

    @LarsNymand yes after enabling multidex, if your path for android sdk contains spaces then it gives another error. in my case java2 error was because of googleplay services. i am using latest sdk. then i moved sdk to D drive with no spaces. i had to update proguard in the sdk folder too.

Sign In or Register to comment.