Oldes / ANEAndroidCommon

Common native android functions in Adobe AIR extension
3 stars 1 forks source link

Error when try to compile an app for android in Adobe Animate #1

Open trinoo1979 opened 6 years ago

trinoo1979 commented 6 years ago

Amanita/Oldes, please help. When I try to compile my app for android in Adobe Animate with this ANE, it always ends up with message: "aapt tool failed: invalid resource directory name: C:\Users\myname\AppData\Local\Temp\xxxxxxxx\icon-res README.txt" where xxxxxx is different per each compile attempt, but it is never created, so im not able to find out what is going on or what is wrong. Been using succesfully your really great PermisionAndroid ANE in my project so far, so I thought I simply add this ANE to the same project the same way, but no luck till now. Please are you able to tell me, what am I missing here? Should this ANE be used differently? Does it need any special dependencies? I can provide my app descriptor file if needed (its a few lines of code...). The test app descriptor in "04-TestAndroidCommon" directory looks the same like the one packed in the same directory with PermissionAndroid ANE, but this time it simply does not work for me... :-( David P.S.: Miluju Vaše hry!

P.S.2: OK, after further inspection I probably know, what the problem is, but have no idea, how to solve it. I have never been worked with Eclipse (to generate my own version of your ANE) and I even dont know, which Eclipse SDK package download or how to install it. Do you plase have this ANE compiled clean without the Chuchel and Botanicula stuff (strings and icons) and also without placeholder for new adaptive icon assets directory (so compiled the same as AndroidPerissionsANE)? Or is there any simple workaround how to get over it? thanks

PS3: Installed Eclipse 4.6 with google plugin and been trying to recompile your ANE on my own last 24 hours, but compiling always fails with bunch of error on the way. Can you please recompile this ANE without all aditional stuff (with adaptive icons parts in "go.bat" commented)? Or provide (or point me to) any simple steps tutorial, how to compile an ANE(win7 64)?

trinoo1979 commented 6 years ago

Mistře Oldesi, velmi prosím o překompilování ANE se zakomentovanými řádky 21 a 22 v "go.bat" v adresari "03-ANEAndroidCommon-ane". ANE z branche "Chuchel" funguje dobře, jenže je v ní 1.7 MB nepotřebných dat (ikon)...prosím, prosím. D.

Oldes commented 6 years ago

Yes.. I can.. I will.. just give me some time.

On Mon, Oct 1, 2018, 19:53 trinoo1979 notifications@github.com wrote:

OK, after further inspection I probably know, what the problem is, but have no idea, how to solve it. I have never been worked with Eclipse (to generate my own version of your ANE) and I even dont know, which Eclipse SDK package download or how to install it. Do you plase have this ANE compiled clean without the Chuchel and Botanicula stuff (strings and icons) and also without placeholder for new adaptive icon assets directory? Or is there any simple workaround how to get over it? thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Oldes/ANEAndroidCommon/issues/1#issuecomment-426001418, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbwlZMOUrxCDIY5Gehx9lVJrMiwZzbkks5uglaegaJpZM4XCIBo .

Oldes commented 6 years ago

@trinoo1979 ANE is now precompiled without any adaptive icon. https://github.com/Oldes/ANEAndroidCommon/commit/ebe2383b92ea373f42f2294b768e6a65bfd3813c

Oldes commented 6 years ago

Btw.. I'm using Neon.3 Release (4.6.3). Don't remember if something else was needed. I somehow find it easier than using Android Studio. What kind of errors?

Oldes commented 6 years ago

Also you should know, that you will need the adaptive icon to be able submit the app to Google Play. But maybe there will be some easier way directly in AIR SDK.

trinoo1979 commented 6 years ago

firstly - big thanks for your time, your newly compiled ANE works like a charm for me now! I did not know I will need adaptive icons for Google Play - this is my first android app and Im in the middle of developing process right now...OK, so it will be better for me to get ANE compiling to work on my side somehow, so please, kindly ask, read the lines bellow, if you find some time..

Eclipse (Neon.3 v4.6.3) installed here too along with the JDK v1.8.0_181. I forget to include path to JDK in system variables before, so my previous attempts to build an ANE always failed. Now it builds an ANE and there are much less errors, but some still remains and also my ANE is a half (35 kB) the size of yours (64 kB). When I include my half sized ANE in my project, Animate CC compile an APK without any errors, but after installing on testing android device, my APK simply stuck at starting screen and does not work, so I must be missing something. I compiling my ANE in Eclipse using Run -> External Tools -> External Tools Configuration and then set up "New Configuration" dialog, and here I set "Location" to your goall.bat file and Working Directory to dir with all your files. I also changed the path to my AIR SDK in your Setup.bat. Thats all. When you take a look at console log, there is first line in Step 2: "ANEAndroidCommon-eclipse\bin\classes* : no such file or directory" --> but all that files are in their positions....(I downloaded your repository only, changed the path to AIR SDK in setup.bat and run it in Eclipse, nothing else changed...) One thing, my Eclipse asks me to set path to Android SDK on every start, which I didnt download yet, so maybe thats the problem...log from my Eclipse console is attached. Can you please review it? Sorry for troubles... log.txt

P.S. I also tried to run testing "TestAndroidCommon.apk" created during my ANE compiling, but it ony shows white screen with ANE supported, but if im not wrong, it should also show up dialog upon Back key pressing, but this does not work...

trinoo1979 commented 6 years ago

Eh, now I see, there is no such "bin" subdirectory with classes in your "ANEAndroidCommon-eclipse" directory in your repository (as it should be according to your "go.bat" file in "02-ANEAndroidCommon" directory? please, can you take a look or check your repository if anything is missing? (maybe I understood it wrong...)

Oldes commented 6 years ago

The bin directory is created by Eclipse as it builds files automatically... when are without errors;-) I believe, that your problem is, that you don't have Android SDK.... you really need it to do anything. It should be also the API version which you set as a target.

image

You could be able to download it from this menu: image

Oldes commented 6 years ago

To be precise, you have an Android ANE without any Android code, so it is logical, that it does not work ;-) You must first have opened Eclipse project without any errors in it... to be able successfully finish step 2, which produces JAR file, which is used in step 3.

Oldes commented 6 years ago

As this is really simple ANE, you should be able to have it fixed just by installing the SDK with correct API.

trinoo1979 commented 6 years ago

Oldes, big thanks again for your help, i've got it! Your 2 screens above helped a lot :-). It was not that easy as I was not able to download and manage Android SDK directly from Eclipse, I had to find, download and install SDK Manager separately instead (from https://dl.google.com/android/installer_r24.4.1-windows.exe in case anybody else will read it). Although my ANE is not exactly the same size as yours (some 40 bytes off - maybe differencies in path names, etc...?), it works! Please, two questions: