distriqt / ANE-CustomResources

Android Custom Resources for AIR Applications
https://airnativeextensions.com
15 stars 4 forks source link

Build Failed: build.xml:248 exec returned 2 #42

Closed FatRedBird closed 4 years ago

FatRedBird commented 5 years ago

Hi, hopefully you can help, I've been unable to run the ant build without errors, I've tried searching but can't see an answer already here.

the current error which I can't get past is this: BUILD FAILED C:\customResourceBuilder\ANE-CustomResources-master\build.xml:240 the following error occured while executing this line: C:\customResourceBuilder\ANE-CustomResources-master\build.xml:248 exec returned: 2

I attach the rest of the output here: ant.txt

Java version is 1.80_221 (though I tried with 1.8.0_05 and 12.0.02 and got different errors)

build.config variables: `

AIR SDK

air.sdk = C:/customResourceBuilder/AIRSDK_30

ANDROID

android.sdk = C:/Users/Robin/AppData/Local/Android/Sdk

`

marchbold commented 5 years ago

You must use AIR 33 to build the latest version of this script. Otherwise, remove the references to Android ARM64 from the extension xml and the packaging command.

amorganiv commented 4 years ago

After setting up the custom resources and testing the build it outputs these errors. Its set to AIR 33.

BUILD FAILED ANE-CustomResources-master\build.xml:218: The following error occurred while executing this line: ANE-CustomResources-master\build.xml:115: The type doesn't support the "swf-version" attribute.

marchbold commented 4 years ago

Can you double check the path to your AIR SDK, sounds like it can't find the compiler.

amorganiv commented 4 years ago

Updated the AIR path with double back slashes: air.sdk = C:\AM_development\AIR_33_315 android.sdk = C:/Users/username/AppData/Local/Android/Sdk

Here is the ant output: ant-build-output.txt

marchbold commented 4 years ago

Looks like you are using the wrong version of Java on your machine. You need to install 1.8.x otherwise you'll have issues with AIR packaging.

amorganiv commented 4 years ago

Switched to jre1.8.0.

First line after running ant: Unable to locate tools.jar. Expected to find it in C:\Program Files (x86)\Java\jre1.8.0_241\lib\tools.jar

ant output: ant-build-output.txt

marchbold commented 4 years ago

Looks like there's something wrong with the resources you are trying to package:

C:\AM_development\ANE-CustomResources-master\platform\android\app\build\intermediates\res\merged\release\values\values.xml:9: AAPT: error: style attribute 'attr/colorPrimary (aka com.distriqt.extension.customresources:attr/colorPrimary)' not found.

Double check you are correctly specifying any colours you are using in the resources.

amorganiv commented 4 years ago

Thank you Michael! Removed the res 'values' folder & it complied correctly with jdk1.8.0.

marchbold commented 4 years ago

Glad to hear!