aws / lumberyard

Amazon Lumberyard is a free AAA game engine deeply integrated with AWS and Twitch – with full source.
Other
2.04k stars 540 forks source link

Cannot compile Android application via WAF #473

Open gitrndlab opened 4 years ago

gitrndlab commented 4 years ago

Describe the bug I cannot compile Android project via WAF. The problem is missing java classes in class paths for gson.jar, guava-jre.jar, kotlin-stdlib.jar libraries (which are availible in Google Command Tool API folders (e.g. lib\external\com\google\guava\guava\27.1-jre\guava-27.1-jre.jar, lib\external\kotlin-plugin-ij\Kotlin\kotlinc\lib\kotlin-stdlib.jar, lib\external\com\google\code\gson\gson\2.8.5\gson-2.8.5.jar ). As I mind this problem not exists after run Gradle script (for e.g. via Android Studio) which download missing libraries and set them into classpaths.

Steps to reproduce

  1. lmbr_waf.bat configure
  2. lmbr_waf.bat build_android_armv8_clang_profile -p game

Expected behavior Project should be successful builded and generated (with .apk etc.)

Screenshots/Logs

[2894/2971] android_manifest_merger (android_armv8_clang|profile): BinTemp\android_armv8_clang_profile\Solutions\LumberyardAndroidSDK\TestProjectLauncher\manifest\preproc\AndroidManifest.xml Solutions\LumberyardAndroidSDK\AndroidLibraries\LicenseLibrary\AndroidManifest.xml Solutions\LumberyardAndroidSDK\AndroidLibraries\APKExpansionLibrary\AndroidManifest.xml i:\Amazon\lumberyard\dev\BinTemp\AndroidCache\aar\core-1.1.0\AndroidManifest.xml i:\Amazon\lumberyard\dev\BinTemp\AndroidCache\aar\billing-1.0\AndroidManifest.xml -> BinTemp\android_armv8_clang_profile\Solutions\LumberyardAndroidSDK\TestProjectLauncher\manifest\merged\AndroidManifest.xml
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Multimap
    at com.android.manifmerger.Merger.createInvoker(Merger.java:189)
    at com.android.manifmerger.Merger.process(Merger.java:94)
    at com.android.manifmerger.Merger.main(Merger.java:42)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Multimap
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 3 more
Build failed
 -> task in 'android_manifest_merger (android_armv8_clang|profile)' failed (exit status 1): 
    {task 123150632L: android_manifest_merger AndroidManifest.xml,AndroidManifest.xml,AndroidManifest.xml,AndroidManifest.xml,AndroidManifest.xml -> AndroidManifest.xml}
'C:\\Program Files\\Java\\jdk1.8.0_201\\bin\\java.exe -cp G:/android_sdk\\tools\\lib\\common.jar;G:/android_sdk\\tools\\lib\\manifest-merger.jar;G:/android_sdk\\tools\\lib\\sdk-common.jar com.android.manifmerger.Merger --main i:\\Amazon\\lumberyard\\dev\\BinTemp\\android_armv8_clang_profile\\Solutions\\LumberyardAndroidSDK\\TestProjectLauncher\\manifest\\preproc\\AndroidManifest.xml --libs i:\\Amazon\\lumberyard\\dev\\Solutions\\LumberyardAndroidSDK\\AndroidLibraries\\LicenseLibrary\\AndroidManifest.xml;i:\\Amazon\\lumberyard\\dev\\Solutions\\LumberyardAndroidSDK\\AndroidLibraries\\APKExpansionLibrary\\AndroidManifest.xml;i:\\Amazon\\lumberyard\\dev\\BinTemp\\AndroidCache\\aar\\core-1.1.0\\AndroidManifest.xml;i:\\Amazon\\lumberyard\\dev\\BinTemp\\AndroidCache\\aar\\billing-1.0\\AndroidManifest.xml --out i:\\Amazon\\lumberyard\\dev\\BinTemp\\android_armv8_clang_profile\\Solutions\\LumberyardAndroidSDK\\TestProjectLauncher\\manifest\\merged\\AndroidManifest.xml'
Unknown error
**** Deploy Failed! *****
[2894/2971] android_manifest_merger (android_armv8_clang|profile): BinTemp\android_armv8_clang_profile\Solutions\LumberyardAndroidSDK\TestProjectLauncher\manifest\preproc\AndroidManifest.xml Solutions\LumberyardAndroidSDK\AndroidLibraries\LicenseLibrary\AndroidManifest.xml Solutions\LumberyardAndroidSDK\AndroidLibraries\APKExpansionLibrary\AndroidManifest.xml i:\Amazon\lumberyard\dev\BinTemp\AndroidCache\aar\core-1.1.0\AndroidManifest.xml i:\Amazon\lumberyard\dev\BinTemp\AndroidCache\aar\billing-1.0\AndroidManifest.xml -> BinTemp\android_armv8_clang_profile\Solutions\LumberyardAndroidSDK\TestProjectLauncher\manifest\merged\AndroidManifest.xml
Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
    at com.android.manifmerger.IntentFilterNodeKeyResolver.getKey(IntentFilterNodeKeyResolver.kt)
    at com.android.manifmerger.OrphanXmlElement.getKey(OrphanXmlElement.java:91)
    at com.android.manifmerger.OrphanXmlElement.getId(OrphanXmlElement.java:66)
    at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:167)
    at com.android.manifmerger.XmlNode.getOriginalId(XmlNode.java:50)
    at com.android.manifmerger.ActionRecorder.getDecisionTreeRecord(ActionRecorder.java:203)
    at com.android.manifmerger.ActionRecorder.recordAddedNodeAction(ActionRecorder.java:110)
    at com.android.manifmerger.ActionRecorder.recordAddedNodeAction(ActionRecorder.java:127)
    at com.android.manifmerger.ActionRecorder.recordAddedNodeAction(ActionRecorder.java:127)
    at com.android.manifmerger.ActionRecorder.recordAddedNodeAction(ActionRecorder.java:127)
    at com.android.manifmerger.ManifestMerger2.load(ManifestMerger2.java:1275)
    at com.android.manifmerger.ManifestMerger2.merge(ManifestMerger2.java:167)
    at com.android.manifmerger.ManifestMerger2.access$600(ManifestMerger2.java:75)
    at com.android.manifmerger.ManifestMerger2$Invoker.merge(ManifestMerger2.java:2076)
    at com.android.manifmerger.Merger.process(Merger.java:160)
    at com.android.manifmerger.Merger.main(Merger.java:42)
Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 16 more
Build failed
 -> task in 'android_manifest_merger (android_armv8_clang|profile)' failed (exit status 1): 
    {task 127848744L: android_manifest_merger AndroidManifest.xml,AndroidManifest.xml,AndroidManifest.xml,AndroidManifest.xml,AndroidManifest.xml -> AndroidManifest.xml}
