distriqt / ANE-CustomResources

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

not able to Build Custom Resource #3

Closed KreedaSolutions closed 7 years ago

KreedaSolutions commented 7 years ago

Hi,

We tried to follow instructions and tried to make the Custom Resource ANE.. But, while building we are facing following error.

http://imgur.com/a/NiHEL

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

marchbold commented 7 years ago

Can you post your config file? I'd say there's an error with one of the variables you've defined.

KreedaSolutions commented 7 years ago
## ANE build config

# AIR SDK
air.sdk = C:\\Users\\Aseem\\Documents\\Softwares\\adobeair

# ANDROID
android.sdk = C:\\android-sdk-windows

# 
android.package = com.distriqt.extension.customresources
android.resources = res

## 
project.name = CustomResources

output.name = com.distriqt.${project.name}.ane
output.dir = ./build
output.docs = ./build/docs

actionscript.dir = ./platform/actionscript
default.dir = ./platform/default
android.dir = ./platform/android

android.resources = res
marchbold commented 7 years ago

Hmm,

Not really sure, that looks okay. Are there any other error messages output?

KreedaSolutions commented 7 years ago

Nopes. Just this..

marchbold commented 7 years ago

Could you try making sure you have a recent version of Java installed.

Also what version of Windows are you running this on?

KreedaSolutions commented 7 years ago

Windows 10.. Java version 7.

KreedaSolutions commented 7 years ago

Hi Just Updated to - jre1.8.0_112.. (dowloaded from http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html)

And i got following error .. http://imgur.com/a/eavto

marchbold commented 7 years ago

I'm not 100% on configuring Java on windows sorry, looks like something is missing from the install though?

KreedaSolutions commented 7 years ago

We are in testing phase now and I want to test with this Custom ANE once.. For now If I mail you a dummy Image.. will you be able to send me this ANE. We will solve this problem eventually, But for now I need to test once.

Thanks, Aseem

marchbold commented 7 years ago

Hi, I've sent you the test ANE, let me know if you have any issues.

KreedaSolutions commented 7 years ago

Hi, We trying to make Custom Reseource ANE again, This time we has passed last Error. Basically it was error on JAVA_HOME variable..

But now we are faving new error.. Attaching Screen Shots..

http://i63.tinypic.com/6pommf.jpg

KreedaSolutions commented 7 years ago

Fixed - FlexTasks.task error.. typo from Our end..

About - anttask.properties.. for this ANE Build process needs to be updated.. as AndroidStudio 2.3 dosent has ant-task.jar file anymore on {sdk}/tools/lib ...

Thanks, Aseem

marchbold commented 7 years ago

Hi, Thanks for letting us know, we are aware of the removal and have been working on a new script.

marchbold commented 7 years ago

Could you try the update and see how you go?

KreedaSolutions commented 7 years ago

Will test and update..

Thanks, Aseem

KreedaSolutions commented 7 years ago

Hi, trying to make ANE again and we are facing this issue.

http://imgur.com/a/5glkk

I can see Others have also got this error on Windows machine. Has anyone found any way to fix this??

KreedaSolutions commented 7 years ago

my Build Config -


## ANE build config

# AIR SDK
air.sdk = C:\\Users\\Aseem\\Documents\\Softwares\\Adobe AIR\\25.0.0.134

# ANDROID
android.sdk = C:\\Users\\Aseem\\AppData\\Local\\Android\\sdk

# CHANGE THIS PACKAGE NAME IF YOU ARE USING FIREBASE
android.package = air.kreedasolutions.pattebaaz.dev

## 
project.name = CustomResources
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
marchbold commented 7 years ago

For some reason the escaping doesn't seem to be working. Have you tried with inverted commas around the paths?

KreedaSolutions commented 7 years ago

You mean for air.sdk and android.sdk?

KreedaSolutions commented 7 years ago

Having single or double inverted comma for air.sdk fails for Flex.task not found.

Tried single inverted comma just around android.sdk - but got the same error as before.

http://imgur.com/a/vHDa8

marchbold commented 7 years ago

Sorry I don't currently have a windows development environment setup so I can't test this.

Can you post the contents of platform/android/local.properties after you run the script?

KreedaSolutions commented 7 years ago

sdk.dir=C:\Users\Aseem\AppData\Local\Android

marchbold commented 7 years ago

Interesting, could you try double escaping the android.dir in your config:

android.sdk = C:\\\\Users\\\\Aseem\\\\AppData\\\\Local\\\\Android\\\\sdk
KreedaSolutions commented 7 years ago

Was able to make the ANE, but somehow that ANE is not compiling...

image

marchbold commented 7 years ago

Whats in your res directory when you build the ANE?

KreedaSolutions commented 7 years ago

image

marchbold commented 7 years ago

Hi, That structure is incorrect, you need to place values.xml in the values directory i.e. res/values/values.xml. There should only be directories in the res folder.

KreedaSolutions commented 7 years ago

oh.. Thanks. Dunno how I missed it.

getting a new error now, looks like duplication of something-

image

marchbold commented 7 years ago

Did you change the android.package name? Try leaving it as the default:

android.package = com.distriqt.extension.customresources
KreedaSolutions commented 7 years ago

Awesome, it worked. Thanks a lot for your patience :)

I have one more Question, If we want to have Firebase Setup and Android Icons, both in our project, shall we make 2 different Custom Resource ANE or one ANE will do.

Thanks, Aseem

marchbold commented 7 years ago

We suggest you combine them into one ANE. That's what we do in our projects and it works without issues.

KreedaSolutions commented 7 years ago

Will do that .. Thanks.. :)