‘Could not create the Java Virtual Machine" when building my first Android project

  

I recently installed the Community Edition, installed Java JDK and AndroidSDKTools. I put together a quick FMX project that works as expected in Windows. Under the Android Platform, I successfully added my phone as a target. However, building for Android fails. I copied the command and ran it at a command line to try to get better error information.
"C:\Users\Public\Documents\Embarcadero\Studio\20.0\CatalogRepository\AndroidSDK-2525_20.0.36039.7899\build-tools\28.0.2\dx.bat" –dex –output="C:\PRJ\Delphi\FMX\ImgVwr\Android64\Debug\classes.dex" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\android-support-v4.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\cloud-messaging.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-ads-base.17.2.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-ads.17.2.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-analytics.16.0.8.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-base.16.0.1.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-basement.16.2.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-gass.17.2.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-identity.16.0.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-maps.16.1.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-stats.16.0.1.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-tasks.16.0.1.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-android-gms.play-services-wallet.16.0.1.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-firebase.firebase-analytics.16.4.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-firebase.firebase-common.16.1.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-firebase.firebase-iid-interop.16.0.1.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-firebase.firebase-iid.17.1.1.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\com-google-firebase.firebase-messaging.17.5.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\fmx.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\google-play-billing.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Debug\google-play-licensing.dex.jar"

-Djava.ext.dirs=C:\Users\Public\Documents\Embarcadero\Studio\20.0\CatalogRepository\AndroidSDK-2525_20.0.36039.7899\build-tools\28.0.2\lib is not supported. Use -classpath instead.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Everything I found online pointed to path issues in SDK Manager options. However I verified each of the paths. Any suggestions on what else I should check?

Comments are closed.