distriqt / ane-customresources Goto Github PK
View Code? Open in Web Editor NEWAndroid Custom Resources for AIR Applications
Home Page: https://airnativeextensions.com
Android Custom Resources for AIR Applications
Home Page: https://airnativeextensions.com
I've successfully built the ANE. But the directions somewhat end there "Add to project.."
How do we refer to the icon now so that the PushNotifications will know where to find them. were not doing any categories or anything yet where i've seen a setIcon method. Just a standard push notification (now the icon is a white dot)
Hi,
This question doesn't belong here but no idea how else to write you.
Is there Android License Verification Library functional available in your ANE-s?
https://developer.android.com/google/play/licensing/adding-licensing
If no, doesn't it make sense to have an ANE like that?
Hello!
I updated my ANEs to the AndroidX level but the new coded CustomResources.ANE stops Flash Builder with the error message that the files are not correct formated.
It seems that your repository only compiles on API 27 where 29 is needed. I am just wondering why this isn't a bigger issue. As far as I know aps cannot be without the CustomResources.ANE if they want to use the PushNotifications.ANE!? Or do not use many users the Push ANE?
Best regards
Marc
Followed the instructions and got the below errors in windows 10:
C:\Users\phill\Desktop\ANE-CustomResources-master>ant
Buildfile: C:\Users\phill\Desktop\ANE-CustomResources-master\build.xml
[taskdef] Could not load definitions from resource flexTasks.tasks. It could not be found.
[taskdef] Could not load definitions from resource anttasks.properties. It could not be found.
clean:
[taskdef] Could not load definitions from resource flexTasks.tasks. It could not be found.
[taskdef] Could not load definitions from resource anttasks.properties. It could not be found.
clean_actionscript:
[taskdef] Could not load definitions from resource flexTasks.tasks. It could not be found.
[taskdef] Could not load definitions from resource anttasks.properties. It could not be found.
clean_default:
[taskdef] Could not load definitions from resource flexTasks.tasks. It could not be found.
[taskdef] Could not load definitions from resource anttasks.properties. It could not be found.
clean_android:
build:
[taskdef] Could not load definitions from resource flexTasks.tasks. It could not be found.
[taskdef] Could not load definitions from resource anttasks.properties. It could not be found.
build_actionscript:
[echo] Building actionscript library...
BUILD FAILED
C:\Users\phill\Desktop\ANE-CustomResources-master\build.xml:213: The following error occurred while executing this line:
C:\Users\phill\Desktop\ANE-CustomResources-master\build.xml:89: 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 / declarations have taken place.
Total time: 0 seconds
C:\Users\phill\Desktop\ANE-CustomResources-master>
In build.config I see this
# CHANGE THIS PACKAGE NAME IF YOU ARE USING FIREBASE
android.package = com.distriqt.extension.customresources
Is there must be my application ID with "air." prefix for Android or without it?
Excuse wrong Topic... have changed this to notification..
Hi,
We tried to follow instructions and tried to make the Custom Resource ANE..
But, while building we are facing following error.
I am not sure, if it some setup error. but looks like setup has been done as instructed.
Have attached few Screen Shots to show my setups as well
Thanks,
Aseem
with build.config
# AIR SDK
air.sdk = D:\\SDK\\air-33
# ANDROID
android.sdk = C:\\Users\\ASUS\\AppData\\Local\\Android\\Sdk
I have the following error :
The SDK directory 'C:\sdk\custom-res\platform\android\C:UsersASUSAppDataLocalAndroidSdk' does not exist
there seems to be 2 problems :
OS : Windows 10
ANT 1.9.15
jre 1.8
Related to #39
Got an error
compile_windows:
[exec] Unsupported platform: '-platform Android-ARM64'. Must be one of [default, Android-ARM, Android-x86, iPhone-ARM, appleTV-ARM, appleTV-x86, iPhone-x86, MacOS-x86, MacOS-x86-64, Windows-x86, Windows-x86-64]
Tried with different jdk 111 (x86 and 64) and 121 (x86 and 64).
ANE is created successfully If i exclude this platform from build
In Android 6.0 and 6.0.1 the notification icon is appearing all white. First I generated the icons as taught on the page. Then I generated the icons directly in Android Studio and even so when I receive the push notifications the icon continues to appear all white. I followed all the steps and managed the ANE correctly. I did the whole process on a MacOSX computer.
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!
I tried absolute paths starting with c://
and relative paths from the directory it was trying to execute from
The only solution to this problem at this time (which I am testing right now) is to move the sdk folder to ANE-CustomResources\platform\android and change the config for the android to sdk:
# ANDROID
android.sdk = sdk
I am writing this while downloading the rest of the sdk from the andorid dev studio as it prompted me to accept the license and the rest of the SDK.
I finally build custom ane for icon with ant with success but I still get the Bell icon ??
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 = C:/customResourceBuilder/AIRSDK_30
android.sdk = C:/Users/Robin/AppData/Local/Android/Sdk
`
wrong topic
When I try to build for android, I get the following error:
[exec] * What went wrong: [exec] A problem occurred configuring project ':app'. [exec] > The SDK directory 'E:\Development\2_ANE\ANE-CustomResources-master\platform\android\E:Androidsdk' does not exist.
It looks like the path of my android sdk is used wrong.
This is from my build.config:
air.sdk = E:\\Development\\SDKs\\4161_33
android.sdk = E:\\Android\\sdk
Any ideas?
cmd java version => "1.8.0_40"
after updating java to "1.8.0_111" still getting same error.
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
JAVA_HOME = jdk1.7.0_05
windows 7
there is always problems with java
tried to setting java_home and path via bat file to jre6 but no success
@echo off
SET "JAVA_HOME=C:\Program Files (x86)\Java\jre6
SET "PATH=%JAVA_HOME%\bin;%PATH%"
java -version
pause
cmd /k ant
BUILD FAILED
.......\build.xml:42: javax.script.ScriptException: sun.org.mozilla.javascript.internal.Eva
luatorException: The choice of Java constructor replace matching JavaScript argu
ment types (function,string) is ambiguous; candidate constructors are:
class java.lang.String replace(char,char)
class java.lang.String replace(java.lang.CharSequence,java.lang.CharSequence
) (<Unknown source>#5) in <Unknown source> at line number 5
at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.ja
va:220)
at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.ja
va:236)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
Hello, I'm getting the following error when trying to build my ANE. My AIR and Anrdoid paths are correct. I noticed in another thread that there can be issues with trying to write to remote drives, but that's not the case in my situation. Any other ideas? My Java version is 1.8.x
Could not find file ANE-CustomResources-master/platform/android/app/build/intermediates/packaged-classes/release/classes.jar to copy.
We have used the last version of the repository to build the customResource.ane but it does not have the x86_64 files.
Hi,
Im trying to build notification icons, but i get build failed. I have latest android studio and im using AIR 29.
This is the error i get after building.
https://imgur.com/a/V6Ek9e2
Thx
Luka
Can you confirm what versions of:
Ant
Java SDK
AIR SDK
were used to get this working on 10?
I have
Ant 1.10.1
jdk1.8.0_131
Air 26
Latest Android SDK
Trying to build firebase android config ANE
Please advice
Hi, as subject, I generated the icon using notification icon generator. If possible please help compile the color set to ANE, else black and white will be fine as well.
Color icon set:
https://www.dropbox.com/s/no6iv4ojij8jtnm/res_for_build_ane_color.zip?dl=0
Black n white icon set
https://www.dropbox.com/s/hruro085cw5leoz/res_for_build_ane_black_white.zip?dl=0
Thank you in advance
Hi is there a requirement to change either the default:
android.package
or
package.name
values in build.config when also using the Firebase ANE?
Or is it good to go for Firebase compatibility without changing either of these two values.
Thanks
I have added Firebase, Core and InAppBilling in my project and I am facing this error while I compile my project.
Your notification icon needs to be white(grey) and transparent and will be converted to meet these requirements if you provide something different.
maybe i don't understand correctly but it seems your notification anes not supports color bitmaps just black and white ?
I'm experiencing problems running ant to compile on a Windows 10 machine.
I have all the necessary files configured and installed but when I run ant I always get the same error:
Buildfile: F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\build.xml
clean:
clean_actionscript:
[delete] Deleting directory F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\platform\actionscript\bin
clean_default:
[delete] Deleting directory F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\platform\default\bin
clean_android:
[delete] Deleting directory F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\platform\android\app
build:
build_actionscript:
[echo] Building actionscript library...
[compc] Loading configuration: F:\FLEXSDKS\AIRSDK 26.0\frameworks\air-config.xml
[compc]
[compc]
[compc] 2172 bytes written to F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\platform\actionscript\bin\distriqt.extension.resources.swc in 1,031 seconds
[compc]
[echo] done
build_default:
[echo] Building default library...
[compc] Loading configuration: F:\FLEXSDKS\AIRSDK 26.0\frameworks\air-config.xml
[compc]
[compc]
[compc] 2016 bytes written to F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\platform\default\bin\distriqt.extension.resources.default.swc in 0,732 seconds
[compc]
[echo] done
create_android_project:
[mkdir] Created dir: F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\platform\android\app
[copy] Copying 4 files to F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\platform\android\app
[mkdir] Created dir: F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\platform\android\app\src\main\java\com\distriqt\extension\customresources
[copy] Copying 2 files to F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\platform\android\app\src\main\java\com\distriqt\extension\customresources
[mkdir] Created dir: F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\platform\android\app\src\main\res
[copy] Copying 1 file to F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\platform\android
[copy] Copying 1 file to F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\platform\android\app\libs
build_android:
[echo] Building Android library...
build_android_osx:
build_android_windows:
BUILD FAILED
F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\build.xml:215: The following error occurred while executing this line:
F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\build.xml:146: The following error occurred while executing this line:
F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\build.xml:163: Execute failed: java.io.IOException: Cannot run program "gradlew.bat" (in directory "F:\PROYECTOS\DoNetworking\ane\CustomResources\trunk\platform\android"): CreateProcess error=2, System cannot find the request file
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:426)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:440)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:629)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:670)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:496)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:857)
at org.apache.tools.ant.Main.startAnt(Main.java:236)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:287)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:113)
Caused by: java.io.IOException: CreateProcess error=2, System cannot find the request file
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 49 more
I think that is something related to gradle build but not sure.
If you are using the Notification composer like us to send Notifications you will not be able to specify a custom Notification Icon in the Payload.
To still make use of your packaged Icons and not have a blank white square on your Notifications you have to add this to the Manifest section of your descriptor (inside <application>
):
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/your_icon_name" />
And the tint can be changed like this:
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/google_blue" />
I'm not sure how to specify a custom color since we are sticking to the default which is white.
Hhi. To prevent additional searching add to your dicumentation commands to agree android license agreement
on Windows:
cd "%ANDROID_HOME%"/tools/bin
Run the sdkmanager as follows:
sdkmanager --licenses
And accept the licenses you did not accept yet (but need to).
For more details see the Android Studio documentation, although the current documentation is missing any description on the --licenses option.
Hello, I am wondering when you say to put the icon resources in the /res directory, should it look like folders?
/drawable-hdpi
/drawable-mdpi
/drawable-xhdpi
/drawable-xxhdpi
/drawable-xxxhdpi
OR
should we pull the image from those and put into the resource folder? do names matter of these resources, etc? kind of unclear here what it should look like in the /res directory.
I have compiled the ANE and it didn't work with the new android icons, so just wondering.
Resolved
Hallo,
we are trying to create resources ane for Firebase but we have an error when trying to run ant. We installed latest Android SDK on our Mac OS X and also updated JAVA (1.8.0_77). We use AIR 29.0.0.122.
Here is output from console:
Buildfile: /Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/build.xml
clean:
clean_actionscript:
[delete] Deleting directory /Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/platform/actionscript/bin
clean_default:
[delete] Deleting directory /Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/platform/default/bin
clean_android:
[delete] Deleting directory /Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/platform/android/app
build:
build_actionscript:
[echo] Building actionscript library...
[compc] Loading configuration: /Users/jakubkovacs/AIR/AIR29.0/frameworks/air-config.xml
[compc]
[compc] 2172 bytes written to /Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/platform/actionscript/bin/distriqt.extension.customresources.swc in 0.766 seconds
[echo] done
build_default:
[echo] Building default library...
[compc] Loading configuration: /Users/jakubkovacs/AIR/AIR29.0/frameworks/air-config.xml
[compc]
[compc] 2016 bytes written to /Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/platform/default/bin/distriqt.extension.customresources.default.swc in 0.699 seconds
[echo] done
create_android_project:
[mkdir] Created dir: /Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/platform/android/app
[copy] Copying 4 files to /Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/platform/android/app
[mkdir] Created dir: /Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/platform/android/app/src/main/java/com/distriqt/extension/customresources
[copy] Copying 2 files to /Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/platform/android/app/src/main/java/com/distriqt/extension/customresources
[mkdir] Created dir: /Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/platform/android/app/src/main/res
[copy] Copying 1 file to /Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/platform/android/app/src/main/res
[copy] Copying 1 file to /Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/platform/android
[copy] Copying 1 file to /Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/platform/android/app/libs
build_android:
[echo] Building Android library...
build_android_osx:
[exec] Incremental java compilation is an incubating feature.
[exec]
[exec] FAILURE: Build failed with an exception.
[exec]
[exec] * What went wrong:
[exec] java.io.IOException: Operation not supported
[exec] > Operation not supported
[exec]
[exec] * Try:
[exec] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[exec] :wrapper
[exec]
[exec] BUILD FAILED
[exec]
[exec] Total time: 3.551 secs
[exec] Result: 1
[exec] Incremental java compilation is an incubating feature.
[exec]
[exec] FAILURE: Build failed with an exception.
[exec]
[exec] * What went wrong:
[exec] java.io.IOException: Operation not supported
[exec] > Operation not supported
[exec]
[exec] * Try:
[exec] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[exec] :app:preBuild UP-TO-DATE
[exec] :app:preDebugBuild UP-TO-DATE
[exec] :app:checkDebugManifest
[exec] :app:prepareDebugDependencies
[exec] :app:compileDebugAidl
[exec]
[exec] BUILD FAILED
[exec]
[exec] Total time: 3.54 secs
[exec] Result: 1
build_android_windows:
package:
package_android:
BUILD FAILED
/Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/build.xml:228: The following error occurred while executing this line:
/Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/build.xml:178: Warning: Could not find file /Volumes/Work/buckleup/boehringer/mobile-apps/respimat-playbook-app-pl/app/ane/platform/android/app/build/intermediates/bundles/release/classes.jar to copy.
Total time: 12 seconds
But maybe we're doing something wrong so please any help is appreciated.
Thank you.
As the suggested website now generates mipmap folders.
Hi.
I made corrections to the ant build.xml in order for it to work on Linux, everything works fine but at the end it crashes
compile_windows:
compile_osx:
compile_linux:
[exec] Missing resource folder customresources for platform Android-x86
BUILD FAILED
/home/ANE-CustomResources-master/build.xml:261: The following error occurred while executing this line:
/home/Android/ANE-CustomResources-master/build.xml:296: exec returned: 12
296 <exec executable="${air.sdk}/bin/adt" failonerror="true">
297 <arg value="-package"/>
298 <arg value="-target"/>
299 <arg value="ane"/>
300 <arg value="${output.dir}/${output.name}"/>
301 <arg value="./build_config/extension.build.xml"/>
302 <arg line="-swc ${actionscript.dir}/bin/${actionscript.name}"/>
303 <arg line="-platform Android-ARM -platformoptions ./build_config/platform_android.build.xml -C ${android.dir}/${output.dir} ."/>
304 <arg line="-platform Android-x86 -platformoptions ./build_config/platform_android.build.xml -C ${android.dir}/${output.dir} ."/>
305 <arg line="-platform default -C ${default.dir}/bin ."/>
306</exec>
Milkman did that in their EasyPush ane. there is no need to re build the native file for every application. we migrated to your PushNotification service because of your better support team and better options on the native. but it seems that we are going to lose this feature for our new apps.
Hello!
I m trying create to config.ane for firebase pushnotification on Android.
My first try I was getting this error;
BUILD FAILED
F:\Users\eayaydin\Adobe Flash Builder 4.6\ansmanApp\config\build.xml:45: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: The choice of Java constructor replace matching JavaScript argument types (function,string) is ambiguous; candidate constructors are:
class java.lang.String replace(char,char)
class java.lang.String replace(java.lang.CharSequence,java.lang.CharSequence) (<Unknown source>#5) in <Unknown source> at line number 5
After that I checked the Issues on github and I found a topic.
And I changed the this part attributes.get( "value" ).replace( /\./g, "/" ) );
with this attributes.get( "value" ).replace( "/\./g", "/" ) );
like his said.
And after that I didnt get fist error but this time I got this error;
BUILD FAILED
F:\Users\eayaydin\Adobe Flash Builder 4.6\ansmanApp\config\build.xml:261: The following error occurred while executing this line:
F:\Users\eayaydin\Adobe Flash Builder 4.6\ansmanApp\config\build.xml:138: 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.
Please help me :) I'm succeed on iOS but I cant on Android...
Hi,
When i compile my app I receive the error:
unexpected failure: duplicate entry: air/chogan/app/R.class
java.util.zip.ZipException: duplicate entry: air/chogan/app/R.class
at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:232)
at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:109)
at com.adobe.air.apk.ResourceBytecodeGenerator.generateFromRFile(ResourceBytecodeGenerator.java:85)
at com.adobe.air.apk.APKOutputStream.generateByteCodeFromRFile(APKOutputStream.java:1060)
at com.adobe.air.apk.APKOutputStream.generateResourcesAndManifest(APKOutputStream.java:1017)
at com.adobe.air.apk.APKOutputStream.addApplicationDescriptor(APKOutputStream.java:327)
at com.adobe.air.ApplicationPackager.addSpecialFiles(ApplicationPackager.java:509)
at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java:87)
at com.adobe.air.ADT.parseArgsAndGo(ADT.java:673)
at com.adobe.air.ADT.run(ADT.java:471)
at com.adobe.air.ADT.main(ADT.java:521)
I use this anes:
com.distriqt.NativeWebView com.distriqt.Core com.distriqt.Share com.distriqt.Firebase com.distriqt.playservices.Base com.distriqt.Application com.distriqt.PushNotifications com.distriqt.playservices.GCM com.distriqt.playservices.Ads com.distriqt.Adverts com.distriqt.Dialog com.distriqt.LocalAuth com.distriqt.androidsupport.V4 com.distriqt.androidsupport.AppCompatV7 com.distriqt.PDFReader com.distriqt.androidsupport.CustomTabs com.distriqt.CustomResourcesHi,
I have added the ANE you sent me to the library (using Intellij Idea) and in the application descriptor:
<extensions>
<extensionID>com.distriqt.PushNotifications</extensionID>
<extensionID>com.distriqt.Core</extensionID>
<extensionID>com.distriqt.Firebase</extensionID>
<extensionID>com.distriqt.androidsupport.V4</extensionID>
<extensionID>com.distriqt.androidsupport.CustomTabs</extensionID>
<extensionID>com.distriqt.CustomResources</extensionID>
<extensionID>com.distriqt.playservices.Base</extensionID>
</extensions>
but still get the bell.
In the ANE there are the correct images...
Anything more I have to do?
Hi,
I've recently tested new beta 64bit versions of the following ANEs:
com.distriqt.androidsupport.V4
com.distriqt.Core
com.distriqt.Firebase
com.distriqt.playservices.Base
com.distriqt.PushNotifications
I was able to compile the apk file, but when I'm launching the application I'm receving: REGISTER_FAILED: Firebase App not configured (from PushNotifications.service.register()).
Before (32bit versions) everything was ok.
I suspect that, the problem is 32 bit CustomResources.ane, that I've created using ant. It does not contain "Android-ARM64" folder.
If that is the case, how can I create 64bit CustomResources.ane?
Or maybe there is some other problem with the configuration, that I'm missing?
Hi
I can build this ANE using ant (changing only the build_config/build.config
air.sdk and android.sdk values and adding the res/values.xml
), but running a super simple test build of an apk (using the command line) gives me the error...
An implementation for native extension 'com.distriqt.extension.customresources.Resources' required by the application was not found for the target platform
In plain English: it couldn't find the ANE.
The ANE file is named com.distriqt.extension.customresources.Resources.ane
and in my applicationDescriptor.xml I have the line...
<extensionID>com.distriqt.extension.customresources.Resources</extensionID>
I had a look inside the ANE and saw that its id
is actually com.distriqt.CustomResources
(found in META-INF/ANE/extension.xml). So I change the applicationDescriptor line to...
<extensionID>com.distriqt.CustomResources</extensionID>
And this time the apk build gives me the error...
aapt tool failed:invalid resource directory name: /private/var/folders/kj/00jc9ntj3dj1j2jd5lkrs9vw0000gn/T/81455ed5-b745-47da-b5e4-e32411fcde61/customresources values.xml
Since we're actually using Distriqt's Firebase ANE in our project, I made a third attempt, this time changing the build_config/build.config
android.package to co.playlingo.wordable.extensions.customresources
(as recommended on another issue) but we got the same problems as above.
Here's my res/values.xml
file (redacted)...
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="google_app_id" translatable="false">xxxx</string>
<string name="gcm_defaultSenderId" translatable="false">xxxx</string>
<string name="google_api_key" translatable="false">xxxx</string>
<string name="google_crash_reporting_api_key" translatable="false">xxxx</string>
<string name="default_web_client_id" translatable="false">xxxx</string>
<string name="firebase_database_url" translatable="false">xxxx</string>
<string name="ga_trackingId" translatable="false">xxxx</string>
</resources>
And using...
Any help much appreciated thanks.
Hi @marchbold ,
I'm Trying to add icon for the push notifications.
I've added only 1 file (ic_push_notif.png) to the customResources and built it by instructions.
The ANE build completed successfully.
But after adding the ANE to my project the APK build fail on this error:
aapt tool failed:invalid resource directory name: C:\Users\shay\AppData\Local\Temp\e32ea5eb-fcbc-4350-9251-0c8e035ed787\customresources ic_push_notif.png
This is the ANE (added zip for the upload)
com.distriqt.CustomResources.ane.zip
What am I doing wrong?
Thanks
Shay
I'm receiving this message after distribution build for iPhone. When I attempt to install IPA file on iPhone through iTunes application (drag/drop to iTunes) it is installing up to 75% and then stops. Of course it is not working at all nor there is an icon, just default white with black circles. In debug mode all works just fine and icon is regular one. Can this warning cause installation problem?
Hi!
Are there any news from Harman about packaging custom resources for android target with AIR33+?
Do you have a dialog with Harman about this?
Thx!
i have event listener to catch exceptions
uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, onUncaughtError);
doest this extension just catching this airs exceptions or it catchs native iso android expcetions caused with this app, too ?
Hello I have a problem when compiling, when I go to "assemble", it gives me error that I can not find the property "assemble". I used windows, java version 1.8.0_131. thanks
`D:\d2\ANE-CustomResources-master\ANE-CustomResources-master>ant
Buildfile: D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\build.xml
clean:
clean_actionscript:
[delete] Deleting directory D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\platform\actionscript\bin
clean_default:
[delete] Deleting directory D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\platform\default\bin
clean_android:
[delete] Deleting directory D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\platform\android\app
build:
build_actionscript:
[echo] Building actionscript library...
[compc] Loading configuration: D:\AIRSDK_Compiler25\frameworks\air-config.xml
[compc]
[compc]
[compc] 2172 bytes written to D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\platform\actionscript\bin\distriqt.extension.resources.swc in 0,665 seconds
[compc]
[echo] done
build_default:
[echo] Building default library...
[compc] Loading configuration: D:\AIRSDK_Compiler25\frameworks\air-config.xml
[compc]
[compc]
[compc] 2015 bytes written to D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\platform\default\bin\distriqt.extension.resources.default.swc in 0,552 seconds
[compc]
[echo] done
create_android_project:
[mkdir] Created dir: D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\platform\android\app
[copy] Copying 4 files to D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\platform\android\app
[mkdir] Created dir: D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\platform\android\app\src\main\java\com\distriqt\extension\customresources
[copy] Copying 2 files to D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\platform\android\app\src\main\java\com\distriqt\extension\customresources
[mkdir] Created dir: D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\platform\android\app\src\main\res
[copy] Copying 5 files to D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\platform\android\app\src\main\res
[copy] Copying 1 file to D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\platform\android
[copy] Copying 1 file to D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\platform\android\app\libs
build_android:
[echo] Building Android library...
build_android_osx:
build_android_windows:
[exec] :wrapper
[exec]
[exec] BUILD SUCCESSFUL
[exec]
[exec] Total time: 1.763 secs
[exec]
[exec] FAILURE: Build failed with an exception.
[exec]
[exec]
[exec] BUILD FAILED* What went wrong:
[exec]
[exec]
[exec] Total time: 1.213 secs
[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:
[mkdir] Created dir: D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\build
package_android:
BUILD FAILED
D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\build.xml:223: The following error occurred while executing this line:
D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\build.xml:174: Warning: Could not find file D:\d2\ANE-CustomResources-master\ANE-CustomResources-master\platform\android\app\build\intermediates\bundles\release\classes.jar to copy.
Total time: 6 seconds`
Help, please.
http://prntscr.com/lcotu8
is there any way to add resources for IOS too ?
http://help.adobe.com/en_US/air/extensions/WSf268776665d7970d-2e74ffb4130044f3619-7ff8.html
I've used to compile the freshplanet Push ANE with my colourful icons.
I've copied icon files into res directory drawable-xhdpi with correct names.
The actual code, that's probably is very similar to how it's implemented in your ANEs is:
// Notification images
int smallIconId = Resources.getResourseIdByName(_context.getPackageName(), "drawable", "status_icon");
int largeIconId = Resources.getResourseIdByName(_context.getPackageName(), "drawable", "app_icon");
So my guess is as long as directory structure , naming and image size stays the same I can use my colourful icons.
Also, the generated directory has subdirs like "drawable-mdpi-v11" and "drawable-mdpi". Is duplicate "drawable-mdpi-v11" really required when compiling custom resources?
Hi @marchbold ,
I'm not sure this is the place, but i'll try anyway.
We're trying to add another DEX file to our build.
We need to do it as part integration facebook network to our IronSource integration:
If you'll see, on step 8, we need to download and add a DEX file to the build, but there's no valid explanation of how to do it.
I searched the web a lot and couldn't find it either.
I'm trying here, as part because i'm wondering if i should do it through this ANE
Thanks,
Shay
dx tool failed:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/distriqt/extension/custo
mresources/R$attr;
at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:12
2)
at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
at com.android.dx.command.dexer.Main.processClass(Main.java:737)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:678)
at com.android.dx.command.dexer.Main.access$300(Main.java:83)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:607)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpen
er.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.j
ava:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java
:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:637)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:511)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:281)
at com.android.dx.command.dexer.Main.run(Main.java:247)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
1 error; aborting
<extensionID>com.distriqt.Core</extensionID>
<extensionID>com.distriqt.AndroidSupport</extensionID>
<extensionID>com.distriqt.Volume</extensionID>
<extensionID>com.distriqt.Notifications</extensionID>
<extensionID>com.distriqt.Exceptions</extensionID>
<extensionID>com.distriqt.CustomResources</extensionID>
ane file generated with ANE-CustomResources and
rename zip to ane
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.