mobfox / MobFox-Android-SDK

26 stars 21 forks source link

Startapp adapter doesn't work #66

Open freakBoy008 opened 7 years ago

freakBoy008 commented 7 years ago

Hi,

Startapp adapter doesn't work for me if i want to add Startapp custom events. I'm always getting this on logcat;

D/MobFoxBanner: iterator class not found exception

Tried several versions of MobFox SDK, Startapp SDK. Also tried the old adapter for startapp and smaato. Also downgraded the target SDK to 25, but no success. Of course i've also set up the custom event on MobFox control panel.

gradle dependencies:

compile 'com.startapp:inapp-sdk:3.6.6' compile files('libs/MobFox-Android-Startapp-Custom.jar') Manifest permissions: <uses-permission android:name="android.permission.INTERNET" <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"

Manifest entries under application tag: <activity android:name="com.startapp.android.publish.ads.list3d.List3DActivity" android:theme="@android:style/Theme"

<activity android:name="com.startapp.android.publish.adsCommon.activities.OverlayActivity"
    android:theme="@android:style/Theme.Translucent"
    android:configChanges="orientation|keyboardHidden|screenSize" />

<activity android:name="com.startapp.android.publish.adsCommon.activities.FullScreenActivity"
    android:theme="@android:style/Theme"
    android:configChanges="orientation|keyboardHidden|screenSize" />

<service android:name="com.startapp.android.publish.common.metaData.PeriodicMetaDataService" 

<service android:name="com.startapp.android.publish.common.metaData.InfoEventService" <receiver android:name="com.startapp.android.publish.common.metaData.BootCompleteListener" <intent-filter action android:name="android.intent.action.BOOT_COMPLETED" /intent-filter /receiver

Best regards, freakBoy008

nabriski commented 7 years ago

Hi,

It's probably that Startapp changed their SDK and our custom event is not up to date (it's pretty old). We'll have to revisit our adapter next week with the latest Startapp SDK and make the necessary changes. We'll send you a version to try as soon as we have it.

Thanks

freakBoy008 commented 7 years ago

Hey,

thanks a lot!

Best regards, freakBoy008

shahafss commented 7 years ago

Hi Sanchez, Please try this MobFox-Android-StartApp-Adapter. We'll be happy to hear your feedback.

MobFox-Android-Startapp-Custom-New.jar.zip

Best, -Shahaf

freakBoy008 commented 7 years ago

Hi Shahaf,

thank you, i get an error with this adapter when i run my project:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lsdk/mobfox/com/mobfox_android_adapter_facebook/BuildConfig;

I'm using the latest stable Android Studio release. Cleans/rebuilds didn't help.

Best regards

shahafss commented 7 years ago

Please add to your build.gradle(Module):

android { defaultConfig { ... minSdkVersion 15 targetSdkVersion 26 multiDexEnabled true } ... }

For more info about multidex: https://developer.android.com/studio/build/multidex.html

Best, -Shahaf

freakBoy008 commented 7 years ago

Already tried this, got this error (i used both compile and target SDK 25 and 26):

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: sdk/mobfox/com/mobfox_android_adapter_facebook/BuildConfig.class

Best regards, Sanchez

shahafss commented 7 years ago

Try adding this to your compile FAN sdk on build.gradle:

compile ('com.facebook.android:audience-network-sdk:4.26.0'){ exclude group: 'com.google.android.gms' }

and run ./gradlew clean

freakBoy008 commented 7 years ago

Also added this and of course done cleans/rebuilds, but i'm still getting the same error if i run the project:

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: sdk/mobfox/com/mobfox_android_adapter_facebook/BuildConfig.class

i'm using the latest versions and multidex: multiDexEnabled = true, compile and target SDK 26, buildtools 26.0.2, play services 11.4.0

shahafss commented 7 years ago

Maybe you can send us a demo project in which it happens ?

freakBoy008 commented 7 years ago

Of course: https://www.dropbox.com/s/g11xh5a9p1pk2jg/MyApplication.zip

shahafss commented 7 years ago

This project compiles without a problem for me

freakBoy008 commented 7 years ago

Strange, i also updated java but i'm still getting this error. I don't know what's wrong...