Cleaning up ANE Android leftovers?

After seeing the duplication of resources in assets/META-INF folders, I investigated this further to find that there's a huge amount of unneeded leftover files left here that can *and should* be deleted for a release build.
For us, this is 11.5MB of a 42.5MB apk, down to 31MB after this clearout.
Basically, after deleting all files that match the regex,
assets/META-INF/AIR/extensions/[^/]+/META-INF/ANE/Android-ARM/(?!library.swf)
Leaves the apk in a perfect state, but a much more manageable / palatable size.  This cleanout can be achieved after the building of the apk with aapt, from android-apktool -  A tool for reverse engineering Android apk files - Google Project Hosting, with commands like,
aapt remove mygame.apk assets/META-INF/AIR/extensions/com.google.api.game/META-INF/ANE/Android-ARM/android-suppo rt-v4.jar
aapt remove mygame.apk assets/META-INF/AIR/extensions/com.google.api.game/META-INF/ANE/Android-ARM/appcompat_v7- res/abc_ic_voice_search_api_holo_light.png
This should *absolutely* be done automatically by the build process, because as I said this contributed to our app growing by a third of it's proper size.

Seriously Adobe, how can you not at least give this a reply?  Leaving 10MB of unnecessary files on a mobile app is nearly an abominable crime and has to be fixed, and as I've explained (and am operating with now), it's easy-ish for me to fix post-packaging.  For you guys to fix it pre that should be an absolute synch.  Please do something about it.

