Moving to 64-bit Issues

I’ve been trying to get my app moved to 64-bit, but I’ve been having issues. I originally got an error that said something about not being able to find ‘@integer/google_play_services_version’, which I believe should have been packaged with the Chartboost ane, but I can’t remember. I fixed this by adding Distriqt’s Base and Ads Google Play Services ANEs. Now the app crashes consistently on startup. Logcat only gives me this:

02-24 16:58:21.496 1619 1847 W PackageParser: Problem in package /data/app/air.com.snowflake.CasteClicker-AdYI7kiEYOZQFUrBPpICdA==/base.apk:
02-24 16:58:21.496 1619 1847 W PackageParser: Unknown element under ‘receiver’: activity at /data/app/air.com.snowflake.CasteClicker-AdYI7kiEYOZQFUrBPpICdA==/base.apk Binary XML file line #163

I’m kind of stuck. I’ve also tried to remove the Chartboost stuff entirely from my project and application xml, with the same result. I’ve posted the application xml below.

As a big picture question, why would a 64 bit version ever crash when a 32 bit version works just fine?

<?xml version="1.0" encoding="utf-8" ?>
<id>com.snowflake.CasteClicker</id>
<versionNumber>4.6.0</versionNumber>
<supportedProfiles>mobileDevice</supportedProfiles>
<filename>CastleClicker</filename>

<name>CastleClicker</name>
<description></description>
<copyright></copyright>

<android>
	<manifestAdditions><![CDATA[
		
		<manifest android:installLocation="auto">
			<uses-sdk android:targetSdkVersion="28"/>
			<uses-sdk android:minSdkVersion="21"/>
			<uses-permission android:name="android.permission.INTERNET"/>
			<uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
			<uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE"/>
			<uses-permission android:name="com.sonymobile.home.permission.PROVIDER_INSERT_BADGE"/>
			
			<uses-permission android:name="com.android.vending.BILLING"/>
			<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
			<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
			<uses-permission android:name="android.permission.READ_PHONE_STATE" />
			<!-- The WakeLock permission is required to use local notifications. -->
			<uses-permission android:name="android.permission.WAKE_LOCK"/>
			<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
			<uses-permission android:name="com.android.vending.CHECK_LICENSE" />
			<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
			<!--<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />-->
			<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
			
			<!-- The Vibrate permission is required to use the vibration, and/or local notifications. -->
			<uses-permission android:name="android.permission.VIBRATE"/>
			<!-- this permissions is required by CoreMobile, if you use notifications and want them to 
			survive a reboot-->
			<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
			
			<application android:enabled="true" android:hardwareAccelerated="true" android:name="android.support.multidex.MultiDexApplication">
				<activity android:launchMode="singleTop">
					<intent-filter>
						<action android:name ="android.intent.action.MAIN"/>
						<category android:name="android.intent.category.LAUNCHER"/>
					</intent-filter>
				</activity>
				
				<!-- NOTIFICATIONS -->
				<receiver android:name="com.distriqt.extension.notifications.notifications.receivers.NotificationReceiver">
					<intent-filter>
						<action android:name="air.com.snowflake.CasteClicker.NOTIFICATION_SELECTED" />
						<action android:name="air.com.snowflake.CasteClicker.NOTIFICATION_DELETED" />
						<action android:name="air.com.snowflake.CasteClicker.NOTIFICATION_ACTION" />
						<action android:name="air.com.snowflake.CasteClicker.NOTIFICATION_DELAYED" />
						<data android:scheme="dtn" />
					</intent-filter>
					<intent-filter>
						<action android:name="android.intent.action.BOOT_COMPLETED" />
					</intent-filter>
				</receiver>
				<provider
					android:name="com.distriqt.extension.notifications.content.FileProvider"
					android:authorities="air.com.snowflake.CasteClicker.notificationsfileprovider"
					android:grantUriPermissions="true"
					android:exported="false">
					<meta-data 
						android:name="android.support.FILE_PROVIDER_PATHS" 
						android:resource="@xml/distriqt_notifications_paths" />
				</provider>
				
				
				
				
				<!-- The app ID and signature for the Android version of your AIR app must be placed here. -->
				<meta-data android:name="__ChartboostAir__AppID" android:value="562920745b145304d5f1bf86" />
				<meta-data android:name="__ChartboostAir__AppSignature" android:value="4ef682244aad629551de6ad6d68d11143a5ed5cb" />
				
				<activity android:name="com.applovin.adview.AppLovinInterstitialActivity" />
				<activity android:name="com.applovin.adview.AppLovinConfirmationActivity" />
				<!-- Also required for the Chartboost SDK. -->
				<activity android:name="com.chartboost.sdk.CBImpressionActivity"
                                  android:excludeFromRecents="true" 
                                  android:theme="@android:style/Theme.Translucent.NoTitleBar"
                                  android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" />
				<!-- For Google Play Services (required by Chartboost) -->
				
				<meta-data android:name="com.google.android.gms.version"
                                  android:value="@integer/google_play_services_version" />

				
				<receiver android:name="com.appsflyer.SingleInstallBroadcastReceiver" android:exported="true">
				    <intent-filter>
				         <action android:name="com.android.vending.INSTALL_REFERRER" />
				    </intent-filter>
				</receiver>
				
				<receiver android:name="com.amazon.device.iap.ResponseReceiver">
					<intent-filter>
						<action android:name="com.amazon.inapp.purchasing.NOTIFY"
							android:permission="com.amazon.inapp.purchasing.Permission.NOTIFY"/>
					</intent-filter>
				</receiver>
				
				<activity android:name="com.adcolony.sdk.AdColonyInterstitialActivity"
                  android:configChanges="keyboardHidden|orientation|screenSize"
                  android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
				<activity android:name="com.adcolony.sdk.AdColonyAdViewActivity"
                  android:configChanges="keyboardHidden|orientation|screenSize"
                  android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
				
				<meta-data android:name="com.facebook.sdk.ApplicationId" 
                       android:value="fb887629107950746"/>
				
				<meta-data android:name="android.max_aspect" android:value="2.5"/>

				<activity android:name="com.facebook.FacebookActivity" 
                      android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:label="Castle Clicker"/>

				<activity android:name="com.freshplanet.ane.AirFacebook.LoginActivity" 
                      android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" />

			</application>
		
		</manifest>
		
	]]></manifestAdditions>
