distriqt / ANE-AndroidSupport

Android Support Library Native Extension
https://airnativeextensions.com
22 stars 4 forks source link

Error building with new AndroidX core AND old version of Java #23

Closed ldrlysysadmin closed 2 years ago

ldrlysysadmin commented 2 years ago

This is similar to the previously reported issues regarding building with the new ANEs and getting the "Found tag id where item is expected" errors. However, there's an additional issue we're experiencing. Here's the errors we're getting:

 [java] WARNING: could not find appropriate Java Home location for v11+ JDK
 [java] aapt tool failed:/private/var/folders/66/2x0ghy457995pfplcjv9bhrr0000gr/T/15fd7f25-84f9-445b-abf0-17b430f8e09f/savedstate-1.1.0-res/values/values.xml:3: error: Found tag id where item is expected
 [java] 
 [java] /private/var/folders/66/2x0ghy457995pfplcjv9bhrr0000gr/T/15fd7f25-84f9-445b-abf0-17b430f8e09f/lifecycle-viewmodel-2.4.1-res/values/values.xml:3: error: Found tag id where item is expected
 [java] 
 [java] /private/var/folders/66/2x0ghy457995pfplcjv9bhrr0000gr/T/15fd7f25-84f9-445b-abf0-17b430f8e09f/lifecycle-runtime-2.4.1-res/values/values.xml:3: error: Found tag id where item is expected
 [java] 
 [java] /private/var/folders/66/2x0ghy457995pfplcjv9bhrr0000gr/T/15fd7f25-84f9-445b-abf0-17b430f8e09f/constraintlayout-2.1.3-res/values/values.xml:1491: error: Attribute "android:translationX" has already been defined
 [java] /private/var/folders/66/2x0ghy457995pfplcjv9bhrr0000gr/T/15fd7f25-84f9-445b-abf0-17b430f8e09f/constraintlayout-2.1.3-res/values/values.xml:1495: error: Attribute "android:translationY" has already been defined
 [java] /private/var/folders/66/2x0ghy457995pfplcjv9bhrr0000gr/T/15fd7f25-84f9-445b-abf0-17b430f8e09f/constraintlayout-2.1.3-res/values/values.xml:1498: error: Attribute "android:translationZ" has already been defined

I have updated the adt file using the one posted by ajwfrost from here: https://github.com/airsdk/Adobe-Runtime-Support/discussions/1782 But I get the same error.

I notice that Java 11 is mentioned in numerous places and the warning I'm getting seems to indicate that it's required for things to work. However, we're currently stuck with Java 1.8.112 due to us our product using a 1024-bit key (which versions of Java after 1.8.112 do not support). How can I resolve this issue?

marchbold commented 2 years ago

You must use Java 11 to build your application, you can switch to java 8 afterwards to sign if needs be, but we highly recommend moving to play store signing. With this you can upload your existing 1024 bit certificate to google and they will handle signing, and you can create a new "upload certificate" that you will use to sign and upload aab's to the play console (this new certificate can be 2048 bit, used with java 11 and changed if need be)