distriqt / ANE-CustomResources

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

Path not solving on Windows #18

Closed sfxworks closed 11 months ago

sfxworks commented 7 years ago

I tried absolute paths starting with c:// image

and relative paths from the directory it was trying to execute from image

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.

sfxworks commented 7 years ago

The license agreement couldn't be solved by opening up Android Studio. I solved it through here. https://stackoverflow.com/a/41078173/5488621

After that and using my workaround, I was able to build an ane.

marchbold commented 7 years ago

Just a note on your paths, they should be backslashes on Windows not forward slashes ie. C:\\ rather than the C:// you have above.

marchbold commented 7 years ago

Did you get it working after accepting the license though?

sfxworks commented 7 years ago

Yes, I was able to compile it after I got it licensed. Though I am unable to get it to work. I'm not sure where this issue should be referenced but I responded to the Firebase thread.

marchbold commented 7 years ago

Here is the appropriate place, Can you explain more what's not working?

sfxworks commented 7 years ago

When I compile the ANE and include it in my project I get this error in a dialog (that I converted to text via screenshot>ocr)

Adobe Animate 
Error creating files. 
Unknown error. unexpected failure duplicate entry: air/quantumtechnologies/myappname/R.class java.util.zip.ZipException: duplicate entry: air/quantumtechnologies/myappname/R.class at java.util.zip.ZipOutputStream.putNectEntry(ZipOutputStreamjava:232) at java.utiljarJarOutputStream.putNectEntry(larOutputStreamjava:109) at com.adobe.air.apk.ResourceBytecodeGenerator.generateFromRFile(Res ourceBytecodeGeneratorjava:85) at com.adobe.air.apk.APKOutputStream.generateByteCodeFromRFile(APK OutputStreamjava:1054) at com.adobe.air.apk.APKOutputStream.generateResourcesAndManifest( APKOutputStreamjava:1011) at com.adobe.air.apk.APKOutputStream.addApplicationDescriptor(APKOu tputStreamjava:321) at com.adobe.air.ApplicationPackager.addSpecialFiles(ApplicationPackag erjava:352) at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackage rjava:76) 
at com.adobe.air.ADT.parseArgsAndGo(ADTjava:656) at com.adobe.air.ADT.run(ADTjava:450) at com.adobe.air.ADT.main(ADTjava:500) 
OK 

This does not occur with the ane you provided me. I used the SDK found on adobe's site. I did not use the "original" sdk. I used the command line option for windows.

marchbold commented 7 years ago

Do you have the latest version of Android studio and the android sdk installed? Could you check your version of java as well?

ventr1x commented 6 years ago

The (original) problem is that the build script is appending the "android.sdk" path to the working directory because it is killing the \\ and doesn't understand the absolute path, as you can see in the screenshot. So this issue got pretty far off topic without a solution.

What worked for me:

AIR SDK

air.sdk = C:\\AIRSDK\\26

ANDROID

android.sdk = E:/Program Files/Android/sdk

As you can see, the \\ in android.sdk are not working. A normal / does. No need to copy over multiple gb of sdk just to build a little plugin.

jonathanhollander commented 6 years ago

I just ran into this same problem.... trying to compile on windows... for ONLY the android.sdk the \ didn't seem to work, I would see an error of: "C:UsersRyanAppDataLocalAndroidsdk" does not exist. I changed it to be a single \, but that didnt' work either. I then tried using forwardslash /, and that worked.

Lydecker commented 6 years ago

Just to confirm - same issue here on Windows.

AIR SDK = fine as documented Android SDK needs to be C:/X/X/X/X/Sdk