Closed yvant closed 5 years ago
Did you update the config to point to your AIR SDK?
Yes, here is my build.config (i'm using FlashDevelop to code):
## ANE build config
# AIR SDK
#air.sdk = /Users/marchbold/work/sdks/air/current
air.sdk = C:\\Users\\Yvan\\AppData\\Local\\FlashDevelop\\Apps\\flexairsdk\\4.6.0+25.0.0\\
# ANDROID
#android.sdk = /Users/marchbold/work/sdks/android/android-sdk-macosx
android.sdk = C:\\Program Files (x86)\\FlashDevelop\\Tools\\android
# CHANGE THIS PACKAGE NAME IF YOU ARE USING FIREBASE
android.package = com.distriqt.extension
##
project.name = Resources
version = 1
output.name = ${android.package}.${project.name}.ane
output.dir = ./build
output.docs = ./build/docs
actionscript.dir = ./platform/actionscript
default.dir = ./platform/default
android.dir = ./platform/android
android.resdir = customresources
android.resources = res
You may have to wrap your paths with "
due to the spaces in your paths, or escape the space characters.
Hi,
I tried this:
## ANE build config
# AIR SDK
#air.sdk = /Users/marchbold/work/sdks/air/current
air.sdk = "C:\\Users\\Yvan\\AppData\\Local\\FlashDevelop\\Apps\\flexairsdk\\4.6.0+25.0.0\\"
# ANDROID
#android.sdk = /Users/marchbold/work/sdks/android/android-sdk-macosx
#android.sdk = "C:\\Program Files (x86)\\FlashDevelop\\Tools\\android\\"
android.sdk = C:\\Progra~2\\FlashDevelop\\Tools\\android
# CHANGE THIS PACKAGE NAME IF YOU ARE USING FIREBASE
android.package = com.distriqt.extension
##
project.name = Resources
version = 1
output.name = ${android.package}.${project.name}.ane
output.dir = ./build
output.docs = ./build/docs
actionscript.dir = ./platform/actionscript
default.dir = ./platform/default
android.dir = ./platform/android
android.resdir = customresources
android.resources = res
And got something like that:
[taskdef] Could not load definitions from resource flexTasks.tasks. It could not be found.
clean:
[taskdef] Could not load definitions from resource flexTasks.tasks. It could not be found.
clean_actionscript:
[taskdef] Could not load definitions from resource flexTasks.tasks. It could not be found.
clean_default:
[taskdef] Could not load definitions from resource flexTasks.tasks. It could not be found.
clean_android:
build:
[taskdef] Could not load definitions from resource flexTasks.tasks. It could not be found.
build_actionscript:
[echo] Building actionscript library...
BUILD FAILED
D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\build.xml:214: The following error occurred while executing this line:
D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\build.xml:115: Problem: failed to create task or type compc
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
Placing your path in "
probably won't need you to escape \
ie. replace any \\
with \
in your air.sdk
path.
So in the end, I added this line in build.xml
<property name="FLEX_HOME" value="${air.sdk}" />
And added the absolute path to gradlew.bat, which was my next issue. Now, I have a new issue building the ANE:
`Buildfile: D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\build.xml
clean:
clean_actionscript: [delete] Deleting directory D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\platform\actionscript\bin
clean_default: [delete] Deleting directory D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\platform\default\bin
clean_android: [delete] Deleting directory D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\platform\android\app
build:
build_actionscript: [echo] Building actionscript library... [echo] "C:/Program Files (x86)/FlashDevelop/Tools/android" [echo] C:/Users/Yvan/AppData/Local/FlashDevelop/Apps/flexairsdk/4.6.0+25.0.0 [echo] ./platform/actionscript [echo] distriqt.extension.resources.swc [compc] Chargement du fichier de configuration C:\Users\Yvan\AppData\Local\FlashDevelop\Apps\flexairsdk\4.6.0+25.0.0\frameworks\air-config.xml [compc] D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\platform\actionscript\bin\distriqt.extension.resources.swc (2229 octets) [echo] done
build_default: [echo] Building default library... [compc] Chargement du fichier de configuration C:\Users\Yvan\AppData\Local\FlashDevelop\Apps\flexairsdk\4.6.0+25.0.0\frameworks\air-config.xml [compc] D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\platform\default\bin\distriqt.extension.resources.default.swc (2086 octets) [echo] done
create_android_project: [mkdir] Created dir: D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\platform\android\app [copy] Copying 4 files to D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\platform\android\app [mkdir] Created dir: D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\platform\android\app\src\main\java\com\distriqt\extension [copy] Copying 2 files to D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\platform\android\app\src\main\java\com\distriqt\extension [mkdir] Created dir: D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\platform\android\app\src\main\res [copy] Copying 5 files to D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\platform\android\app\src\main\res [copy] Copying 1 file to D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\platform\android [copy] Copying 1 file to D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\platform\android\app\libs
build_android: [echo] Building Android library...
build_android_osx:
build_android_windows: [exec] Support for running Gradle using Java 6 has been deprecated and will be removed in Gradle 3.0 [exec] :wrapper UP-TO-DATE [exec] [exec] BUILD SUCCESSFUL [exec] [exec] Total time: 6.046 secs [exec] Support for running Gradle using Java 6 has been deprecated and will be removed in Gradle 3.0 [exec] [exec] BUILD FAILED [exec] [exec] Total time: 0.993 secs [exec] [exec] FAILURE: Build failed with an exception. [exec] [exec] What went wrong: [exec] Task 'assemble' not found in root project 'ANE-CustomResources-master'. [exec] [exec] Try: [exec] Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. [exec] Result: 1
package:
package_android:
BUILD FAILED D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\build.xml:235: The following error occurred while executing this line: D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\build.xml:185: Warning: Could not find file D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\platform\android\app\build\intermediates\bundles\release\classes.jar to copy.
Total time: 10 seconds `
Two issues there, looks as though you are running an old version of Java, highly suggest you update that to start.
Secondly that error with the build is because you've changed the path incorrectly in the gradle file and it can't find the android project.
I work with flashdevelop and it's recommended that we use java6. I'll try to update it to a newer version and see how it reacts. I didn't touch th gradle file though, I just pointed to it in the build file with a hard absolute path to make it work. Can I get a temp ane meanwhile? I am stuck here and didn't have time to test notifications at all...
Of course!!
Just send your resources to airnativeextensions@distriqt.com and I'll build one for you!
Issue here was pointing to the wrong AIR SDK --
Hello,
I'm trying to build a CustomResources ANE. So far, I installed ANT and set the variables accordingly. But when I launch ant on the command prompt, I get this:
Buildfile: D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\build.xml clean: clean_actionscript: clean_default: clean_android: build: build_actionscript: [echo] Building actionscript library... BUILD FAILED D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\build.xml:214: The following error occurred while executing this line: D:\Dropbox\Projects\Libs\ANE-Notifications-master\ANE-CustomResources-master\build.xml:115: FLEX_HOME must be set to use the Flex Ant Tasks
Total time: 0 seconds
How do I setup FLEX_HOME?
Thank you!