AppsFlyerSDK / AdobeAirExtension-AppsFlyer

Adobe Air Extension for AppsFlyer
24 stars 22 forks source link

Android Errors - java.lang.IllegalAccessException #10

Closed dcampano closed 8 years ago

dcampano commented 8 years ago

I'm seeing the following crash error on some Android devices when using the latest ANE.

Unable to instantiate receiver com.appsflyer.AppsFlyerLib: java.lang.IllegalAccessException: void com.appsflyer.AppsFlyerLib.() is not accessible from java.lang.Class

This is causing our app to crash on launch.

dcampano commented 8 years ago

Here is some more of the error message:

Caused by: java.lang.IllegalAccessException: private com.appsflyer.AppsFlyerLib() is not accessible from class android.app.ActivityThread

I have not been able to duplicate this issue on my own devices but have several users that can no longer launch our app after installing an update due to this error.

golts commented 8 years ago

@dcampano Can you provide full console logs we need it to determine context of this exception. Also AS3 application .app.xml configuration file is needed for future problem investigation.

dregerATiTD commented 8 years ago

This is an old issue. AppsFlyer causes our app to crash on many devices and always has :( Unfortunatly, AppsFlyer is a requirement for FB advertising in our company or I'd ditch it.

lvlonggame commented 8 years ago

Remove this code segment from your AndroidManifest.xml, see below:

` android:name="com.appsflyer.AppsFlyerLib">

`

dregerATiTD commented 8 years ago

You mean this entire section: `

        </receiver>`

I'll try without that, but isn't it required for tracking uninstalls?

shachar-af commented 8 years ago

This is the exact requirement for tracking uninstalls:

        <receiver
            android:name="com.appsflyer.MultipleInstallBroadcastReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER" />
            </intent-filter>
        </receiver>

Also, this receiver should be located first (in the manifest) among other receivers with the same intent-filter action.

zelaaa commented 8 years ago

Hi, I have the same issue and according to appsflyer support removing this section is a bad idea "this is mandatory for integrating Appsflyer SDK.", but they didn't give me any other solution.

shachar-af commented 8 years ago

All, Please note that AppsFlyer's Android SDK v4.4.0 is no longer supporting this receiver in the manifest:

<receiver android:name="com.appsflyer.AppsFlyerLib">
    <intent-filter>
        <action android:name="android.intent.action.PACKAGE_REMOVED"/>
        <data android:scheme="package"/>
    </intent-filter> 
</receiver>

So if you are using any version equal or above 4.4.0, Please remove this receiver from your manifest file.

The only mandatory receiver for the SDK is the one I mentioned in my previous comment:

<receiver
    android:name="com.appsflyer.MultipleInstallBroadcastReceiver"
    android:exported="true">
        <intent-filter>
            <action android:name="com.android.vending.INSTALL_REFERRER" />
        </intent-filter>
</receiver>