mardi 22 novembre 2016

Adobe Air application crashes on launch on Android - android.os.DeadObjectException

I've created an extension for Adobe AIR, and tried testing it with an Adobe AIR application.

I have used ant and a build.xml script to build the application with the native extension inside it. On iOS, the application installed, launched and performed as expected. On Android, the application installed, but when launched - crashed.

I have commented out all of the code related to the extension in the application, perhaps it was the cause for the crash, but still, the application crashed regardless to the extension.

I'm using the following to build the application:

application.xml

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ift.tt/2fBceLY">

<id>com.appoxee.air.example</id>

<filename>TestApplication</filename>
<versionNumber>1.0.0</versionNumber>

<initialWindow>

    <content>TestApplication.swf</content>

    <autoOrients>true</autoOrients>
    <fullScreen>false</fullScreen>
    <visible>true</visible>
</initialWindow>

<!-- for allowing deep-linking from browswer -->
<allowBrowserInvocation>true</allowBrowserInvocation>


<android>
    <manifestAdditions>
        <![CDATA[
            <manifest android:installLocation="auto">
            <uses-permission android:name="android.permission.INTERNET"/>
            <uses-permission android:name="android.permission.WAKE_LOCK"/>
            <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
            <uses-permission android:name="android.permission.VIBRATE" />

            <permission android:name="com.appoxee.air.example.permission.C2D_MESSAGE" android:protectionLevel="signature" />
            <uses-permission android:name="com.appoxee.air.example.permission.C2D_MESSAGE" />
            <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

            <application android:enabled="true">
            <activity android:exported="true">
            <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
            <intent-filter>
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.BROWSABLE"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <data android:scheme="apxair"/>
            </intent-filter>
            </activity>

            <service android:name="com.appoxee.push.PushOpenIntentService" />

            <!-- GCM push receiver, custom permission -->
            <receiver
                    android:name="com.google.android.gms.gcm.GcmReceiver"
                    android:exported="true"
                    android:permission="com.google.android.c2dm.permission.SEND" >
                    <intent-filter>
                        <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                        <category android:name="com.appoxee.air.example" />
                    </intent-filter>
            </receiver>

            <!-- Custom intent service to handle incoming messages -->
            <service
                    android:name="com.appoxee.ane.ApxAnePushIntentService"
                    android:exported="false" >
                    <intent-filter>
                        <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                    </intent-filter>
            </service>


            <!-- InstanceId -->
            <service
                    android:name="com.appoxee.gcm.AppoxeeInstanceIDListenerService"
                    android:exported="false">
                    <intent-filter>
                        <action android:name="com.google.android.gms.iid.InstanceID"/>
                    </intent-filter>
            </service>

            <activity android:name="com.appoxee.activities.LandingPage" />
            <activity android:name="com.appoxee.activities.Inbox" />
            <activity android:name="com.appoxee.activities.InboxMessage" />


            <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
            </application>
            </manifest>


        ]]></manifestAdditions>
</android>
<iPhone>
    <InfoAdditions><![CDATA[
        <key>CFBundleURLTypes</key>
        <array>
        <dict>
                 <key>CFBundleURLSchemes</key>
                 <array>
                 <string>apxair</string>
                 </array>
                 <key>CFBundleURLName</key>
                 <string>com.appoxee.air.example</string>
                 </dict> 
                 </array>

                 <key>UIDeviceFamily</key>
                 <array>
                 <string>1</string>
                 <string>2</string>
                 </array>
                 <key>MinimumOSVersion</key>
                 <string>8.0</string>

    ]]></InfoAdditions>
    <Entitlements>
        <![CDATA[<key>aps-environment</key>
            <string>development</string>  ]]>
    </Entitlements>
    <requestedDisplayResolution>high</requestedDisplayResolution>
</iPhone>

<extensions>
    <extensionID>com.appoxee.AppoxeeANE</extensionID>
    <extensionID>com.appoxee.GCMServices</extensionID>
</extensions>

Configuration.xml

