Building to android fail- unable to convert classes into dex format.
Hello, I have problem with building to android. Since I am beginner, I have no idea what to do, because building to iOS worked. First I had error with android manifests, but I got this fixed. I am using Google AdMob plugin from: https://github.com/googleads/googleads-mobile-unity
Now I get this error: CommandInvokationFailure: Unable to convert classes into dex format. /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/admin/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar"
If somebody knows, how to get rid of it, I would be extremely thankful! Full error looks like this:
CommandInvokationFailure: Failed to re-package resources.
/Users/admin/Library/Android/sdk/build-tools/24.0.2/aapt package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "/Users/admin/Library/Android/sdk/platforms/android-24/android.jar" -F bin/resources.ap_ --extra-packages com.google.unity:com.google.android.gms.ads.impl:com.google.android.gms.base:com.google.android.gms:com.google.android.gms.clearcut:com.google.android.gms.gass:com.google.android.gms.tasks:android.support.v4 -S "/Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-ads-9.6.1/res" -S "/Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res" -S "/Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-basement-9.6.1/res" -S "/Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-clearcut-9.6.1/res" -S "/Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-gass-9.6.1/res" -S "/Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-tasks-9.6.1/res" -S "/Users/admin/Stretch mate/Temp/StagingArea/android-libraries/support-v4-24.0.0/res"
stderr[
AndroidManifest.xml:32: error: Error: No resource found that matches the given name (at 'theme' with value '@style/Theme.IAPTheme').
]
stdout[
Configurations:
(default)
Files:
AndroidManifest.xml
Src: () AndroidManifest.xml
Resource Dirs:
Including resources from package: /Users/admin/Library/Android/sdk/platforms/android-24/android.jar
applyFileOverlay for drawable
trying overlaySet Key=common_full_open_on_phone.png
trying overlaySet Key=common_google_signin_btn_icon_dark.xml
trying overlaySet Key=common_google_signin_btn_icon_dark_disabled.9.png
trying overlaySet Key=common_google_signin_btn_icon_dark_focused.9.png
trying overlaySet Key=common_google_signin_btn_icon_dark_normal.9.png
trying overlaySet Key=common_google_signin_btn_icon_dark_pressed.9.png
trying overlaySet Key=common_google_signin_btn_icon_light.xml
trying overlaySet Key=common_google_signin_btn_icon_light_disabled.9.png
trying overlaySet Key=common_google_signin_btn_icon_light_focused.9.png
trying overlaySet Key=common_google_signin_btn_icon_light_normal.9.png
trying overlaySet Key=common_google_signin_btn_icon_light_pressed.9.png
trying overlaySet Key=common_google_signin_btn_text_dark.xml
trying overlaySet Key=common_google_signin_btn_text_dark_disabled.9.png
trying overlaySet Key=common_google_signin_btn_text_dark_focused.9.png
trying overlaySet Key=common_google_signin_btn_text_dark_normal.9.png
trying overlaySet Key=common_google_signin_btn_text_dark_pressed.9.png
trying overlaySet Key=common_google_signin_btn_text_light.xml
trying overlaySet Key=common_google_signin_btn_text_light_disabled.9.png
trying overlaySet Key=common_google_signin_btn_text_light_focused.9.png
trying overlaySet Key=common_google_signin_btn_text_light_normal.9.png
trying overlaySet Key=common_google_signin_btn_text_light_pressed.9.png
trying overlaySet Key=common_ic_googleplayservices.png
trying overlaySet Key=app_banner.png
trying overlaySet Key=app_icon.png
applyFileOverlay for layout
applyFileOverlay for anim
applyFileOverlay for animator
applyFileOverlay for interpolator
applyFileOverlay for transition
applyFileOverlay for xml
applyFileOverlay for raw
applyFileOverlay for color
trying overlaySet Key=common_google_signin_btn_text_dark.xml
trying overlaySet Key=common_google_signin_btn_text_light.xml
applyFileOverlay for menu
applyFileOverlay for mipmap
Processing image: res/drawable-xhdpi/app_banner.png
Processing image: res/drawable-ldpi/app_icon.png
(processed image res/drawable-ldpi/app_icon.png: 102% size of source)
Processing image: res/drawable-mdpi/app_icon.png
(processed image res/drawable-mdpi/app_icon.png: 100% size of source)
Processing image: res/drawable-hdpi/app_icon.png
(processed image res/drawable-hdpi/app_icon.png: 98% size of source)
Processing image: res/drawable-xhdpi/app_icon.png
Processing image: res/drawable-xxhdpi/app_icon.png
Processing image: res/drawable-xxxhdpi/app_icon.png
(processed image res/drawable-xhdpi/app_icon.png: 96% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-mdpi-v4/common_full_open_on_phone.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-mdpi-v4/common_full_open_on_phone.png: 136% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-tvdpi-v4/common_full_open_on_phone.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-tvdpi-v4/common_full_open_on_phone.png: 105% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-hdpi-v4/common_full_open_on_phone.png
(processed image res/drawable-xhdpi/app_banner.png: 93% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xhdpi-v4/common_full_open_on_phone.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-hdpi-v4/common_full_open_on_phone.png: 105% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xxhdpi-v4/common_full_open_on_phone.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xhdpi-v4/common_full_open_on_phone.png: 105% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-mdpi-v4/common_google_signin_btn_icon_dark_disabled.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xxhdpi-v4/common_full_open_on_phone.png: 105% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-tvdpi-v4/common_google_signin_btn_icon_dark_disabled.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-mdpi-v4/common_google_signin_btn_icon_dark_disabled.9.png: 270% size of source)
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-tvdpi-v4/common_google_signin_btn_icon_dark_disabled.9.png: 242% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-hdpi-v4/common_google_signin_btn_icon_dark_disabled.9.png
(processed image res/drawable-xxhdpi/app_icon.png: 92% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xhdpi-v4/common_google_signin_btn_icon_dark_disabled.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-hdpi-v4/common_google_signin_btn_icon_dark_disabled.9.png: 268% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xxhdpi-v4/common_google_signin_btn_icon_dark_disabled.9.png
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-mdpi-v4/common_google_signin_btn_icon_dark_focused.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-mdpi-v4/common_google_signin_btn_icon_dark_focused.9.png: 151% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-tvdpi-v4/common_google_signin_btn_icon_dark_focused.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-tvdpi-v4/common_google_signin_btn_icon_dark_focused.9.png: 124% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-hdpi-v4/common_google_signin_btn_icon_dark_focused.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xhdpi-v4/common_google_signin_btn_icon_dark_disabled.9.png: 261% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xhdpi-v4/common_google_signin_btn_icon_dark_focused.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-hdpi-v4/common_google_signin_btn_icon_dark_focused.9.png: 142% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xxhdpi-v4/common_google_signin_btn_icon_dark_focused.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xhdpi-v4/common_google_signin_btn_icon_dark_focused.9.png: 133% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-mdpi-v4/common_google_signin_btn_icon_dark_normal.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-mdpi-v4/common_google_signin_btn_icon_dark_normal.9.png: 155% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-tvdpi-v4/common_google_signin_btn_icon_dark_normal.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xxhdpi-v4/common_google_signin_btn_icon_dark_disabled.9.png: 244% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-hdpi-v4/common_google_signin_btn_icon_dark_normal.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-tvdpi-v4/common_google_signin_btn_icon_dark_normal.9.png: 130% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xhdpi-v4/common_google_signin_btn_icon_dark_normal.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xxhdpi-v4/common_google_signin_btn_icon_dark_focused.9.png: 124% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xxhdpi-v4/common_google_signin_btn_icon_dark_normal.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xhdpi-v4/common_google_signin_btn_icon_dark_normal.9.png: 136% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-mdpi-v4/common_google_signin_btn_icon_dark_pressed.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-hdpi-v4/common_google_signin_btn_icon_dark_normal.9.png: 142% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-tvdpi-v4/common_google_signin_btn_icon_dark_pressed.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-tvdpi-v4/common_google_signin_btn_icon_dark_pressed.9.png: 130% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-hdpi-v4/common_google_signin_btn_icon_dark_pressed.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-hdpi-v4/common_google_signin_btn_icon_dark_pressed.9.png: 139% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xhdpi-v4/common_google_signin_btn_icon_dark_pressed.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-mdpi-v4/common_google_signin_btn_icon_dark_pressed.9.png: 149% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xxhdpi-v4/common_google_signin_btn_icon_dark_pressed.9.png
(processed image res/drawable-xxxhdpi/app_icon.png: 89% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-mdpi-v4/common_google_signin_btn_icon_light_disabled.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-mdpi-v4/common_google_signin_btn_icon_light_disabled.9.png: 218% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-tvdpi-v4/common_google_signin_btn_icon_light_disabled.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xxhdpi-v4/common_google_signin_btn_icon_dark_normal.9.png: 126% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-hdpi-v4/common_google_signin_btn_icon_light_disabled.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xhdpi-v4/common_google_signin_btn_icon_dark_pressed.9.png: 133% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xhdpi-v4/common_google_signin_btn_icon_light_disabled.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-tvdpi-v4/common_google_signin_btn_icon_light_disabled.9.png: 193% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xxhdpi-v4/common_google_signin_btn_icon_light_disabled.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xhdpi-v4/common_google_signin_btn_icon_light_disabled.9.png: 205% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-mdpi-v4/common_google_signin_btn_icon_light_focused.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-mdpi-v4/common_google_signin_btn_icon_light_focused.9.png: 151% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-tvdpi-v4/common_google_signin_btn_icon_light_focused.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-tvdpi-v4/common_google_signin_btn_icon_light_focused.9.png: 133% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-hdpi-v4/common_google_signin_btn_icon_light_focused.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-hdpi-v4/common_google_signin_btn_icon_light_disabled.9.png: 217% size of source)
Processing image: /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xhdpi-v4/common_google_signin_btn_icon_light_focused.9.png
(processed image /Users/admin/Stretch mate/Temp/StagingArea/android-libraries/play-services-base-9.6.1/res/drawable-xxhdp<message truncated>
Answer by liortal · Feb 27, 2017 at 07:54 PM
This may be related to this reported issue with the AdMob plugin: https://github.com/playgameservices/play-games-plugin-for-unity/issues/801
NOTE: I provide a professional service for resolving such Android build issues. In case you're interested, feel free to contact me via this link.
@liortal I want to use your service. tried the link and its not working and my country is banned to use you website :)
Did you try this link? https://www.fiverr.com/lysergide/fix-android-build-issues-in-your-unity3d-project
Yes getting this message:
"The owner of this website (www.fiverr.com) has banned the country or region your IP address is in (LB) from accessing this website."
Answer by ugameplayer111 · Apr 20, 2017 at 08:42 AM
Have a try https://github.com/unity-plugins/Unity-Admob/ witch I used workds well unable to convert classes into dex format maybe caused by lib conflict
Your answer
Follow this Question
Related Questions
"com.google.common.base.verifyexception" Can't build my android game 0 Answers
Android build error 1 Answer
Texture compression for Android devices 0 Answers
Can't build apk getting error 0 Answers
Build an APK gets error 1 Answer