Similar Messages

  • App clean master on android

    hi
    is there an alternative to the app clean master on android?

    Sorry but your question is not an Apple Networking issue. You may have better luck getting a solution if you repost to the iPhone area of the Apple Support Communities.

  • Is there an alternative to the app clean master on android?

    is there an alternative to the app clean master on android?

    Probably not.  Unlike Android party Apps cannot access or modify the iOS core system to clean or purge or do anything to it.
    Not that you would need it anyway on an iPhone.
    For future reference, there are specific forums here for each device. If your question was relating to an iPhone you could have posted in the Using iPhone forum.
    This one is for general questions on how to use this Forum site.

  • Adobe AIR ANE Android NoClasseDefFoundError

    I am developing an ane for using and enjoying the service games google play.
    I made a test app natively and runs perfectly.
    I generated one ane and made a falsh builder for test. By utilizing it happens the following error:
    07-22 15:55:35.555: E/AndroidRuntime(9983): FATAL EXCEPTION: main
    07-22 15:55:35.555: E/AndroidRuntime(9983): java.lang.NoClassDefFoundError: com.google.example.games.basegameutils.GameHelper
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at com.google.example.games.basegameutils.BaseGameActivity.getGameHelper(BaseGameActivity.ja va:93)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at com.google.example.games.basegameutils.BaseGameActivity.onCreate(BaseGameActivity.java:10 3)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at com.google.example.games.tanc.MainActivity.onCreate(MainActivity.java:70)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.app.Activity.performCreate(Activity.java:5248)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.app.ActivityThread.access$800(ActivityThread.java:139)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.os.Handler.dispatchMessage(Handler.java:102)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.os.Looper.loop(Looper.java:136)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at android.app.ActivityThread.main(ActivityThread.java:5086)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at java.lang.reflect.Method.invokeNative(Native Method)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at java.lang.reflect.Method.invoke(Method.java:515)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
    07-22 15:55:35.555: E/AndroidRuntime(9983):     at dalvik.system.NativeStart.main(Native Method)
    I looked in the package and the class it appears. I found the following solution, but does not work.
    NoClassDefFoundError for code in an Java library on Android - Stack Overflow
    Go to "Properties" of the project.
    Select "Java Build Path"
    Select "Order and Export" Tab
    You should see the selected project's "src" and "gen" paths and dependencies here.
    The order how they listed were first "src" and then "gen" path
    I switch them, so that "gen" folder is build before the "src"
    Thank you

    Hello, Alex
    I'm just creating an ANE to use the new service from Google Play Service
    My real problem is this:
    I caught the ANE https://github.com/freshplanet/ANE-Google-Play-Game-Services. using google play service in froyo version. And use another ANE AdMob using the latest version of google play service.
    By using and enjoying the two together in my project I have problem as there are conflicting library because I have two different versions of google play service, got the idea to update the ANE https://github.com/freshplanet/ANE-Google-Play- Game-Services. And put the dependencies google service only play one of them.
    ANE that started my whole problem was updating.
    I had this same error in native application (Android) and was simple to solve. I changed the "build path -> Order and Export" order of packets by placing the "gen" in primero and the "src" soon followed. But this change does not fit when I expoprto the jar to generate ANE.
    I ended up finding another that NEDs use google play latest service
    https://github.com/alextel69/google-play-game-services-ane.
    I saw in the documentation that it is using AIR SDK 4.0 and I'm using the AIR 3.6 SDK. I'll update my version and find out if that resolves the problem.
    Which version of AIR SDK are you using?
    Once I have news we report here
    Thanks for your help.
    Have a great day

  • Gyroscope ANE Android

    Hi all, i've integrated the Sample gyroscope ANE from here http://www.adobe.com/devnet/air/native-extensions-for-air/extensions/gyroscope.html inside my app. Basically, this will be a retro race game ( similar to OutRun ) , with the possibilyt to drive left -> right via the gyroscope. It will run ONLY on galaxy TAb 10.1 GT-P7500.
    I have some problem :
    VALUES :
    this is my min Value : -5.326322e-7 for each Axis ( the MAX Value SEEMS to be 5.326322e-7) .
    How to convert  it to a real number ( i need to limit it from 0 to 1 left to right) ? Number.toFixed()  ?
    Is there a way to normalize them in the Java part of the ANE ?
    AXIS :
    when i roatate the device from landscape to portrait, on which axis am i rotating ? When i try to trace it, ALL the axis change value ( and sometime they just get the MIN value of -5.326322e-7, even if the are all rotated ) .
    Thanks in advance!

    isit usefull to do it in the ANE Java ?
    No. Just use Actionscript.
    When im faking a steer with the device (screen i front of me, landscape) on which axis im rotating ?
    use the example on the site you linked to:
    var gyro:Gyroscope; if(Gyroscope.isSupported) { gyro = new Gyroscope(); gyro.setRequestedUpdateInterval(1000); gyro.addEventListener(GyroscopeEvent.UPDATE,onChange); }  
    function onChange(e:GyroscopeEvent):void { trace("From gyro: " + e.x + " " + e.y + " " + " " + e.z); }
    Since I don`t know details how you control your steering its pointless to guess, you must at least show how you plan to steer, control your car.
    And, regardig the snippet, why  2500000 and 2663161 ? ar them -5.326322e-7 converted ?
    The basic idea is to convert a solution room from (roughly -0,53 to roughly 0,53) to 0->1 (-5.326322e-7 is no space magic but simply an exponential way to write down -0.532....)
    This is a linear equation with 2 unknowns which gives when solved the funtion:
    f(x) = 2500000/2663161·x + 1/2
    http://en.wikipedia.org/wiki/Linear_function
    when i roatate the device from landscape to portrait, on which axis am i rotating ? When i try to trace it, ALL the axis change value ( and sometime they just get the MIN value of -5.326322e-7, even if the are all rotated ) .
    use a variable that holds the orintation, and switch the formulas (of which I gave you one) depending on that

  • ANE Android override Activity onNewIntent()

    Hi,
    I'm trying to create an NFC extension to be informed when a Tag is detected by the NFC sensor.
    I guess i have more or less everything i need, expect that onNewIntent override.
    In the JAVA samples i saw, as soon as we call enableForegroundDispatch on the NfcAdapter, the onNewIntent() method of the activity specified on the enableForegroundDispatch is called.
    We have access to the Activity via the FREContext.getActivity() so i can specify the activity that will get the onNewIntent called, but as i can't really extend the FREContext class, i can't override this method to catch the intent.
    Is there any way to achieve this?
    Have a nice day !

    I found this solution that almost satisfies me :
    http://forums.adobe.com/message/4491738?tstart=0#4491738
    It's basically based on the fact that passing a tag in front on the NFC chips fires an InvokeEvent to the AIR's NativeApplication.
    I'm just searching why i get only one of two tag IDs.
    Even if i manually grab the last intent tag ID with the ANE i don't have the new tag but the previous one, until i pass the new tag a second time.
    With a pure Java project overriding the onNewIntent as i wanted to do i have no problem. The onNewIntent() is called everytime a new tag is detected.
    And for now, i have no idea what could be the source of my problem but i still search.
    If anyone has an idea, i'll be glad to read it

  • Avast deny adobe air with ane @android platform

    report as android:OpFake-FE[Trj]

    Hello,
    It seems all Adobe Air applications are facing this issue.
    see : http://forum.avast.com/index.php?board=37.0

  • ANE ANdroid error

    I open an Activity with call FREFunction and after some time I get an error <InputDispatcher(1606): channel '419806a8 air.ru.nekit.JAIR.debug/air.ru.nekit.JAIR.debug.AppEntry (server)' ~ Channel is unrecoverably broken and will be disposed!> or <AndroidRuntime: java.lang.UnsatisfiedLinkError: dispatchStatusEventAsync>
    Any commets please)

    Hey @mamoun2015 ,
    Welcome to the HP Forums!
    I understand your tablet is experiencing issues after updating to KitKat.
    If you have already attempted the factory reset there is little I can offer you.
    It would be best for you to get in touch with our phone support team. Please call our technical support at 800-474-6836. If you live outside the US/Canada Region, please click the following link to get the support number for your region: Phone Assist Worldwide.
    Thanks!
    Please click the "Kudos, Thumbs Up" at the bottom of this post if you want to say "Thanks" for helping!
    Please click "Accept as Solution" if you feel my post solved your issue, it will help others find the solution.
    The Great Deku Tree
    I work on behalf of HP.

  • Android res/layout Folder not included in the APK file (but included in the ANE)

    I'm having a problem with resources on an Adobe ANE Android extension:  android.content.res.Resources@NotFoundException:  id.viewView
    I have a xml layout file, which is included in the ANE file (checking by unzipping the ANE file and looking into META-INF/ANE/Android-ARM)
    In the APK file (generated with Flash Builder 4.6), the layout folder (inside res) at the top level is missing, but its included deep in the assets folder:
        - META-INF   
        - res
            drawable
            drawable-hdpi
            drawable-ldpi
            drawable-mdpi
            raw
        - assets
            META-INF
                AIR
                    extensions
                        org.dornad.ane.MyTestExtension
                            META-INF
                                ANE
                                    Android-ARM
                                            drawable-hdpi
                                            drawable-mdpi
                                            drawable-xhdpi
                                            layout
                                            values
    Any ideas?

    Can you manually select it for inclusion by modifying Packaging Settings - Package Contents in "Export Release Build" settings?

  • Creating ANE - Problem with creating the android package

    I get the following error when trying to start an App with a ANE creatd by myself based on http://www.adobe.com/devnet/air/articles/ane-android-devices.html:
    dx tool failed:
    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.lang.IllegalArgumentException: already added: Lcom/adobe/fre/FREASErrorException;
        at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
        at com.android.dx.dex.file.DexFile.add(DexFile.java:143)
        at com.android.dx.command.dexer.Main.processClass(Main.java:301)
        at com.android.dx.command.dexer.Main.processFileBytes(Main.java:278)
        at com.android.dx.command.dexer.Main.access$100(Main.java:56)
        at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:229)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
        at com.android.dx.command.dexer.Main.processOne(Main.java:247)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:183)
        at com.android.dx.command.dexer.Main.run(Main.java:139)
        at com.android.dx.command.dexer.Main.main(Main.java:120)
        at com.android.dx.command.Main.main(Main.java:89)
    1 error; aborting
    Can anyone help me with this?

    I met the same problem as yours.
    Besure your jar NOT include FlashRuntimeExtensions.jar.
    I use IntelliJ IDEA + artifacts to generate the library jar. Everything goes fine after removed the FlashRuntimeExtensions.jar from artifacts

  • Android res folder not included in the ane extension

    Hi.
    I am trying to develop an android extension fro air, but I have a problem with resources.
    According to this : http://help.adobe.com/en_US/air/extensions/WSf268776665d7970d-2e74ffb4130044f3619-7ff8.ht ml
    The res folder should be included inside the created extension. But it actually isn’t.
    for this test I simply use the basic Hello world Vibrate test, but I added a new png in the drawable folder.
    As you can see while unziping the .ane file, then going to META-INF/ANE/Android-ARM
    the res file is absent.
    As a result, the program crashes when I try to access my ressource FREContext.getResourceId("drawable.ppy_accessory_manage.png")
    Has anyone managed to make resources work with ANE in android?
    PS, here is my batch to compile the ANE :
    set adt_directory=C:\Program Files\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0\bin
    set root_directory=C:\Users\hugo\Adobe Flash Builder 4.6
    set library_directory=%root_directory%\HelloANELibrary
    set native_directory=%root_directory%\HelloANENative
    set signing_options= -storetype pkcs12 -keystore "C:\Users\hugo\Adobe Flash Builder 4.6\certificat.p12"
    set dest_ANE=HelloANE.ane
    set extension_XML=%library_directory%\src\extension.xml
    set library_SWC=%library_directory%\bin\HelloANELibrary.swc
    "%adt_directory%"/adt -package %signing_options% -target ane "%dest_ANE%" "%extension_XML%" -swc "%library_SWC%" -platform Android-ARM -C "%native_directory%" library.swf HelloANENative.jar

    Answer given on stack overflow :
    http://stackoverflow.com/questions/8060041/adobe-air-3-native-extensions-android-res-folde r-not-included-in-the-ane-file

  • Developing and using Adobe AIR native extensions for Android devices

    I was using this tutorial:
    "Developing and using Adobe AIR native extensions for Android devices"
    http://www.adobe.com/devnet/air/articles/ane-android-devices.html
    When packing the Flex mobile ANESampleTest to deploy on an Android device, the below error happens
    Error occurred while packaging the application:
    aapt tool failed:invalid resource directory name: /private/var/folders/k8/1thhvkf92h947n_g22hg_v9m0000gn/T/52ba05aa-9001-4d46-9438-db81ef83 06f0/res/drawable-xxhdpi
    invalid resource directory name: /private/var/folders/k8/1thhvkf92h947n_g22hg_v9m0000gn/T/52ba05aa-9001-4d46-9438-db81ef83 06f0/res/values-sw600dp
    invalid resource directory name: /private/var/folders/k8/1thhvkf92h947n_g22hg_v9m0000gn/T/52ba05aa-9001-4d46-9438-db81ef83 06f0/res/values-sw720dp-lan
    Does anyone know what the issue might be?

    Did you find a workaround for the Error? I'm getting the same and I can't seem to find any solution.

  • Suggestions for current ANE development instructions

    Any recommended links for instructions on building ANEs ( android in particular )?
    I am looking for current tutorials if available.
    I was last looking at this this one by Mark Hood: http://www.adobe.com/devnet/air/articles/ane-android-devices.html but the available download was missing the critical AS file.
    I have looked at http://www.adobe.com/devnet/air/articles/building-ane-ios-android-pt1.html
    but was hoping for something more current.
    Thanks

    Hi, I read a lot books, blogs, post at Adobe Dev website.
    But I found one fun way to begin: Lynda.com http://tinyurl.com/3yl6xqt
    Try it are some free videos.
    Good luck

  • Air Android - Share menu

    Hi,
    I'm working on a note taking app and I would like to add it to the ANDROID share menu to receive content from it.
    The share menu lets you share text/links from the browser to apps.
    This is how it looks like:
    http://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us /images/tldr/439304-1-eng-US/TLDR_reference.png
    Does anybody know how to do that?
    I'm using AIR 3.9 and Flash CS6
    Thanks

    You can try with this ANE for Android:
    https://github.com/illuzor/Android-Sharing-Extension-ANE
    If you need iOS functionality as well, you have this paid extension:
    http://www.milkmangames.com/blog/tools/#iosgv
    Instructions for the latter can be found here:
    http://www.adobe.com/devnet/air/articles/goviral-ane-android.html
    http://www.adobe.com/devnet/air/articles/goviral-ane-ios.html

  • Android native extention errors

    Hi Everyone,
    I'm currently working on creating an Android ANE for native alert popups. I'm now at the point where I think my both my Java and AS3 code is good to go but I'm getting an error when I try to use it.
    Main Thread (Suspended: TypeError: Error #1009: Cannot access a property or method of a null object reference.)
    My problem is I'm really not sure where this error is coming from. My thinking is that I'm not building the ANE file correctly or something is wrong in my extension.xml file but I'm really not too sure.
    I'm going to try to provide as much information as I can about how this project is set up. Right now I'm trying to use this ANE in a small, testing application.
    First, the folder setup:
    ANEextensions-
         Alert_Java (holding my Java project)
              (Android/Java created assets. Not sure if these are important or now. If so I will list them)
              src
                   com
                        fa
                             ne                        
                                  android
                                       AlertContext.java
                                       AlertExtension.java
                                       ShowAlert.java
         Alert_AS
              bin
                   AlertAndroidAS.swc
              src
                   Alert.as
                   extension.xml
    I'm not going to bother posting my java code as I think it's correct. but if anyone who is willing to invest some time in helping me with this issue wants to take a look please let me know.
    This is my extensions.xml file
    <extension xmlns="http://ns.adobe.com/air/extension/2.5">
    <id>com.fa.alerts</id>
    <versionNumber>1.0</versionNumber>
        <platforms>
            <platform name="Android-ARM">
                <applicationDeployment>
                    <nativeLibrary>AndroidAlert.jar</nativeLibrary>
                    <initializer>com.fa.ne.android.AlertExtension</initializer>
                    <finalizer>com.fa.ne.android.AlertExtension</finalizer>
                </applicationDeployment>
            </platform>
        </platforms>
    </extension>
    And this is my Alert.as file:
    package {
        import flash.events.EventDispatcher;
        import flash.external.ExtensionContext;
        public class Alert extends EventDispatcher{
            public static var extContext:ExtensionContext = null
            public function Alert(){
                super();
                extContext = ExtensionContext.createExtensionContext("com.fa.alerts", null);
            public static function androidAlert(aTitle:String, aMsg:String, aNeg:String = "Cancel", aPos:String = "Ok"):void{
                extContext.call("showAlert", aTitle, aMsg, aNeg, aPos);
    And this is my stub app I'm using to test
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView">
        <fx:Script>
            <![CDATA[
                protected function spawnAne(event:MouseEvent):void{
                    var a:Alert = new Alert();
                    Alert.androidAlert("test","testing");
            ]]>
        </fx:Script>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <s:Button click="spawnAne(event)" />
    </s:View>
    Now clicking on that button is what causes the error.
    I don't have any kind of swc or link between my testing app and the AS3 Alert_AS project. I'm using Flash Builder 4.6 to import the ANE file using the IDE tools.
    To build my ANE I'm using a lightly modified bash script from this post: http://gotoandlearn.com/play.php?id=149 by Lee Brimelow
        # path to YOUR Android SDK
        export AIR_ANDROID_SDK_HOME="my sdk"
        # path to the ADT tool in Flash Builder sdks
        ADT="my adt"
        # native project folder
        NATIVE_FOLDER=Alert_Java
        # AS lib folder
        LIB_FOLDER=Alert_AS
        # name of ANE file
        ANE_NAME=AndroidAlert.ane
        # JAR filename
        JAR_NAME=AndroidAlert.jar
        # cert path
        CERT_NAME=cert.p12
        # cert password
        CERT_PASS=password
        #===================================================================
        echo "****** preparing ANE package sources *******"
        rm ${ANE_NAME}
        rm -rf ./build/ane
        mkdir -p ./build/ane
        mkdir -p ./build/ane/Android-ARM
        mkdir -p ./build/ane/Android-ARM/res
        # copy resources
        cp -R ./${NATIVE_FOLDER}/res/* ./build/ane/Android-ARM/res
        # create the JAR file
        jar cf ./build/ane/Android-ARM/${JAR_NAME} -C ./${NATIVE_FOLDER}/bin .
        # grab the extension descriptor and SWC library
        cp ./${LIB_FOLDER}/src/extension.xml ./build/ane/
        cp ./${LIB_FOLDER}/bin/*.swc ./build/ane/
        unzip ./build/ane/*.swc -d ./build/ane
        mv ./build/ane/library.swf ./build/ane/Android-ARM
        echo "****** creating ANE package *******"
        "$ADT" -package -storetype PKCS12 -keystore ./cert.p12 -storepass password -tsa none \
            -target ane \
            ${ANE_NAME} \
            ./build/ane/extension.xml \
            -swc ./build/ane/*.swc \
            -platform Android-ARM \
            -C ./build/ane/Android-ARM/ .
        echo "****** ANE package created *******"
    I know this is a bit long but any help would be greatly appreciated! And feel free to let me know if you need some more elaboration

    I know this is an old post but I'm running into a similar situation - my ExtensionContext is NULL.  I've worked through all the examples I can find and I can't get my own ANE functional.

Maybe you are looking for

  • How to delete data from dynamic internal table

    Hi, I have dynamic internal table and I have some slection screen fields , using these selection screen fields (select -options), I have to filter the data? assigning will work with READ , but I have select options not the parametre, and also delete

  • Problems running tomcat on win XP

    Hi! I've just downloaded and installed the JWSDP on Windows XP Professional, but when I try to use Tomcat it starts but then terminates instantly. Can anyone help me with this? thanks, Ylva

  • Making email/text/missed call symbols show when the iphone screen is asleep

    Hi, So I purchased my first ever iphone on the weekend - the new 3G S. All very exciting. One thing I haven't quite worked out is whether it is possible to have the phone show me that I have mail/text/missed calls when the screen is asleep. Is this p

  • WebAnalyzer security????

    Can we access Hyperion Reporting and Analysis with Essbase Security? Now we are using 11.1.1.3 Essbase as stand alone. Earlier we used version 7, In that we used essbase user name and password for Web Analyzer also. Please let me know If we are going

  • IDVD won't burn at all

    Hi, I'm new at this so sorry for any ignorance. I made a movie with iMovie and transferred it over to iDvd. I made everything good on it, and decided to burn it. But, I'd shove in my disk, and press the burn button twice like it said, and it would ju