Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
saleh923

Junior Member
Registered:
Posts: 2
Reply with quote  #1 

I am developing a game using Libgdx and I am trying to use chartboost ads to my game.

I had followed the instructions in their documents but I can't import the chartboost sdk to my class.

I had added the jar file to libs file  and added this code to the build gradle ( project):

compile fileTree(dir: 'libs', include: '*.jar')
compile files('libs/chartboost.jar')
compile ('com.google.android.gms:play-services:9.2.1')


and added this code to the manifest:
 
<activity android:name="com.chartboost.sdk.CBImpressionActivity"
android:excludeFromRecents="true"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
android:configChanges="keyboardHidden|orientation|screenSize" />

<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />



but when I am trying to import the sdk it gives me error:

import com.chartboost.sdk.Chartboost; 
import com.chartboost.sdk.CBLocation;
import com.chartboost.sdk.ChartboostDelegate;


this is the error:

Error[frown]19, 1) error: package com.chartboost.sdk does not exist

 
0
XdebugX

Avatar / Picture

Registered:
Posts: 374
Reply with quote  #2 
Quote:
Originally Posted by saleh923

I am developing a game using Libgdx and I am trying to use chartboost ads to my game.

I had followed the instructions in their documents but I can't import the chartboost sdk to my class.

I had added the jar file to libs file  and added this code to the build gradle ( project):

compile fileTree(dir: 'libs', include: '*.jar')compile files('libs/chartboost.jar')compile ('com.google.android.gms:play-services:9.2.1')


and added this code to the manifest:
 
<activity android:name="com.chartboost.sdk.CBImpressionActivity"android:excludeFromRecents="true"android:hardwareAccelerated="true"android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"android:configChanges="keyboardHidden|orientation|screenSize" /><meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />



but when I am trying to import the sdk it gives me error:

import com.chartboost.sdk.Chartboost; import com.chartboost.sdk.CBLocation; import com.chartboost.sdk.ChartboostDelegate;


this is the error:

Error[frown]19, 1) error: package com.chartboost.sdk does not exist

 


Hi, sorry for the late reply. I made a short video on how to import the chartboost sdk .jar file into your libGDX project for Android Studio. If your not using Android Studio and using Eclipse, reply and I'll make a video showing how to do it in Eclipse.

0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.