Unity: After downloading Google Ads Api "Could not convert classes into dex-format" - unity3d

I am working on a little platformer that worked fine about 30 minutes ago. All I did no was importing the Google Ads Api as stated in those instructions here:
https://developers.google.com/admob/unity/start
I followed them step by step.
Now, my game still plays fine in the editor - but I now want to deploy the APK to my phone. This crashes with
"CommandInvokationFailure: Unable to convert classes into dex format.
D:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -Xmx8000M -Dcom.android.sdkmanager.toolsdir="C:/Program Files (x86)/Android/android-sdk\tools" -Dfile.encoding=UTF8 -jar "D:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[
PARSE ERROR:
unsupported class file version 52.0
...while parsing bitter/jnibridge/JNIBridge.class
1 error; aborting
]
stdout["
This is followed by a long truncated list with much information. I am posting this upon request.
I then googled a bit around, and people said that this was caused by "duplicated files" usually coming from the Facebook API and the Google API both being imported to the same project.
However, as you may already think, the Google API is the first API I imported, so technically, there cannot be "two duplicate files", right?

For those of you who have the same issue:
Download the newest JDK for Android (this comes together with Android Studio, so you need to install Android Studio, even if you dont want it).
After installing everything (including the newest JDK) remember the path your JDK is put to.
Now in Unity under settings, guide the interface to the JDK folder of your newest JDk you just downloaded. This fixes it :)

Related

sdkmanager error (Warning: IO exception while downloading manifest)

when I try installing build tools using sdkmanager on window using this command below
C:\all-things-flutter\flutter-installation\android\cmdline-tools\bin>sdkmanager.bat "build-tools;30.0.0" --sdk_root=../
I keep getting this error
Warning: IO exception while downloading manifest
please this is not a duplicate question, cus I didn't find the answer I needed.
this has been bugging me for days so how can I get it right
So since I could not get an answer after 8 months, I have decided to share how I did it and other kinds of solutions people have suggested but not from here.
How i did it
I downloaded android studio (even tho i was not going to use it), then i use android studio to download the recommended SDK i will need, after that i added the SDK folder path to my system variable, that way i can continue the flutter installation and run flutter doctor, which did ditect my SDK path.
Other people Suggesttion
From my research online, I saw people saying that you need a much slower internet connection because if your internet connection is faster, it will skip some downloads, which can cause the SDK to not work well.
but my response to that is "yer good luck with that".

Android L parseSdkContent failed Could not initialize class android.graphics.Typeface

Hello recently i updated to Android L sdk. Now whenever i open new project dialog i'm getting this error. parseSdkContent failed
Could not initialize class android.graphics.Typeface
I have seen many questions already answered on stackoverflow but the solutions mentioned didn't work for me.
I have tried deleting the .android in folder C: drive and restarted eclipse.
I have also tried re-installing the new version of Android ADT plugin through Help->Install New Software in Eclipse as mentioned at http:\developer.android.com/sdk/installing/installing-adt.html
Whenever i check for new updates in Eclipse it shows "No New Updates Found".
But still i'm getting the same error.
The update issue is probably related to your parseSdkContent issue, since "the update mechanism in the ADT bundle is broken" (Comment 66). This means that Eclipse have not updated to be compatible with the new Android
I had the same problem when I wanted to update my Eclipse to prepare it for Android L, so I downloaded the new adt zip, then came accross the other error, and after deleting my .android folder, I am no longer having issues.
The new bundle can be found on the android developer site, and here is the link: Android developer site
The issue was fixed in the API 21 rendering library. As a workaround, you can use the rendering library from API 20 in the meanwhile.
Download the SDK platform for API 20 (4.4W)
Navigate to your sdk folder (should be like
D:\adt-bundle-windows-x86_64-20140321\sdk)
Go to platforms folder -> android-21 folder -> data folder
Rename layoutlib.jar (for backup purpose)
Copy the same file from your android-20 folder to this folder
Restart Eclipse
https://code.google.com/p/android/issues/detail?id=77726#c15

ADT Plugin Directory Location for SDK - (MotoDev)

Right now I am setting up Motodev.
Its a Android Development Suite built on Eclipse, created by Motorola.
What is needed is the Android SDK. Check, got that, newest version, everything is set with that.
Now it says I need the ADT Eclipse plugin. Version 20.0.1, currently mine is v18.
I know where to get it, I can easily get it, but I am curious, where should it be installed? Currently I dont have eclipse I am just using MotoDev. But since Motodev asks where the SDK location is, and says my ADT plugin is out of date, I am assuming I have to install the ADT in the SDK directory. But is there somewhere more specific to put it? In a specific folder? or just in the top level of the SDK directory?
Thanks for your time.
Unfortunately, you can't use ADT20 with MOTODEV Studio 4.0. The plugins had some API changes between 18 and 20 that made them incompatible with each other. You will need to roll your SDK back to 19 until we can release a newer version. I wrote about this about a week ago on the MOTODEV Studio blog.
We're done with the engineering work on the new version. It's just a matter of getting the push to the web server scheduled. I expect it to be ready by late next week or early the following week.
Until then, if you need to use ADT20 for Jellybean development, use Eclipse for Mobile Developers plus the MOTODEV Core Plugins (using Help>Eclipse Marketplace). Most of the functionality of the installed product is there, but without the dependency on ADT. See the blog for details on how to set that up.

Invalid or corrupt jarfile android.jar issue

I am trying to build and run an android project using the phonegap framework.
I have configured the IDE and followed the steps described in an official tutorial (see link above).
The problem is that I never had a chance to build the project since it contains errors. The major one is (see screenshots):
Archive for required library: 'C:/Program Files/Android/android-sdk/platforms/android-8/android.jar' in project 'xxx' cannot be read or is not a valid ZIP file
Also, I have tried to manually run the aforementioned android.jar but got the same error:
The problem keeps reproducing through several SDK versions: r14, r15.
BTW, I experience no troubles building a project using other android versions, e.g., 2.3.
Would someone help me out? Thanks!
Use the Android package manager to remove and then re-download the Android 2.2 SDK as something is corrupt with that package.

Adobe AIR packager yields Unable to open destination file: ... Info.plist in Application Loader

I have an app in the App Store that I produced using the Adobe AIR 2.0 packager back in March 2011. Now, the client wants to update it. But, I can no longer upload an update.
I get the following error when using the Application Loader:
Unable to unzip application. Underlying reason: Unable to open destination file: /var/folders/05/d7xltrms59j0n1bplx_nvwr0000gn/T/Protocols.ipa/Payload/ProtocolsSmall.app/Info.plist, No such file or directory.
Looking inside the IPA, Info.plist is certainly in there.
I tried using new provisioning and new certificates, I tried using Java 32-bit, I tried reinstalling Flash CS5. I tried the 2.5 SDK (I can't using anything higher though).
I wonder if this packager is creating an outdated IPA that Apple no longer accepts. Ideas anyone?
I managed to solve the problem. I used the AIR 2.5 SDK and PFI. Then, I upgraded Application Loader to 2.4.1 and that did the trick.
To download AIR 2.5 SDK, go to the Adobe archives: http://kb2.adobe.com/cps/853/cpsid_85304.html
To download an updated version of PFI, go to the following link:
MAC:
http://download.macromedia.com/pub/flash/updates/11/ios/mac/PFI_MAC_2_0_1_12640.zip
There is a Windows version, but I can't post that link since I'm only allowed to post 2 hyperlinks.