'C:\\Program Files\\Java\\jdk1.8.0_201\\bin\\java.exe -cp G:/android_sdk\\tools\\lib\\common.jar;G:/android_sdk\\tools\\lib\\manifest-merger.jar;G:/android_sdk\\tools\\lib\\sdk-common.jar com.android.manifmerger.Merger --main i:\\Amazon\\lumberyard\\dev\\BinTemp\\android_armv8_clang_profile\\Solutions\\LumberyardAndroidSDK\\TestProjectLauncher\\manifest\\preproc\\AndroidManifest.xml --libs i:\\Amazon\\lumberyard\\dev\\Solutions\\LumberyardAndroidSDK\\AndroidLibraries\\LicenseLibrary\\AndroidManifest.xml;i:\\Amazon\\lumberyard\\dev\\Solutions\\LumberyardAndroidSDK\\AndroidLibraries\\APKExpansionLibrary\\AndroidManifest.xml;i:\\Amazon\\lumberyard\\dev\\BinTemp\\AndroidCache\\aar\\core-1.1.0\\AndroidManifest.xml;i:\\Amazon\\lumberyard\\dev\\BinTemp\\AndroidCache\\aar\\billing-1.0\\AndroidManifest.xml --out i:\\Amazon\\lumberyard\\dev\\BinTemp\\android_armv8_clang_profile\\Solutions\\LumberyardAndroidSDK\\TestProjectLauncher\\manifest\\merged\\AndroidManifest.xml'
Unknown error
**** Deploy Failed! *****
[2894/2971] android_manifest_merger (android_armv8_clang|profile): BinTemp\android_armv8_clang_profile\Solutions\LumberyardAndroidSDK\TestProjectLauncher\manifest\preproc\AndroidManifest.xml Solutions\LumberyardAndroidSDK\AndroidLibraries\LicenseLibrary\AndroidManifest.xml Solutions\LumberyardAndroidSDK\AndroidLibraries\APKExpansionLibrary\AndroidManifest.xml i:\Amazon\lumberyard\dev\BinTemp\AndroidCache\aar\core-1.1.0\AndroidManifest.xml i:\Amazon\lumberyard\dev\BinTemp\AndroidCache\aar\billing-1.0\AndroidManifest.xml -> BinTemp\android_armv8_clang_profile\Solutions\LumberyardAndroidSDK\TestProjectLauncher\manifest\merged\AndroidManifest.xml
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/gson/GsonBuilder
    at com.android.manifmerger.ManifestMerger2.createNavigationMap(ManifestMerger2.java:459)
    at com.android.manifmerger.ManifestMerger2.merge(ManifestMerger2.java:329)
    at com.android.manifmerger.ManifestMerger2.access$600(ManifestMerger2.java:75)
    at com.android.manifmerger.ManifestMerger2$Invoker.merge(ManifestMerger2.java:2076)
    at com.android.manifmerger.Merger.process(Merger.java:160)
    at com.android.manifmerger.Merger.main(Merger.java:42)
