freshplanet / ANE-DeviceId

Provides access to the device unique id.
Apache License 2.0
51 stars 25 forks source link

ERROR: AirDeviceId could not be found. #25

Open JimLynchCodes opened 9 years ago

JimLynchCodes commented 9 years ago

Hello, I am getting this error when I try to use this ane. I am adding the ane to the project and also the src folder of the raw actionscript code (btw I am building a starling app in intellij IDEA).

I tried both of these: var airDeviceId:AirDeviceId = AirDeviceId.getInstance(); and var airDeviceId:AirDeviceId = new AirDeviceId();

Both give the "could not be found" error.

Without bashing you too much, I would just like to bring it to everyone's attention that the (lack of) documentation or mention of the api at all makes this ANE extremely laughable and juvenile. Sadly though you are blocking the space now for someone to make an ANE that is actually useful.

JimLynchCodes commented 9 years ago

what do you even put in the tag? My editor hints com.frashplanet.ane, but my compiler doens't recognize it... SMH

andreivreja commented 9 years ago

Hey there,

I just wasted like an hour trying to figure it out, I had no idea how to use it lol. I finally found out how so, happy to help you.

First of all, include the ANE in the library and in app's xml file.

Then import it into your AS3 code:

import com.freshplanet.ane.AirDeviceId;

Then use it like this:

function setDeviceId(deviceId:String):void {
id = deviceId;
}
AirDeviceId.getInstance().getIDFA(setDeviceId);

id is the variable you want(and must) store the IDFA in.

Hope this helps.

JimLynchCodes commented 9 years ago

Hi!

Thanks, but I'm still getting Error #1065: Variable com.freshplanet.ane::AirDeviceId is not defined.

How did you add the extension in the descriptor xml?

JimLynchCodes commented 9 years ago

Cool. I got it working with this:

com.freshplanet.ane.AirDeviceId

Thanks vrejaandrei and thanks FreshPlanet for your half-assed ane ;)

JimLynchCodes commented 9 years ago

Oh man. It is working in emulator, but when I try on device a huge ugly stack trace error:

aapt tool failed:C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values\strings.xml:19: error: Resource at app_version appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values\strings.xml:20: error: Resource at button_install appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values\strings.xml:21: error: Resource at button_exit appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values\strings.xml:22: error: Resource at title_adobe_air appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values\strings.xml:23: error: Resource at text_runtime_required appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values\strings.xml:24: error: Resource at text_install_runtime appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values\strings.xml:25: error: Resource at text_runtime_on_external_storage appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values\strings.xml:27: error: Resource at text_gamepreview_loading appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values\strings.xml:28: error: Resource at text_gamepreview_loading_error appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values\strings.xml:29: error: Resource at text_install_gamepreview_app appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values\strings.xml:30: error: Resource at text_air_missing_header appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values\strings.xml:31: error: Resource at text_air_missing_text appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values\strings.xml:32: error: Resource at button_install_air_from_playstore appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values\strings.xml:34: error: Resource at text_dont_show_again appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-cs\strings.xml:19: error: Resource at app_version appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-cs\strings.xml:20: error: Resource at button_install appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-cs\strings.xml:21: error: Resource at button_exit appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-cs\strings.xml:22: error: Resource at title_adobe_air appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entr y_res\values-cs\strings.xml:23: error: Resource at text_runtime_required appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-cs\strings.xml:24: error: Resource at text_install_runtime appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-cs\strings.xml:25: error: Resource at text_runtime_on_external_storage appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-cs\strings.xml:27: error: Resource at text_gamepreview_loading appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-cs\strings.xml:28: error: Resource at text_gamepreview_loading_error appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-cs\strings.xml:29: error: Resource at text_install_gamepreview_app appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-cs\strings.xml:30: error: Resource at text_air_missing_header appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-cs\strings.xml:31: error: Resource at text_air_missing_text appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-cs\strings.xml:32: error: Resource at button_install_air_from_playstore appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-cs\strings.xml:34: error: Resource at text_dont_show_again appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-de\strings.xml:19: error: Resource at app_version appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-de\strings.xml:20: error: Resource at button_install appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-de\strings.xml:21: error: Resource at button_exit appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-de\strings.xml:22: error: Resource at title_adobe_air appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-de\strings.xml:23: error: Resource at text_runtime_required appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-de\strings.xml:24: error: Resource at text_install_runtime appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-de\strings.xml:25: error: Resource at text_runtime_on_external_storage appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values-de\strings.xml:27: error: Resource at text_gamepreview_loading appears in overlay but not in the base package; use to add. C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\

It seems that people are having problems with a lot of ane's from FreshPlanet, and no one from the copmany ever answers. :/

andreivreja commented 9 years ago

Hey there,

Sorry but I don't know about this problem. Maybe it's because intellij(I didn't even know it works with Adobe).

Those ANEs, from what I know, are made to work with Adobe Flash/Flex and Adobe Air Runtime for iOS/Android.

JimLynchCodes commented 9 years ago

Yes, of course. I am using Intellij to make a starling actionscript 3 app running on Adobe AIR. I am using Flex SDK AIR 4.14.1

Should this normally work?

You said you were able to get it working. Is it working when you test on a device as well?

andreivreja commented 9 years ago

Yes it is working for me on the device. Couldn't even test on simulator because I have ANEs that does not run on Adobe simulator. It complies for me and it also returns the right idfa for my iPhone.

I don't know what exactly IntelliJ is, only heard of it. I'm using Adobe Flash CC and the ANE works without problems.

On Thu, Sep 10, 2015 at 5:30 AM, JimTheMan notifications@github.com wrote:

Yes, of course. I am using Intellij to make a starling actionscript 3 app running on Adobe AIR. I am using Flex SDK AIR 4.14.1 Should this normally work?

You said you were able to get it working. Is it working when you test on a device as well?

Reply to this email directly or view it on GitHub: https://github.com/freshplanet/ANE-DeviceId/issues/25#issuecomment-139098373

JimLynchCodes commented 9 years ago

Intellij is another IDE, similar to flash builder (although it can do a lot of other things besides as3). What SDK are you using when you compile?

RaidPRDev commented 8 years ago

That error is because you are compiling for Android. For iOS, this ANE works fine. But ANdroid another story. Has anyone figured out if its even compatible with Android? In know it states on their github page its for Android, but still it wont build. ;-(

RaidPRDev commented 8 years ago

The error is the regarding this: JimTheMan commented on Sep 9, 2015

aapt tool failed:C:\Users\Jim\AppData\Local\Temp\c533a262-e2f6-4484-ba7e-69d2ab7e9110\app_entry_res\values\strings.xml:19: error: Resource at app_version appears in overlay but not in the base package; use to add.

....

gilamran commented 7 years ago

You are missing the Android support library.

Take it from: https://github.com/myflashlab/common-dependencies-ANE/tree/master/androidSupport

And add this to your xml:

com.myflashlab.air.extensions.dependency.androidSupport