1. Are you ready for the Galaxy S20? Here is everything we know so far!

Need help with mobclix!

Discussion in 'Android Lounge' started by lot577, Dec 21, 2011.

  1. lot577

    lot577 Lurker
    Thread Starter

    Hi!
    I was trying to integrate mobclix into my android application which is sdk 2.2. However, the program always crashes when it runs. I tried to make the simplest program possible to test if mobclix ads are working.

    =====================================================
    public class TestAdsActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    }
    }

    =====================================================
    In the manifest
    ...


    <meta-data android:name="id# (I put it in here)"
    android:value="id# (I put it in here)"/>
    <activity
    android:name="com.mobclix.android.sdk.MobclixBrowserActivity"
    android:theme="@android:style/Theme.Translucent.NoTitleBar"
    />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission
    android:name="android.permission.ACCESS_NETWORK_STATE" />

    ...

    =====================================================
    and the main.xml:
    ...
    <com.mobclix.android.sdk.MobclixMMABannerXLAdView
    android:id="@+id/banner_adview"
    android:layout_width="320dip"
    android:layout_height="50dip"
    android:layout_gravity="center" />

    ...
    =====================================================
    This is the logcat output.

    12-21 15:03:02.241: I/Process(1520): Sending signal. PID: 1520 SIG: 9
    12-21 15:03:05.681: W/dalvikvm(1546): threadid=7: thread exiting with uncaught exception (group=0x4001d800)
    12-21 15:03:05.761: E/AndroidRuntime(1546): FATAL EXCEPTION: AsyncTask #1
    12-21 15:03:05.761: E/AndroidRuntime(1546): java.lang.RuntimeException: An error occured while executing doInBackground()
    12-21 15:03:05.761: E/AndroidRuntime(1546): at android.os.AsyncTask$3.done(AsyncTask.java:200)
    12-21 15:03:05.761: E/AndroidRuntime(1546): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
    12-21 15:03:05.761: E/AndroidRuntime(1546): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
    12-21 15:03:05.761: E/AndroidRuntime(1546): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
    12-21 15:03:05.761: E/AndroidRuntime(1546): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
    12-21 15:03:05.761: E/AndroidRuntime(1546): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
    12-21 15:03:05.761: E/AndroidRuntime(1546): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
    12-21 15:03:05.761: E/AndroidRuntime(1546): at java.lang.Thread.run(Thread.java:1096)
    12-21 15:03:05.761: E/AndroidRuntime(1546): Caused by: android.content.res.Resources$NotFoundException: com.mobclix.APPLICATION_ID not found in the Android Manifest xml.
    12-21 15:03:05.761: E/AndroidRuntime(1546): at com.mobclix.android.sdk.Mobclix.initialize(Mobclix.java:571)
    12-21 15:03:05.761: E/AndroidRuntime(1546): at com.mobclix.android.sdk.FetchRemoteConfig.doInBackground(MobclixConfig.java:52)
    12-21 15:03:05.761: E/AndroidRuntime(1546): at com.mobclix.android.sdk.FetchRemoteConfig.doInBackground(MobclixConfig.java:1)
    12-21 15:03:05.761: E/AndroidRuntime(1546): at android.os.AsyncTask$2.call(AsyncTask.java:185)
    12-21 15:03:05.761: E/AndroidRuntime(1546): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
    =====================================================


    Thanks in advance to anyone who tries to help!!
     



    1. Download the Forums for Android™ app!


      Download

       
  2. abu3antar

    abu3antar Lurker

    Make sure that the permissions come before the application tag, and the rest are inside the application tag:

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission
    android:name="android.permission.ACCESS_NETWORK_ST ATE" />

    <application ----->

    -----
    <meta-data android:name="id# (I put it in here)"
    android:value="id# (I put it in here)"/>
    <activity
    android:name="com.mobclix.android.sdk.MobclixBrows erActivity"
    android:theme="@android:style/Theme.Translucent.NoTitleBar"
    />


    </application
     
Loading...

Share This Page

Loading...