airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
200 stars 11 forks source link

AIR SDK 50.2.4.3 - Crash during Android Build #3036

Open Nisaba opened 7 months ago

Nisaba commented 7 months ago

Hello,

My app builds very well with AIR SDK 50.2.2.6.

But with AIR SDK 50.2.4.3, I get this error :

`Adobe AIR code signing password: unexpected failure: null java.lang.NullPointerException at com.adobe.air.apk.AABOutputStream.editAndroidManifest(AABOutputStream.java)
at com.adobe.air.apk.AABOutputStream.createAndroidManifestXml(AABOutputStream.java) at com.adobe.air.apk.AABOutputStream.generateResourcesAndManifest(AABOutputStream.java) at com.adobe.air.apk.AABOutputStream.addApplicationDescriptor(AABOutputStream.java) at com.adobe.air.ApplicationPackager.addSpecialFiles(ApplicationPackager.java) at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java) at com.adobe.air.apk.AABPackager.createPackage(AABPackager.java) at com.adobe.air.ADT.parseArgsAndGo(ADT.java) at com.adobe.air.ADT.run(ADT.java) at com.adobe.air.ADT.main(ADT.java)

Thank you for your help

ajwfrost commented 7 months ago

Hi - is it possible to get the output of the ADT log? You can either run the AIR SDK Manager with the "Troubleshooting" tab open to get this, or if you edit a file in c:\users\username.airsdk\ called "adt.cfg", add a line "DebugOut=true", and then after trying the build again, look for the log file = c:\users\username\adt.log

thanks

Nisaba commented 7 months ago

Hi, Here is the result :

`ADT 50.2.4.3 called with: -package -target apk-debug -listen -arch armv8 -storetype pkcs12 -keystore cert/nisaba3.pfx -storepass xxxxxx bin-release/GeoTracker.apk c:\CODES-SOURCES\GeoLoc-AppStore\GeoLoc-Offline\bin-debug\GeoTracker-app.xml -platformsdk C:/ANDROID/SDK -e src\graphics\icons\icon_48.png icon_48.png -e src\graphics\icons\icon_57.png icon_57.png -e src\graphics\icons\icon_72.png icon_72.png -e src\graphics\icons\icon_76.png icon_76.png -e src\graphics\icons\icon_96.png icon_96.png -e src\graphics\icons\icon_114.png icon_114.png -e src\graphics\icons\icon_120.png icon_120.png -e src\graphics\icons\icon_144.png icon_144.png -e src\graphics\icons\icon_152.png icon_152.png -e src\graphics\icons\icon_512.png icon_512.png -C c:\CODES-SOURCES\GeoLoc-AppStore\GeoLoc-Offline\bin-debug GeoTracker.swf -extdir libs -resdir src/res

Target requested was apk-debug, but not using legacy APK so building via Android Studio

Creating device SDK handler - location passed in = C:\ANDROID\SDK

Warning: Using default implementation for native extension 'com.distriqt.Gyroscope'

Adding gradle dependency: implementation 'com.google.code.gson:gson:2.8.9'

Unexpected failure: null

