distriqt / ANE-CustomResources

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

BUILD FAILED #13

Closed emreayaydin closed 7 years ago

emreayaydin commented 7 years ago

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...

marchbold commented 7 years ago

Have you correctly pointed the build config to your AIR SDK? That compc task should be defined in the flexTasks.jar from the AIR SDK.

marchbold commented 7 years ago

Also, please check you are using the latest version of the script, those errors seem to be from an older version.

emreayaydin commented 7 years ago

Hello thank you for your fast reply! I guess You are right. I tried again from the beginning but this time on mac and OSX

I got this error this time,

Buildfile: /Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/build.xml
clean:
clean_actionscript:
   [delete] Deleting directory /Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/platform/actionscript/bin
clean_default:
   [delete] Deleting directory /Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/platform/default/bin
clean_android:
   [delete] Deleting directory /Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/platform/android/app
build:
build_actionscript:
     [echo] Building actionscript library...
    [compc] Loading configuration: /Users/user/Desktop/airSDK/frameworks/air-config.xml
    [compc] 2172 bytes written to /Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/platform/actionscript/bin/distriqt.extension.resources.swc in 1.598 seconds
     [echo] done
build_default:
     [echo] Building default library...
    [compc] Loading configuration: /Users/user/Desktop/airSDK/frameworks/air-config.xml
    [compc] 2015 bytes written to /Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/platform/default/bin/distriqt.extension.resources.default.swc in 1.036 seconds
     [echo] done
create_android_project:
    [mkdir] Created dir: /Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/platform/android/app
     [copy] Copying 4 files to /Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/platform/android/app
    [mkdir] Created dir: /Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/platform/android/app/src/main/java/com/distriqt/extension/customresources
     [copy] Copying 2 files to /Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/platform/android/app/src/main/java/com/distriqt/extension/customresources
    [mkdir] Created dir: /Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/platform/android/app/src/main/res
     [copy] Copying 1 file to /Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/platform/android
     [copy] Copying 1 file to /Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/platform/android/app/libs
build_android:
     [echo] Building Android library...
build_android_osx:
     [exec] Support for running Gradle using Java 6 has been deprecated and will be removed in Gradle 3.0
     [exec] FAILURE: Build failed with an exception.
     [exec] * Where:
     [exec] Build file '/Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp
     [exec] BUILD FAILED
     [exec] Total time: 3.593 secs
     [exec] /customResource/platform/android/app/build.gradle' line: 1
     [exec] * What went wrong:
     [exec] A problem occurred evaluating project ':app'.
     [exec] > java.lang.UnsupportedClassVersionError: com/android/build/gradle/LibraryPlugin : Unsupported major.minor version 52.0
     [exec] * Try:
     [exec] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
     [exec] Result: 1
     [exec] Support for running Gradle using Java 6 has been deprecated and will be removed in Gradle 3.0
     [exec] FAILURE: Build failed with an exception.
     [exec] * Where:
     [exec] Build file '/Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp
     [exec] BUILD FAILED
     [exec] Total time: 3.483 secs
     [exec] /customResource/platform/android/app/build.gradle' line: 1
     [exec] * What went wrong:
     [exec] A problem occurred evaluating project ':app'.
     [exec] > java.lang.UnsupportedClassVersionError: com/android/build/gradle/LibraryPlugin : Unsupported major.minor version 52.0
     [exec] * Try:
     [exec] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
     [exec] Result: 1
build_android_windows:
package:
package_android:

BUILD FAILED
/Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/build.xml:223: The following error occurred while executing this line:
/Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/build.xml:174: Warning: Could not find file /Users/user/Documents/projects/Adobe Flash Builder 4.6/ansmanApp/customResource/platform/android/app/build/intermediates/bundles/release/classes.jar to copy.

Total time: 13 seconds
marchbold commented 7 years ago

Looks like you have an old version of Java, can you update?

emreayaydin commented 7 years ago

It looks like updated :/ Do you have any idea? or is there any option for FCM pushnotification on android without create config.ane ? I have to set FCM and publish the app to store in 2 days :(

screen shot 2017-04-13 at 10 11 48

marchbold commented 7 years ago

This script is still a work in progress obviously.

Send me your values and I'll create a resources ANE for you. Just need your package name and the resources you've created.

Send them to airnativeextensions@distriqt.com

marchbold commented 7 years ago

BTW what does java -version output in a terminal?

emreayaydin commented 7 years ago

It was my fault again :)) I was trying on flash builder's ant panel. But now I installed the apache ant and tried again I'm success after that.

Thank you so much for your support and your suggestion. I'm really sorry for spending your time. You are the best!!!

Best regards.