Caused by: java.lang.ClassNotFoundException: com.google.gson.GsonBuilder
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 6 more
Build failed
 -> task in 'android_manifest_merger (android_armv8_clang|profile)' failed (exit status 1): 
    {task 121241896L: android_manifest_merger AndroidManifest.xml,AndroidManifest.xml,AndroidManifest.xml,AndroidManifest.xml,AndroidManifest.xml -> AndroidManifest.xml}
'C:\\Program Files\\Java\\jdk1.8.0_201\\bin\\java.exe -cp G:/android_sdk\\tools\\lib\\common.jar;G:/android_sdk\\tools\\lib\\manifest-merger.jar;G:/android_sdk\\tools\\lib\\sdk-common.jar com.android.manifmerger.Merger --main i:\\Amazon\\lumberyard\\dev\\BinTemp\\android_armv8_clang_profile\\Solutions\\LumberyardAndroidSDK\\TestProjectLauncher\\manifest\\preproc\\AndroidManifest.xml --libs i:\\Amazon\\lumberyard\\dev\\Solutions\\LumberyardAndroidSDK\\AndroidLibraries\\LicenseLibrary\\AndroidManifest.xml;i:\\Amazon\\lumberyard\\dev\\Solutions\\LumberyardAndroidSDK\\AndroidLibraries\\APKExpansionLibrary\\AndroidManifest.xml;i:\\Amazon\\lumberyard\\dev\\BinTemp\\AndroidCache\\aar\\core-1.1.0\\AndroidManifest.xml;i:\\Amazon\\lumberyard\\dev\\BinTemp\\AndroidCache\\aar\\billing-1.0\\AndroidManifest.xml --out i:\\Amazon\\lumberyard\\dev\\BinTemp\\android_armv8_clang_profile\\Solutions\\LumberyardAndroidSDK\\TestProjectLauncher\\manifest\\merged\\AndroidManifest.xml'
Unknown error
**** Deploy Failed! *****

Lumberyard version 1.23.1 (with my fix described in issue 472)

Suggested solution Maybe you could add a gradle step to the WAF / cmake to download and setup all needed libraries or just add it to download with other SDKs.

AMZN-alexpete commented 4 years ago

Hi @researchdeveloping , thanks for reporting this issue. We're tracking this internally with the issue ID LY-112660