`

ajwfrost commented 7 months ago

Hi Also see #3046 which appears to be the same issue.. but we're not able to reproduce this, would it be possible to get your application descriptor file? The call stack shown above definitely points to the new updated code that handles conflicts in the uses-permissions properties, but we've checked various permutations of possible app descriptor additions, and checked the code which seems pretty defensively written, so we're struggling to find out where this actually triggers.. thanks

Nisaba commented 7 months ago

ok, here is it :

<manifest android:installLocation="auto">
    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="33" />

    <!--See the Adobe AIR documentation for more information about setting Google Android permissions-->
    <!--La suppression de l’autorisation android.permission.INTERNET aura comme effet secondaire
de vous empêcher de déboguer l’application sur le périphérique.-->
    <uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
   <!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/> -->
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <!--Les autorisations DISABLE_KEYGUARD et WAKE_LOCK doivent être permutées
afin d’accéder aux API SystemIdleMode d’AIR.-->
    <uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <!--Les autorisations ACCESS_NETWORK_STATE et ACCESS_WIFI_STATE doivent être
permutées afin d’utiliser les API NetworkInfo d’AIR.-->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
    <uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE"/>

    <uses-permission android:name="geotracker.nisaba.solutions.MAPS_RECEIVE" android:protectionLevel="signature"/>

    <uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:glEsVersion="0x00020000" android:required="true"/>

    <!--for Samsung-->
    <uses-permission android:name="com.sec.android.provider.badge.permission.READ"/>
    <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE"/>
    <!--for htc-->
    <uses-permission android:name="com.htc.launcher.permission.READ_SETTINGS"/>
    <uses-permission android:name="com.htc.launcher.permission.UPDATE_SHORTCUT"/>
    <!--for sony-->
    <uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE"/>
    <uses-permission android:name="com.sonymobile.home.permission.PROVIDER_INSERT_BADGE"/>
    <!--for apex-->
    <uses-permission android:name="com.anddoes.launcher.permission.UPDATE_COUNT"/>
    <!--for solid-->
    <uses-permission android:name="com.majeur.launcher.permission.UPDATE_BADGE"/>
    <!--for huawei-->
    <uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE"/>
    <uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS"/>
    <uses-permission android:name="com.huawei.android.launcher.permission.WRITE_SETTINGS"/>
    <!--for ZUK-->
    <uses-permission android:name="android.permission.READ_APP_BADGE"/>
    <!--for OPPO-->
    <uses-permission android:name="com.oppo.launcher.permission.READ_SETTINGS"/>
    <uses-permission android:name="com.oppo.launcher.permission.WRITE_SETTINGS"/>
    <!--for EvMe-->
    <uses-permission android:name="me.everything.badger.permission.BADGE_COUNT_READ"/>
    <uses-permission android:name="me.everything.badger.permission.BADGE_COUNT_WRITE"/>

    <queries>
        <package android:name="com.google.android.apps.maps" />
        <!-- query for checking email apps -->
        <intent>
            <action android:name="android.intent.action.SEND" />
            <data android:mimeType="message/rfc822" />
        </intent>
        <!-- For browser content -->
        <intent>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="https" />
        </intent>
        <!-- End of browser content -->
        <!-- For CustomTabsService -->
        <intent>
            <action android:name="android.support.customtabs.action.CustomTabsService" />
        </intent>
        <!-- End of CustomTabsService -->
    </queries>

    <application android:hardwareAccelerated="true" android:appComponentFactory="androidx.core.app.CoreComponentFactory">

            <activity>
                <intent-filter>
                    <action android:name="android.intent.action.MAIN"/>
                    <category android:name="android.intent.category.LAUNCHER"/>
                </intent-filter>
                <!--Mime type set -->
                <intent-filter>

                    <action android:name="android.intent.action.VIEW" />

                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />

                    <data android:scheme="file" />
                    <data android:scheme="http" />
                    <data android:scheme="https" />
                    <data android:scheme="content" />

                    <!-- Valid mime types -->
                    <data android:mimeType="application/vnd.google-earth.kml+xml" />
                    <data android:mimeType="application/gpx+xml" />
                    <data android:mimeType="application/vnd.geo+json" />
                    <data android:mimeType="application/vnd.geojson+json" />

                    <!-- Invalid mime types used by some bad software -->
                    <data android:mimeType="application/kml" />
                    <data android:mimeType="application/gpx" />
                    <data android:mimeType="application/geojson" />

                    <data android:mimeType="application/kml+xml" />

                    <data android:mimeType="application/vnd.google-earth.kml" />
                    <data android:mimeType="application/vnd.google-earth.gpx" />
                    <data android:mimeType="application/vnd.google-earth.gpx+xml" />

                    <data android:mimeType="text/kml" />
                    <data android:mimeType="text/gpx" />
                <data android:mimeType="text/geojson" />

                    <data android:mimeType="text/kml+xml" />
                    <data android:mimeType="text/gpx+xml" />
                <data android:mimeType="text/geojson+json" />

                    <data android:mimeType="text/xml+kml" />
                    <data android:mimeType="text/xml+gpx" />
                <data android:mimeType="text/json+geojson" />

                </intent-filter>

                <!-- Mime type not set but valid extensions -->
                <intent-filter>

                    <action android:name="android.intent.action.VIEW" />

                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />

                    <data android:scheme="file" />
                    <data android:scheme="http" />
                    <data android:scheme="https" />
                    <data android:scheme="content" />

                    <data android:host="*" />

                    <data android:pathPattern="/.*..*..*..*..*\\.gpx" />
                    <data android:pathPattern="/.*..*..*..*..*\\.kml" />
                    <data android:pathPattern="/.*..*..*..*..*\\.geojson" />
                    <data android:pathPattern="/.*..*..*..*\\.gpx" />
                    <data android:pathPattern="/.*..*..*..*\\.kml" />
                    <data android:pathPattern="/.*..*..*..*\\.geojson" />
                    <data android:pathPattern="/.*..*..*\\.gpx" />
                    <data android:pathPattern="/.*..*..*\\.kml" />
                    <data android:pathPattern="/.*..*..*\\.geojson" />
                    <data android:pathPattern="/.*..*\\.gpx" />
                    <data android:pathPattern="/.*..*\\.kml" />
                    <data android:pathPattern="/.*..*\\.geojson" />
                    <data android:pathPattern="/.*\\.gpx" />
                    <data android:pathPattern="/.*\\.kml" />
                    <data android:pathPattern="/.*\\.geojson" />

                </intent-filter>

                <!-- Invalid mime type but valid extensions -->
                <intent-filter>

                    <action android:name="android.intent.action.VIEW" />

                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />

                    <data android:scheme="file" />
                    <data android:scheme="http" />
                    <data android:scheme="https" />
                    <data android:scheme="content" />

                    <data android:host="*" />
                    <data android:mimeType="*/*" />

                    <data android:pathPattern="/.*..*..*..*..*\\.gpx" />
                    <data android:pathPattern="/.*..*..*..*..*\\.kml" />
                    <data android:pathPattern="/.*..*..*..*\\.gpx" />
                    <data android:pathPattern="/.*..*..*..*\\.kml" />
                    <data android:pathPattern="/.*..*..*\\.gpx" />
                    <data android:pathPattern="/.*..*..*\\.kml" />
                    <data android:pathPattern="/.*..*\\.gpx" />
                    <data android:pathPattern="/.*..*\\.kml" />
                    <data android:pathPattern="/.*\\.gpx" />
                    <data android:pathPattern="/.*\\.kml" />

                </intent-filter>
            </activity>

        <!-- PERMISSIONS -->
        <activity android:name="com.distriqt.core.auth.AuthorisationActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:exported="false" />
        <activity android:name="com.distriqt.extension.scanner.zbar.ZBarScannerActivity" android:exported="false"/>                     

        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
        <activity android:name="com.google.android.gms.common.api.GoogleApiActivity"
            android:theme="@android:style/Theme.Translucent.NoTitleBar"
            android:exported="false"/>

        <!-- Replace "YOUR_API_KEY" with your Android Google Maps API Key -->
        <meta-data 
                android:name="com.google.android.geo.API_KEY" 
                android:value="Axxxxxxxxxxxx" />

        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxx"/>

        <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:exported="false"
            android:theme="@android:style/Theme.Translucent" />

        <activity
            android:name="com.ironsource.sdk.controller.ControllerActivity"
            android:configChanges="orientation|screenSize"
            android:hardwareAccelerated="true" />
        <activity
            android:name="com.ironsource.sdk.controller.InterstitialActivity"
            android:configChanges="orientation|screenSize"
            android:hardwareAccelerated="true"
            android:theme="@android:style/Theme.Translucent" />
        <activity
            android:name="com.ironsource.sdk.controller.OpenUrlActivity"
            android:configChanges="orientation|screenSize"
            android:hardwareAccelerated="true"
            android:theme="@android:style/Theme.Translucent" />
        <provider
            android:name="com.ironsource.lifecycle.IronsourceLifecycleProvider"
            android:authorities="APPLICATION_PACKAGE.IronsourceLifecycleProvider" />

        <!--<provider
            android:name="com.google.android.gms.ads.MobileAdsInitProvider"
            android:authorities="APPLICATION_PACKAGE.mobileadsinitprovider"
            android:exported="false"
            android:initOrder="100" />

        <provider
            android:name="androidx.startup.InitializationProvider"
            android:authorities="APPLICATION_PACKAGE.androidx-startup"
            android:exported="false" >
            <meta-data
                android:name="androidx.work.WorkManagerInitializer"
                android:value="androidx.startup" />
        </provider> -->

        <receiver android:name="com.distriqt.extension.location.receivers.LocationReceiver" android:exported="false" >
            <intent-filter>
                <action android:name="air.geotracker.nisaba.solutions.LOCATION_UPDATE" />
            </intent-filter>
        </receiver>
        <service
            android:name="com.distriqt.extension.location.services.LocationUpdateService"
            android:foregroundServiceType="location"
            android:enabled="true"
            android:exported="true" />              

        <service
            android:name="com.google.android.gms.ads.AdService"
            android:enabled="true"
            android:exported="false" />

        <uses-library android:name="org.apache.http.legacy" android:required="false" />
        <receiver android:name="com.distriqt.extension.location.receivers.GeofenceTransitionReceiver" android:exported="true" >
            <intent-filter>
                <action android:name="air.geotracker.nisaba.solutions.GEOFENCE_TRANSITION_ACTION" />
            </intent-filter>
        </receiver>
        <receiver android:name="com.distriqt.extension.location.receivers.BootReceiver" android:exported="true" >
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
                <action android:name="android.location.PROVIDERS_CHANGED"/>
            </intent-filter>
        </receiver>

        <receiver
            android:name="androidx.work.impl.utils.ForceStopRunnable$BroadcastReceiver"
            android:directBootAware="false"
            android:enabled="true"
            android:exported="false" />

        <receiver
            android:name="androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryChargingProxy"
            android:directBootAware="false"
            android:enabled="false"
            android:exported="false" >
            <intent-filter>
                <action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
                <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
            </intent-filter>
        </receiver>
        <receiver
            android:name="androidx.work.impl.background.systemalarm.ConstraintProxy$BatteryNotLowProxy"
            android:directBootAware="false"
            android:enabled="false"
            android:exported="false" >
            <intent-filter>
                <action android:name="android.intent.action.BATTERY_OKAY" />
                <action android:name="android.intent.action.BATTERY_LOW" />
            </intent-filter>
        </receiver>
        <receiver
            android:name="androidx.work.impl.background.systemalarm.ConstraintProxy$StorageNotLowProxy"
            android:directBootAware="false"
            android:enabled="false"
            android:exported="false" >
            <intent-filter>
                <action android:name="android.intent.action.DEVICE_STORAGE_LOW" />
                <action android:name="android.intent.action.DEVICE_STORAGE_OK" />
            </intent-filter>
        </receiver>
        <receiver
            android:name="androidx.work.impl.background.systemalarm.ConstraintProxy$NetworkStateProxy"
            android:directBootAware="false"
            android:enabled="false"
            android:exported="false" >
            <intent-filter>
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
            </intent-filter>
        </receiver>
        <receiver
            android:name="androidx.work.impl.background.systemalarm.RescheduleReceiver"
            android:directBootAware="false"
            android:enabled="false"
            android:exported="false" >
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.TIME_SET" />
                <action android:name="android.intent.action.TIMEZONE_CHANGED" />
            </intent-filter>
        </receiver>
        <receiver
            android:name="androidx.work.impl.background.systemalarm.ConstraintProxyUpdateReceiver"
            android:directBootAware="false"
            android:enabled="@bool/enable_system_alarm_service_default"
            android:exported="false" >
            <intent-filter>
                <action android:name="androidx.work.impl.background.systemalarm.UpdateProxies" />
            </intent-filter>
        </receiver>
        <receiver
            android:name="androidx.work.impl.diagnostics.DiagnosticsReceiver"
            android:directBootAware="false"
            android:enabled="true"
            android:exported="true"
            android:permission="android.permission.DUMP" >
            <intent-filter>
                <action android:name="androidx.work.diagnostics.REQUEST_DIAGNOSTICS" />
            </intent-filter>
        </receiver>

        <service
            android:name="androidx.room.MultiInstanceInvalidationService"
            android:directBootAware="true"
            android:exported="false" />

        <service android:name="com.distriqt.extension.location.services.GeofenceRestartService" android:exported="false" />

        <activity android:name="com.distriqt.extension.location.permissions.AuthorisationActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:exported="false" />

        <provider 
            android:name="com.flurry.android.agent.FlurryContentProvider"
            android:authorities="air.geotracker.nisaba.solutions.FlurryContentProvider"
            android:exported="false" />

        <provider
            android:name="com.distriqt.extension.share.content.ShareFileProvider"
            android:authorities="air.geotracker.nisaba.solutions.sharefileprovider"
            android:grantUriPermissions="true"
            android:exported="false">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/distriqt_share_paths" />
        </provider>

        <service
            android:name="androidx.work.impl.background.systemalarm.SystemAlarmService"
            android:directBootAware="false"
            android:enabled="@bool/enable_system_alarm_service_default"
            android:exported="false" />

        <!-- com.google.android.play -->
        <activity
            android:name="com.google.android.play.core.missingsplits.PlayCoreMissingSplitsActivity"
            android:enabled="false"
            android:exported="false"
            android:launchMode="singleInstance"
            android:process=":playcore_missing_splits_activity"
            android:stateNotNeeded="true" />
        <activity
            android:name="com.google.android.play.core.common.PlayCoreDialogWrapperActivity"
            android:exported="false"
            android:stateNotNeeded="true"
            android:theme="@style/Theme.PlayCore.Transparent" />

        <service
            android:name="com.google.android.play.core.assetpacks.AssetPackExtractionService"
            android:enabled="false"
            android:exported="true" >
            <meta-data
                android:name="com.google.android.play.core.assetpacks.versionCode"
                android:value="11001" />
        </service>
        <service
            android:name="com.google.android.play.core.assetpacks.ExtractionForegroundService"
            android:enabled="false"
            android:exported="false" />

        <service
            android:name="androidx.work.impl.background.systemjob.SystemJobService"
            android:directBootAware="false"
            android:enabled="@bool/enable_system_job_service_default"
            android:exported="true"
            android:permission="android.permission.BIND_JOB_SERVICE" />

        <service
            android:name="androidx.work.impl.foreground.SystemForegroundService"
            android:directBootAware="false"
            android:enabled="@bool/enable_system_foreground_service_default"
            android:exported="false" />

        <!-- NOTIFICATIONS -->
        <receiver android:name="com.distriqt.extension.notifications.notifications.receivers.NotificationReceiver" android:exported="false">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.QUICKBOOT_POWERON" />
            </intent-filter>
            <intent-filter>
                <action android:name="air.geotracker.nisaba.solutions.NOTIFICATION_DELAYED" />
                <action android:name="air.geotracker.nisaba.solutions.NOTIFICATION_DELETED" />
                <action android:name="air.geotracker.nisaba.solutions.NOTIFICATION_ACTION" />
                <data android:scheme="dtn" />
            </intent-filter>
        </receiver>
        <activity android:name="com.distriqt.extension.notifications.notifications.NotificationActivity" android:exported="false">
            <intent-filter>
                <action android:name="air.geotracker.nisaba.solutions.NOTIFICATION_SELECTED" />
                <action android:name="air.geotracker.nisaba.solutions.NOTIFICATION_ACTION" />
                <data android:scheme="dtn" />
            </intent-filter>
        </activity>

        <provider
        android:name="com.distriqt.extension.notifications.content.FileProvider"
        android:authorities="air.geotracker.nisaba.solutions.notificationsfileprovider"
        android:grantUriPermissions="true"
        android:exported="false">
            <meta-data 
                android:name="android.support.FILE_PROVIDER_PATHS" 
                android:resource="@xml/distriqt_notifications_paths" />
        </provider>

    </application>
</manifest>
ajwfrost commented 7 months ago

Thanks -> found the issue, we'll get a fix out soon, but the workaround is to change this line:

    <uses-feature android:name="android.hardware.camera" />

to:

    <uses-feature android:name="android.hardware.camera" android:required="true" />
Nisaba commented 7 months ago

ok thanks it works