</android>
<iPhone> 
    <InfoAdditions><![CDATA[ 
	
		<key>UIStatusBarStyle</key> 
		<string>UIStatusBarStyleBlackOpaque</string> 
		<key>UIRequiresPersistentWiFi</key> 
		<string>YES</string>
		<key>UIPrerenderedIcon</key>  
		<true/>
		<key>UIApplicationExitsOnSuspend</key>
		<false/>
		<key>NSLocationWhenInUseUsageDescription</key> 
		<string>Sample description to allow geolocation when application is in foreground</string>
		
		<key>UIDeviceFamily</key>
		<array>
			<!-- iPhone support -->
			<string>1</string> 
			<!-- iPad support -->
			<string>2</string>
		</array>
			
    ]]></InfoAdditions> 
	<requestedDisplayResolution>high</requestedDisplayResolution>
</iPhone> 

<extensions>
		 <extensionID>com.freshplanet.ane.AirFacebook</extensionID>
		<extensionID>com.appsflyer.adobeair</extensionID>
	
		<extensionID>com.chartboost.plugin.air</extensionID>
		<extensionID>com.freshplanet.AirFlurry</extensionID>
		<extensionID>com.amazon.device.iap.cpt.AmazonIapV2Extension</extensionID>
		<extensionID>com.applovin.sdk.air</extensionID>
	
		<extensionID>com.adcolony.airadc.AirAdColony</extensionID>
	
		<extensionID>com.distriqt.Dialog</extensionID>
		<extensionID>com.distriqt.androidsupport.V4</extensionID>
		<extensionID>com.distriqt.Core</extensionID>
		<extensionID>com.distriqt.Notifications</extensionID>
		<extensionID>com.distriqt.playservices.Ads</extensionID>
		<extensionID>com.distriqt.playservices.Base</extensionID>
	
		<extensionID>com.freshplanet.ane.AirInAppPurchase</extensionID>
	
		<extensionID>com.distriqt.androidsupport.AppCompatV7</extensionID>
		<extensionID>com.distriqt.androidsupport.CardViewV7</extensionID>
</extensions>

<initialWindow>
	<title>ClickerNew</title>
	<content>ClickerNew.swf</content>
	<visible>true</visible>
	<fullScreen>true</fullScreen>
	<autoOrients>false</autoOrients>
	<aspectRatio>portrait</aspectRatio>
	<renderMode>direct</renderMode>
	<resizable>true</resizable>
	<!--<depthAndStencil>true</depthAndStencil>--> <!-- required for 3D -->
</initialWindow>

because it is not only your app that need to be converted to 64-bit but all the ANE too

I was under the impression that any ANEs that were only 32bit would give the ‘native implementation’ warning when the app is building. I had two of those which I replaced. How do I know which ANEs are 32bit only or have 64bit support?

I think I got it, you have to turn the ANE into a zip and see if there’s an ARM64 folder.

I’m realizing that I severely underestimated how dead Adobe Air is. Six months past the original due date for 64bit Apks, and major ANE’s, such as Amazon In App Purchases, never bothered to upgrade. Yeesh.

Got a build running, but every single one of my ANEs got wrecked besides AdColony and my Distriqt ones. That’s… Disastrous. Guess I have to go get some more distriqt ones.

Just a note, our InAppBilling ANE supports Amazon now so should be an easy replacement for the Amazon InAppPurchases ANE.

2 Likes

that’s unfair to say that

Adobe AIR put in place the mechanism so dev can add ANE
which is a fucking great feature “the sky is the limit” we can add any native code we want

but …

dev working with AIR, and especially on mobile, have a tendency to just use those ANE as candy bars

so when the Android platform tell you “hey no bueno, now you gonna have to do stuff in 64-bit”

how is it that Adobe AIR is dead?

nope, Adobe AIR can still produce those ANE in many different CPU architecture,
but the dev HAVE TO manage them

eg. if I build an AIR app for that particular CPU architecture
then all the ANE I use for this app HAVE TO be of the same CPU architecture

That most of all the candy bars you used before are not compatible for 64-bit
is not the fault of Adobe AIR


that’s a vendor thing, some vendor updated their ANE to 64-bit, other didn’t
still… not Adobe AIR fault

In fact, I would say that is your fault, or at least your responsibility as a dev, to not have checked that earlier.

So I would suggest to abstract all your ANE use like some other Adobe AIR API
that need to be checked with isSupported

removing all the ANE should have the build run without crash
then add or replace one by one those ANE till everything is in place

maybe you would need to compile some ANE yourself, the open source ones
probably you would have to replace commercial ANE with other ones, that support 64-bit

1 Like

Also, if you are stuck most ANEs we can help convert to support Android 64bit reasonably quickly as most are built with java code alone which is not inherently 32 or 64 bit.

1 Like