<flex-config>
       <advanced-telemetry>false</advanced-telemetry>
       <!-- advanced-telemetry-password usage:
       <advanced-telemetry-password>string</advanced-telemetry-password>
       -->
       <compiler>
          <allow-source-path-overlap>false</allow-source-path-overlap>
          <as3>true</as3>
          <compress>false</compress>
          <debug>true</debug>
          <es>false</es>
          <external-library-path>
             <path-element>/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/frameworks/libs/air/airglobal.swc</path-element>
             <path-element>./libs/com.appoxee.ane</path-element>
          </external-library-path>
          <library-path>
             <path-element>/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/frameworks/libs/asc-support.swc</path-element>
             <path-element>/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/frameworks/libs/core.swc</path-element>
             <path-element>/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/frameworks/libs/air/servicemonitor.swc</path-element>
          </library-path>
          <mobile>true</mobile>
          <mxml>
             <!-- compiler.mxml.compatibility-version: specifies a compatibility version. e.g. -compatibility-version=2.0.1-->
             <!-- compiler.mxml.compatibility-version usage:
             <compatibility-version>version</compatibility-version>
             -->
             <!-- compiler.mxml.minimum-supported-version usage:
             <minimum-supported-version>string</minimum-supported-version>
             -->
          </mxml>
          <!-- compiler.omit-trace-statements: toggle whether trace statements are omitted-->
          <omit-trace-statements>false</omit-trace-statements>
          <!-- compiler.optimize: Enable post-link SWF optimization-->
          <optimize>true</optimize>

          <show-actionscript-warnings>true</show-actionscript-warnings>
          <show-binding-warnings>true</show-binding-warnings>
          <show-multiple-definition-warnings>true</show-multiple-definition-warnings>

          <source-path>
             <path-element>/Users/razelkayam/Developer/plugins/AdobeAir-AppoxeeANE/TestApplication/src</path-element>
          </source-path>
          <!-- compiler.strict: runs the AS3 compiler in strict error checking mode.-->
          <strict>true</strict>

          <!-- compiler.verbose-stacktraces: save callstack information to the SWF for debugging-->
          <verbose-stacktraces>false</verbose-stacktraces>
          <!-- compiler.warn-assignment-within-conditional: Assignment within conditional.-->
          <warn-assignment-within-conditional>true</warn-assignment-within-conditional>
          <!-- compiler.warn-bad-array-cast: Possibly invalid Array cast operation.-->
          <warn-bad-array-cast>true</warn-bad-array-cast>
          <!-- compiler.warn-bad-date-cast: Invalid Date cast operation.-->
          <warn-bad-date-cast>true</warn-bad-date-cast>
          <!-- compiler.warn-bad-nan-comparison: Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN.-->
          <warn-bad-nan-comparison>true</warn-bad-nan-comparison>
          <!-- compiler.warn-bad-null-assignment: Impossible assignment to null.-->
          <warn-bad-null-assignment>true</warn-bad-null-assignment>
          <!-- compiler.warn-bad-null-comparison: Illogical comparison with null.-->
          <!-- compiler.warn-bad-null-comparison usage:
          <warn-bad-null-comparison>boolean</warn-bad-null-comparison>
          -->
          <!-- compiler.warn-bad-undefined-comparison: Illogical comparison with undefined.  Only untyped variables (or variables of type *) can be undefined.-->
          <warn-bad-undefined-comparison>true</warn-bad-undefined-comparison>
          <!-- compiler.warn-const-not-initialized: Constant not initialized.-->
          <warn-const-not-initialized>true</warn-const-not-initialized>
          <!-- compiler.warn-duplicate-variable-def: Duplicate variable definition -->
          <warn-duplicate-variable-def>true</warn-duplicate-variable-def>
          <!-- compiler.warn-instance-of-changes: Use of the instanceof operator.-->
          <warn-instance-of-changes>true</warn-instance-of-changes>
          <!-- compiler.warn-internal-error: Internal error in compiler.-->
          <!-- compiler.warn-internal-error usage:
          <warn-internal-error>boolean</warn-internal-error>
          -->
          <!-- compiler.warn-level-not-supported: _level is no longer supported. For more information, see the flash.display package.-->
          <!-- compiler.warn-level-not-supported usage:
          <warn-level-not-supported>boolean</warn-level-not-supported>
          -->
          <!-- compiler.warn-missing-namespace-decl: Missing namespace declaration (e.g. variable is not defined to be public, private, etc.).-->
          <warn-missing-namespace-decl>true</warn-missing-namespace-decl>
          <!-- compiler.warn-no-type-decl: Missing type declaration.-->
          <warn-no-type-decl>true</warn-no-type-decl>
       </compiler>
       <!-- debug-password: the password to include in debuggable SWFs-->
       <debug-password></debug-password>
       <!-- default-background-color: default background color (may be overridden by the application code)-->
       <default-background-color>0xFFFFFF</default-background-color>
       <!-- default-frame-rate: default frame rate to be used in the SWF.-->
       <default-frame-rate>24</default-frame-rate>
       <!-- default-script-limits: default script execution limits (may be overridden by root attributes)-->
       <default-script-limits>
          <max-recursion-depth>1000</max-recursion-depth>
          <max-execution-time>60</max-execution-time>
       </default-script-limits>
       <!-- default-size: default application size (may be overridden by root attributes in the application)-->
       <default-size>
          <width>500</width>
          <height>375</height>
       </default-size>
       <!-- load-config: load a file containing configuration options-->
       <load-config>${flexlib}/${configname}-config.xml</load-config>
       <!-- load-externs: an XML file containing <def>, <pre>, and <ext> symbols to omit from linking when building a SWF-->
       <!-- load-externs usage:
       <load-externs>filename</load-externs>
       -->
       <metadata>
          <creator>unknown</creator>
          <date>text</date>
          <description></description>
          <language>EN</language>
          <publisher>unknown</publisher>
          <title>Adobe ActionScript Application</title>
       </metadata>
       <target-player>20.0.0</target-player>
       <swf-version>31</swf-version>
       <output>TestApplication</output>
       <!-- use-network: toggle whether the SWF is flagged for access to network resources-->
       <use-network>true</use-network>
    </flex-config>

