Announcement

Collapse
No announcement yet.

Packaging for Android Shipping-Chartboost.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Packaging for Android Shipping-Chartboost.

    Hi, Everyone

    I am trying to integrate Chartboost for my android project.
    I download Unreal Engine-4.10 from github few days ago.
    I have added the chartboost.jar, code with the android ad banner implementation as a reference, and extra settings for <activity> section, in the package settings.
    I have built the following configurations with Visual studio 2013: Development Editor - Win 64, Development - Android, Shipping - Android. Everything compiled without errors.
    I can see the blueprint node to show an interstitial Chartboost Ad in the editor and i have packaged a development android example.I tested in a device and from the Chartboost dashboard i see confirmation that chartboost was integrated, although i didn't see any test ads in the device. Still might need to check some things in the code, manifest file or in the dashboard settings.

    The thing is when i try to build a shipping configuration, i got an build error, probably something to do with proguard.


    At Chartboost Android SDK Guide there is the following step:

    If you plan to use Proguard, add the following to your proguard.cfg (also make sure you follow Proguard instructions for the Google Play Services library):

    -keep class com.chartboost.** { *; }


    How can we change the proguard settings and manifest file for version 4.10?

    I have attached my log file.

    Any feedback is highly appreciated,
    Makis.
    Attached Files
    Last edited by Makis; 11-19-2015, 06:20 PM.
    Pandora Entertainment
    github.com/PandoraEntertainment
    [PLUGIN][FREE] AdColony, AppLovin, Chartboost, UnityAds, Vungle, Sharing, OneSignal, Facebook, Everyplay.

    #2
    Hi Makis,

    For 4.10 there is now support to add entries to proguard. Add a ProguardAdditions.txt file to your project's Build/Android directory with any additions you want.

    Comment


      #3
      Hi Chris,

      Thank you for your reply.

      I add the ProguardAdditions.txt to my project's Build/Android directory, with the addition:
      -keep class com.chartboost.** { *; }

      but i get the same error.

      By the way is there a similar method to create a custom android manifest file, with adding a .txt file at Build/Android directory?
      Pandora Entertainment
      github.com/PandoraEntertainment
      [PLUGIN][FREE] AdColony, AppLovin, Chartboost, UnityAds, Vungle, Sharing, OneSignal, Facebook, Everyplay.

      Comment


        #4
        Hi Makis,

        I just tried it and I see the com.chartboost.** added to my project's Intermediate/Android/APK/proguard-project.txt before -keep class com.oculus.**. Try deleting the proguard-project.txt in this directory and packaging again so it regenerates it if you don't see this.

        Comment


          #5
          Hi Chris,

          I already saw this. It is added to my project's Intermediate/Android/APK/proguard-project.txt

          I cloned the project without the chartboost blueprint node and build it with the launcher.

          It successfully builds the shipping configuration.

          It has almost the same log, without the proguard warning about the Chartboost library

          But with the source i still can't build a shipping android configuration.
          Pandora Entertainment
          github.com/PandoraEntertainment
          [PLUGIN][FREE] AdColony, AppLovin, Chartboost, UnityAds, Vungle, Sharing, OneSignal, Facebook, Everyplay.

          Comment


            #6
            The latest Chartboost SDK supports Target SDK Version to API Level 23. Is there a chance that this is what causing the build error.

            I searched the net and saw similar warnings because they were using a "targetSdkVersion" setting that is less than 23.

            I contacted Chartboost support team and they mentioned it too.

            Unreal Engine 4.10 from github uses AndroidWorks 1R1 and Target SDK Version to API Level 22
            Last edited by Makis; 11-19-2015, 06:04 PM.
            Pandora Entertainment
            github.com/PandoraEntertainment
            [PLUGIN][FREE] AdColony, AppLovin, Chartboost, UnityAds, Vungle, Sharing, OneSignal, Facebook, Everyplay.

            Comment


              #7
              Hi Makis,

              The targetSdkVersion setting in the Android Project Settings is only used to set the AndroidManifest.xml value so you can try setting it to 23, but it will still use the setting in Android SDK for the SDK platform version. Setting this value to android-23 will not work, though, due to a depreciated API issue in Google's APK expansion library; they removed it android-23.

              Comment


                #8
                Hi Chris,

                I have tried it, setting to 23 but i am getting the same build error.

                I will look at it again tomorrow... almost 2:00 AM here.

                Maybe is something with my code or the manifest file.

                Thanks again for helping me out.
                Pandora Entertainment
                github.com/PandoraEntertainment
                [PLUGIN][FREE] AdColony, AppLovin, Chartboost, UnityAds, Vungle, Sharing, OneSignal, Facebook, Everyplay.

                Comment


                  #9
                  Hello again,

                  I gave it another try today. First removed any code related with Chartboost and the chartboost.jar form the C:\UnrealEngine-4.10\Engine\Build\Android\Java\libs directory. Then, i have built again the Shipping-Android configuration and could build a shipping configuration for my game. Just to make sure the build from source was working in shipping configuration without tweaking the source code. Then i added the chartboost.jar to the C:\UnrealEngine-4.10\Engine\Build\Android\Java\libs directory, without adding any code, and tried to package again a shipping build for the game, but the same error occurred.

                  After that, i have deleted the chartboost.jar and replace it with one from an older SDK version. Finally i could package a shipping build. Although the sdk is pretty old. I have contacted Chartboost Support team, if there is any archive with older SDKs. Hoping to find the last one before the SDK 6.0.2 release.

                  If they contact me, i will try again to implement the SDK and will update the thread.
                  Pandora Entertainment
                  github.com/PandoraEntertainment
                  [PLUGIN][FREE] AdColony, AppLovin, Chartboost, UnityAds, Vungle, Sharing, OneSignal, Facebook, Everyplay.

                  Comment


                    #10
                    Hi,

                    I had the same error in UE 4.7.6 after adding chartboost.jar v6.1.0:
                    Code:
                    MainFrameActions: Packaging (Android (ETC1)):  [proguard] Warning: com.chartboost.sdk.c: can't find referenced method 'int checkSelfPermission(java.lang.String)' in class android.app.Activity
                    MainFrameActions: Packaging (Android (ETC1)):  [proguard]       You should check if you need to specify additional program jars.
                    MainFrameActions: Packaging (Android (ETC1)):  [proguard] Warning: there were 1 unresolved references to program class members.
                    MainFrameActions: Packaging (Android (ETC1)):  [proguard]          Your input classes appear to be inconsistent.
                    MainFrameActions: Packaging (Android (ETC1)):  [proguard]          You may need to recompile them and try again.
                    MainFrameActions: Packaging (Android (ETC1)):  [proguard]          Alternatively, you may have to specify the option 
                    MainFrameActions: Packaging (Android (ETC1)):  [proguard]          '-dontskipnonpubliclibraryclassmembers'.
                    I fixed this by adding these two lines to my Engine\Build\Android\Java\proguard-project.txt:
                    Code:
                    -keep class com.chartboost.** { *; } 
                    -dontwarn android.app.Activity
                    The second line makes the error go away and the app runs fine on a shipping build but it looks more like a work-around than an actual fix...

                    Comment


                      #11
                      Hi PeterB,

                      With the latest Chartboost sdk even with proguard configuration adding:

                      Code:
                      -keep class com.chartboost.** { *; } 
                      -dontwarn android.app.Activity
                      you cannot build for shipping.

                      I use 5.3.3 sdk and you can package with a shipping configuration.

                      But the sdk doesn't integrate well, i can't show Interstitials and get crashes.

                      Have you managed to show an Interstitial, live or test ad?

                      I have tried few more sdks from other providers and so far AppLovin seems to work. I get interstitial test ads (videos and images).

                      I am trying to add few more blueprint nodes to expose AdMob and AppLovin functionality for interstitials.

                      Check the thread:

                      https://forums.unrealengine.com/show...tial-Admob-Ads
                      Pandora Entertainment
                      github.com/PandoraEntertainment
                      [PLUGIN][FREE] AdColony, AppLovin, Chartboost, UnityAds, Vungle, Sharing, OneSignal, Facebook, Everyplay.

                      Comment

                      Working...
                      X