And this is the crash log i'm getting:

Crash Log

     19:05:18.688   780  3399 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=air.com.appoxee.air.example/.AppEntry (has extras)} from uid 10021 on display 0
     19:05:18.731   780   790 I ActivityManager: Start proc 29787:air.com.appoxee.air.example/u0a105 for activity air.com.appoxee.air.example/.AppEntry
     19:05:18.825 29787 29787 I StartupTime1: :1479801918823
     19:05:18.832 29787 29787 W System  : ClassLoader referenced unknown path: com.adobe.air
     19:05:19.811   780   790 I WindowManager: Screenshot max retries 4 of Token{273c086 ActivityRecord{ab39d61 u0 air.com.appoxee.air.example/.AppEntry t278 f}} appWin=Window{2e29909 u0 SurfaceView} drawState=1
     19:05:19.821 29787 29787 I Choreographer: Skipped 53 frames!  The application may be doing too much work on its main thread.
     19:05:19.875   780  3397 W InputMethodManagerService: Focus gain on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@592bcc5 (uid=10105 pid=29787)
     19:05:19.917   780 20575 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@59df9e6 attribute=null, token = android.os.BinderProxy@8a6e77e
     19:05:19.919 29787 29787 I Process : Sending signal. PID: 29787 SIG: 9
     19:05:19.927   187   187 E lowmemorykiller: Error writing /proc/29787/oom_score_adj; errno=22
     19:05:19.927   780  1220 I ActivityManager: Killing 29331:com.android.documentsui/u0a37 (adj 15): empty #17
     19:05:19.939   780   433 I WindowState: WIN DEATH: Window{d238ed3 u0 air.com.appoxee.air.example/air.com.appoxee.air.example.AppEntry}
     19:05:19.950   780  1925 I WindowState: WIN DEATH: Window{2e29909 u0 SurfaceView}
     19:05:19.985   780  1192 I ActivityManager: Process air.com.appoxee.air.example (pid 29787) has died
     19:05:20.073   780 27867 D NetlinkSocketObserver: NeighborEvent{elapsedMs=1789558081, 192.168.0.1, [EC086B2F6EE6], RTM_NEWNEIGH, NUD_STALE}
     19:05:20.085 20029 20194 I Icing   : Usage reports 6 indexed 0 rejected 0 imm upload false
     19:05:20.112 14157 24451 W ContentTaskController: Invalid newTask was provided to startTracking.
     19:05:20.117 20029 20194 I Icing   : Usage reports 0 indexed 0 rejected 0 imm upload false
     19:05:20.123 14157 14179 W ContentTaskController: Invalid task was provided to stopTracking.
     19:05:20.129 20029 20194 I Icing   : Usage reports 0 indexed 0 rejected 0 imm upload false
     19:05:20.139 14157 14179 W ContentTaskController: Invalid task was provided to stopTracking.
     19:05:20.188 20029 20194 I Icing   : Usage reports 0 indexed 0 rejected 0 imm upload false
     19:05:20.238 20029 20194 I Icing   : Usage reports 0 indexed 0 rejected 0 imm upload false
     19:05:20.254 14157 14179 W ContentTaskController: Invalid task was provided to stopTracking.
     19:05:20.276 20029 20194 I Icing   : Usage reports 0 indexed 0 rejected 0 imm upload false
     19:05:20.298 14157 14179 W ContentTaskController: Invalid task was provided to stopTracking.
     19:05:20.324 20029 20194 I Icing   : Usage reports 0 indexed 0 rejected 0 imm upload false
     19:05:20.367 14157 14179 W ContentTaskController: Invalid newTask was provided to startTracking.
     19:05:20.374   780   801 W WindowAnimator: Failed to dispatch window animation state change.
     19:05:20.374   780   801 W WindowAnimator: android.os.DeadObjectException
     19:05:20.374   780   801 W WindowAnimator:     at android.os.BinderProxy.transactNative(Native Method)
     19:05:20.374   780   801 W WindowAnimator:     at android.os.BinderProxy.transact(Binder.java:503)
     19:05:20.374   780   801 W WindowAnimator:     at android.view.IWindow$Stub$Proxy.onAnimationStopped(IWindow.java:534)
     19:05:20.374   780   801 W WindowAnimator:     at com.android.server.wm.WindowAnimator.updateWindowsLocked(WindowAnimator.java:286)
     19:05:20.374   780   801 W WindowAnimator:     at com.android.server.wm.WindowAnimator.animateLocked(WindowAnimator.java:678)
     19:05:20.374   780   801 W WindowAnimator:     at com.android.server.wm.WindowAnimator.-wrap0(WindowAnimator.java)
     19:05:20.374   780   801 W WindowAnimator:     at com.android.server.wm.WindowAnimator$1.doFrame(WindowAnimator.java:123)
     19:05:20.374   780   801 W WindowAnimator:     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
     19:05:20.374   780   801 W WindowAnimator:     at android.view.Choreographer.doCallbacks(Choreographer.java:670)
     19:05:20.374   780   801 W WindowAnimator:     at android.view.Choreographer.doFrame(Choreographer.java:603)
     19:05:20.374   780   801 W WindowAnimator:     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
     19:05:20.374   780   801 W WindowAnimator:     at android.os.Handler.handleCallback(Handler.java:739)
     19:05:20.374   780   801 W WindowAnimator:     at android.os.Handler.dispatchMessage(Handler.java:95)
     19:05:20.374   780   801 W WindowAnimator:     at android.os.Looper.loop(Looper.java:148)
     19:05:20.374   780   801 W WindowAnimator:     at android.os.HandlerThread.run(HandlerThread.java:61)
     19:05:20.374   780   801 W WindowAnimator:     at com.android.server.ServiceThread.run(ServiceThread.java:46)
     19:05:20.375   780   801 W WindowAnimator: Failed to dispatch window animation state change.
     19:05:20.375   780   801 W WindowAnimator: android.os.DeadObjectException
     19:05:20.375   780   801 W WindowAnimator:     at android.os.BinderProxy.transactNative(Native Method)
     19:05:20.375   780   801 W WindowAnimator:     at android.os.BinderProxy.transact(Binder.java:503)
     19:05:20.375   780   801 W WindowAnimator:     at android.view.IWindow$Stub$Proxy.onAnimationStopped(IWindow.java:534)
     19:05:20.375   780   801 W WindowAnimator:     at com.android.server.wm.WindowAnimator.updateWindowsLocked(WindowAnimator.java:286)
     19:05:20.375   780   801 W WindowAnimator:     at com.android.server.wm.WindowAnimator.animateLocked(WindowAnimator.java:678)
     19:05:20.375   780   801 W WindowAnimator:     at com.android.server.wm.WindowAnimator.-wrap0(WindowAnimator.java)
     19:05:20.375   780   801 W WindowAnimator:     at com.android.server.wm.WindowAnimator$1.doFrame(WindowAnimator.java:123)
     19:05:20.375   780   801 W WindowAnimator:     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
     19:05:20.375   780   801 W WindowAnimator:     at android.view.Choreographer.doCallbacks(Choreographer.java:670)
     19:05:20.375   780   801 W WindowAnimator:     at android.view.Choreographer.doFrame(Choreographer.java:603)
     19:05:20.375   780   801 W WindowAnimator:     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
     19:05:20.375   780   801 W WindowAnimator:     at android.os.Handler.handleCallback(Handler.java:739)
     19:05:20.375   780   801 W WindowAnimator:     at android.os.Handler.dispatchMessage(Handler.java:95)
     19:05:20.375   780   801 W WindowAnimator:     at android.os.Looper.loop(Looper.java:148)
     19:05:20.375   780   801 W WindowAnimator:     at android.os.HandlerThread.run(HandlerThread.java:61)
     19:05:20.375   780   801 W WindowAnimator:     at com.android.server.ServiceThread.run(ServiceThread.java:46)
     19:05:20.385   780 20416 I ActivityManager: Start proc 29848:com.google.android.gms.unstable/u0a7 for service http://ift.tt/2gdsy9r
     19:05:20.401 14157 14179 W ContentTaskController: Invalid task was provided to stopTracking.

Any help will be greatly appreciated!

Aucun commentaire:

Enregistrer un commentaire