Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

AdMob plugin that works in Unity 3.2

Discussion in 'Android' started by Wozik, Feb 11, 2011.

  1. Navinfo

    Navinfo

    Joined:
    May 3, 2011
    Posts:
    3
    I went through the steps but I couldn't get the plugin to operate. I rewrote both the "device_id" and "publisher_id", then I rebuilt again, but after the building and runnin of the device nothing happened. The "adb" didn't write out any information about any ads would have been received. I use Unity 3.2 and Galaxy Tab. So please give me advice, what could I do?
     
  2. syslord2k2

    syslord2k2

    Joined:
    Apr 12, 2011
    Posts:
    23
    Navinfo: I would suggest to provide further information, e.g. your AdbmobTestActivity.java and your AndroidManifest.xml.
     
  3. Deleted User

    Deleted User

    Guest

    I got a few freeze reports in my Android Market publisher account with this error:

    ANR keyDispatchingTimedOut in AdMobTestActivity

    Not a high priority issue for me since that's out of a few thousand downloads, but FYI...
     
  4. Celulonio

    Celulonio

    Joined:
    Apr 14, 2011
    Posts:
    20
    Could anybody post the code to call 'ShowAd ()' and 'HideAd()' from a unity script?

    Thanks!
     
  5. syslord2k2

    syslord2k2

    Joined:
    Apr 12, 2011
    Posts:
    23
    DigitalJoker: i already posted it on the second page of this thread when mmuller asked the same questions
     
  6. lyh1

    lyh1

    Joined:
    Jun 30, 2010
    Posts:
    92
    I got the plugin and modify it so much according to the thread.
    I add the reference of the most recent admob SDK.
    Finally it run on my phone, but no Ad show up. Even the space of the null Ad doesn't showup.
    and from the log , I keep receive following error.

    I/AdMobSDK(10636): No fill. Server replied that no ads are available (1697ms)
    D/AdListener(10636): onFailedToReceiveAd: com.admob.android.ads.AdView@4059e968

    There are no request on my Admob site, so I am wondering my phone have some hack blocked the Admob or there are some setup is wrong, so the admob show nothing.
    Anyone successfully show a Ad on their App?
     
  7. conedog

    conedog

    Joined:
    Jul 12, 2010
    Posts:
    50
    Have you tried what syslord2k2 suggested in an earlier reply? Enabling google adsense in my admob account worked for me...

     
  8. lyh1

    lyh1

    Joined:
    Jun 30, 2010
    Posts:
    92
    I rewrite the plug-in with newest Admob SDK. Now It get the Ads and show in logcat, but show nothing on screen.
    And it even crash if I didn't turn on any connection.
    The Log I got:
    E/SurfaceFlinger( 226): wait GPU compositionComplete time: 1255035.397000 us
    D/skia ( 3566): MaLOG: [CacheBuilder] ADDRESS_DETECT_BY_LIB is not defined!!
    I/Ads ( 3566): Received ad url: <"url": "http://r.admob.com:80/ad_source.php
    ?preqs=0&u_sd=1.5&slotname=a14dee479e6ea4e&u_w=320&msid=org.example.AdMobTest&js
    =afma-sdk-a-v4.1.0&isu=CF95DC53F383F9A836FD749F3EF439CD&format=320x50_mb&net=ed
    app_name=1.android.org.example.AdMobTest&hl=zh&u_h=533&u_audio=1&u_so=p&output=h
    tml&region=mobile_app&u_tz=-480&ex=1&client_sdk=1", "afmaNotifyDt": "null">
    W/Ads ( 3566): IOException connecting to ad url.
    W/Ads ( 3566): java.net.ConnectException: r.admob.com/127.0.0.1:80 - Connect
    ion refused
    W/Ads ( 3566): at org.apache.harmony.luni.net.PlainSocketImpl.connect(P
    lainSocketImpl.java:254)
    W/Ads ( 3566): at org.apache.harmony.luni.net.PlainSocketImpl.connect(P
    lainSocketImpl.java:533)
    W/Ads ( 3566): at java.net.Socket.connect(Socket.java:1055)
    W/Ads ( 3566): at org.apache.harmony.luni.internal.net.www.protocol.htt
    p.HttpConnection.<init>(HttpConnection.java:62)
    W/Ads ( 3566): at org.apache.harmony.luni.internal.net.www.protocol.htt
    p.HttpConnectionPool.get(HttpConnectionPool.java:88)
    W/Ads ( 3566): at org.apache.harmony.luni.internal.net.www.protocol.htt
    p.HttpURLConnectionImpl.getHTTPConnection(HttpURLConnectionImpl.java:927)
    W/Ads ( 3566): at org.apache.harmony.luni.internal.net.www.protocol.htt
    p.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:909)
    W/Ads ( 3566): at b.a(Unknown Source)
    W/Ads ( 3566): at b.doInBackground(Unknown Source)
    W/Ads ( 3566): at android.os.AsyncTask$2.call(AsyncTask.java:185)
    W/Ads ( 3566): at java.util.concurrent.FutureTask$Sync.innerRun(FutureT
    ask.java:305)
    W/Ads ( 3566): at java.util.concurrent.FutureTask.run(FutureTask.java:1
    37)
    W/Ads ( 3566): at java.util.concurrent.ThreadPoolExecutor.runWorker(Thr
    eadPoolExecutor.java:1068)
    W/Ads ( 3566): at java.util.concurrent.ThreadPoolExecutor$Worker.run(Th
    readPoolExecutor.java:561)
    W/Ads ( 3566): at java.lang.Thread.run(Thread.java:1102)
    W/dalvikvm( 3566): JNI: DeleteGlobalRef(0xd9422aa7) failed to find entry (valid=
    0)
    W/dalvikvm( 3566): JNI: DeleteGlobalRef(0xd9422a87) failed to find entry (valid=
    0)
    D/webviewglue( 3566): nativeDestroy view: 0x45dfc0
    I/Ads ( 3566): onFailedToReceiveAd(A network error occurred.)
    D/AdListener( 3566): onFailedToReceiveAd: A network error occurred.

    My Plugin Code:
    Code (csharp):
    1.  
    2. public class AdMobTestActivity extends UnityPlayerActivity implements AdListener
    3. {
    4.  
    5.     protected void onCreate(Bundle savedInstanceState)
    6.     {
    7.         Log.i("AdMobTest", "onCreate");
    8.  
    9.         // super (UnityPlayerActivity) will use setContentView() ...
    10.         super.onCreate(savedInstanceState);
    11.  
    12.         // ... so instead of using setContentView(), we call addContentView() from setupAds()
    13.         setupAds();
    14.  
    15.         // Add test devices (check the logcat for the ID string of your device..)
    16.         //AdManager.setTestDevices( new String[] { "CF95DC53F383F9A836FD749F3EF439CD" } );
    17.     }
    18.    
    19.     public void onFailedToReceiveAd(Ad ad, AdRequest.ErrorCode error)
    20.     {
    21.         Log.d("AdListener", "onFailedToReceiveAd: " + error.toString());
    22.         //super.onFailedToReceiveAd(adView);
    23.     }
    24.    
    25.     public void onReceiveAd(Ad ad)
    26.     {
    27.         Log.d("AdListener", "onReceiveAd: " + ad.toString());
    28.         //super.onReceiveAd(adView);
    29.     }
    30.  
    31.    
    32.     public void onPresentScreen(Ad ad)
    33.     {
    34.        
    35.     }
    36.    
    37.     public void onDismissScreen(Ad ad)
    38.     {
    39.          
    40.     }
    41.    
    42.     public void onLeaveApplication(Ad ad)
    43.     {
    44.        
    45.     }
    46.  
    47.     public void HideAd()
    48.     {
    49.         // Hide the ad.
    50.         adView.setVisibility(View.GONE);
    51.  
    52.         // Fade the ad in over 4/10 of a second.
    53.         AlphaAnimation animation = new AlphaAnimation(0.0f, 1.0f);
    54.         animation.setDuration(400);
    55.         animation.setFillAfter(true);
    56.         animation.setInterpolator(new AccelerateInterpolator());
    57.         adView.startAnimation(animation);//*/
    58.  
    59.     }
    60.  
    61.  
    62.  
    63.     public void ShowAd()
    64.     {
    65.         // Unhide the ad.
    66.         adView.setVisibility(View.VISIBLE);
    67.  
    68.         // Fade the ad in over 4/10 of a second.
    69.         AlphaAnimation animation = new AlphaAnimation(0.0f, 1.0f);
    70.         animation.setDuration(400);
    71.         animation.setFillAfter(true);
    72.         animation.setInterpolator(new AccelerateInterpolator());
    73.         adView.startAnimation(animation);//*/
    74.     }
    75.  
    76.     private AdView adView;
    77.     private void setupAds()
    78.     {
    79.         /* These are the default values taken from attrs.xml / layout.xml
    80.  
    81.         <declare-styleable name="com.admob.android.ads.AdView">
    82.             <attr name="backgroundColor" format="color" />
    83.             <attr name="primaryTextColor" format="color" />
    84.             <attr name="secondaryTextColor" format="color" />
    85.             <attr name="keywords" format="string" />
    86.             <attr name="refreshInterval" format="integer" />
    87.         </declare-styleable>
    88.  
    89.         <LinearLayout
    90.             xmlns:android="http://schemas.android.com/apk/res/android"
    91.             xmlns:myapp="http://schemas.android.com/apk/res/com.example.SampleApp"
    92.             android:orientation="vertical"
    93.             android:layout_width="fill_parent"
    94.             android:layout_height="fill_parent">
    95.  
    96.             <com.admob.android.ads.AdView android:id="@+id/ad"
    97.                 android:layout_width="fill_parent"
    98.                 android:layout_height="wrap_content"
    99.                 myapp:backgroundColor="#000000"
    100.                 myapp:primaryTextColor="#FFFFFF"
    101.                 myapp:secondaryTextColor="#CCCCCC"
    102.             />
    103.         </LinearLayout>
    104.         */
    105.  
    106.         // And this is the same, but done programmatically
    107.  
    108.         LinearLayout layout = new LinearLayout(this);
    109.         layout.setOrientation(LinearLayout.VERTICAL);
    110.         addContentView(layout, new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
    111.  
    112.         adView = new AdView(this,AdSize.BANNER,"a14dee479e6ea4e");
    113.         layout.addView(adView, new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
    114.            
    115.            // adView.setBackgroundColor(0xff000000);
    116.            // adView.setPrimaryTextColor(0xffffffff);
    117.             //adView.setSecondaryTextColor(0xffcccccc);
    118. //          adView.setKeywords("Android game");
    119. //          adView.setRequestInterval(15);
    120.  
    121.         // add listener for easier debugging
    122.             adView.setAdListener(this );
    123.            
    124.             AdRequest request = new AdRequest();
    125.             request.addTestDevice("CF95DC53F383F9A836FD749F3EF439CD");
    126.            
    127.             adView.loadAd(new AdRequest());
    128.             adView.setVisibility(View.VISIBLE);
    129.     }
    130. }
    131.  
    Edit1:
    I found that, the problem of receiving a ad but not showing is a problem of my Rom.
    After flashing another Rom on my device the ads show correctly on my device.
    Sorry for disturbing.
     
    Last edited: Jun 19, 2011
  9. lyh1

    lyh1

    Joined:
    Jun 30, 2010
    Posts:
    92
    Another question, anyone try to use this plugin with other plugin?
    Let's say the QCAR SDK, It have it's own AndroidManifest.xml.
    So how can I merge two AndroidManifest.xml into one?
     
  10. JohnLeeroy

    JohnLeeroy

    Joined:
    Jun 8, 2011
    Posts:
    68
    Hey Guys,

    So i have been trying to get this working for the past few hours so I'll post my steps and hopefully you can catch an error.

    Made a new unity project. Imported the plugin package.
    I went into Player Settings for android and changed bundle identifier to "T.T.TEST"
    Went into AndroidManifest.xml and changed line 3 to
    package="T.T.TEST";
    Also put in my publisher ID.

    Went into AdMobTestActivity and changed line 1 to
    package="T.T.TEST";
    uncommented the following:
    adView.setKeywords("Android game");
    adView.setRequestInterval(15);

    called the following lines in terminal
    cd /Users/BLAH/android-sdk/tools
    /android update project -t 2 -p /Users/BLAH/AdMobTest/Assets/Plugins/Android
    cd /Users/BLAH/AdMobTest/Assets/Plugins/Android
    ant create-jar

    I build the project and get the error "Building DEX Failed"
    Can someone give me a hint to why this might be happening?

    Error:
    Building DEX Failed!
    <...>
    processing org/example/AdMobTest/AdMobTestActivity$1.class...
    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.lang.IllegalArgumentException: already added: Lorg/example/AdMobTest/AdMobTestActivity$1;
    at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
    at com.android.dx.dex.file.DexFile.add(DexFile.java:143)
    at com.android.dx.command.dexer.Main.processClass(Main.java:372)
    at com.android.dx.command.dexer.Main.processFileBytes(Main.java:346)
    at com.android.dx.command.dexer.Main.access$400(Main.java:59)
    at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:294)
    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:190)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:122)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
    at com.android.dx.command.dexer.Main.processOne(Main.java:313)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:233)
    at com.android.dx.command.dexer.Main.run(Main.java:185)
    at com.android.dx.command.dexer.Main.main(Main.java:166)
    at com.android.dx.command.Main.main(Main.java:90)
    1 error; aborting

    UnityEngine.Debug:LogError(Object)
    PostProcessAndroidPlayer:BuildDex(String, String, Single, Single)
    PostProcessAndroidPlayer:postProcess(BuildTarget, String, String, String, String, String, String, BuildOptions)
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
     
    Last edited: Jul 1, 2011
  11. zhapness

    zhapness

    Joined:
    Apr 10, 2011
    Posts:
    58
    Hi.
    Nice
     
    Last edited: Jul 4, 2011
  12. JohnLeeroy

    JohnLeeroy

    Joined:
    Jun 8, 2011
    Posts:
    68
    When calling "ant create-jar", I get this warning during compile

    /Users/John/android-sdk/tools/ant/lib_rules.xml:162: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds

    Should there be any problems?
    --------------------------------------------------------------------------------------------------------------
    So i got a new project to work with the admob plugin but if I change the "org.example.admobtest" in player settings, androidmanifest.xml, and admobtestactivity.java, I get the error "DEX failed".

    Is there a place i am missing?
     
    Last edited: Jul 5, 2011
  13. zhapness

    zhapness

    Joined:
    Apr 10, 2011
    Posts:
    58
    ||
     
    Last edited: Jul 25, 2011
  14. JohnLeeroy

    JohnLeeroy

    Joined:
    Jun 8, 2011
    Posts:
    68
    The compile is actually within the console output you posted. You have a good version of Java, but is your ant version 1.8.2?

    A big error:
    [javac] C:\Users\Sebastian\Desktop\Unity\Android\AdmobTest Project\Assets\Plu
    gins\Android\src\org\example\AdMobTest\AdMobTestAc tivity.java:9: package com.uni
    ty3d.player does not exist

    Check if that exist at that directory.
    If everything builds, be sure to DELETE the old java class in your android/bin.



    I accomplished putting admob in my game. It crashes when a portrait scene is loaded though. Does anyone have this problem?
     
  15. zhapness

    zhapness

    Joined:
    Apr 10, 2011
    Posts:
    58
    ||
     
    Last edited: Jul 25, 2011
  16. Falin

    Falin

    Joined:
    Sep 29, 2009
    Posts:
    242
    I updated my AdMobTestActivity and made a script named 'Ads' with the C# functions.

    I made a c# script to disable the ads:
    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class DisableAds : Ads {
    5.  
    6.     // Use this for initialization
    7.     void Start () {
    8.     DisableAds();
    9.     }
    10.    
    11.     // Update is called once per frame
    12.     void Update () {
    13.    
    14.     }
    15. }
    16.  
    but every time I come in a scene where this script is the application quits.

    Edit:
    Oh and how do I position the ad somewhere else then the center?
    Edit(again):
    Already solved
     
    Last edited: Jul 19, 2011
  17. AdsySingle

    AdsySingle

    Joined:
    Jan 5, 2011
    Posts:
    116
    I am having a huge amount of difficulty here. I think there is something I am not understanding on a fundamental level. I managed to edit the .java and the AndroidManifest as needed. I managed to follow the steps in the command line to update the project. But when I call the line ant create-jar i get "'ant' is not recognized as an internal or external command". I went googling and found that ant was some sort of java command line tool and library. I have never heard of this before, but I downloaded it anyway. I set up the environment variable paths as per the manual. I still get this error.

    On top of this the package I got from this thread had no script in it to actually call anything in my game. From what I can gather from this thread we need to write it ourselves? (Or copy and paste what has been generously put up here). Seems very involved.
     
  18. MicroEyes_old

    MicroEyes_old

    Joined:
    Jun 9, 2011
    Posts:
    188
    i m currently working with intergrating AdMob in my game but stucked at one place... i unable to import com.unity3d.player.* and extend UnityPlayerActivity

    when i tried "ant create-jar" from command prompt, gives me error log.

    See this log..
    $notExtendsUnityPlayer.PNG


    i don't know, how ant will import com.unity3d.player from %unity%\Editor\Data\PlaybackEngines\androidplayer.

    i hav installed Android SDK and i hav classes.jar and classes.dex both file in %unity%\Editor\Data\PlaybackEngines\androidplayer\bin

    ANT_HOME is set correctly in Environment Variable...
    is i need to put any thing related to unity in Environment Variable?:confused:


    Edit 1:#
    I m done with AdMob thing.. and m running great..
     
    Last edited: Jul 29, 2011
  19. TheAssassin

    TheAssassin

    Joined:
    Jan 13, 2011
    Posts:
    51
    I had to install ant but then when I run "ant create-jar" it gives me this:
    I am using Unity 3.4 is that the problem?
     
    Last edited: Jul 28, 2011
  20. AdsySingle

    AdsySingle

    Joined:
    Jan 5, 2011
    Posts:
    116
    I'm very confused on how to actually use the package at the beginning of this post. I downloaded it and imported it into a completely empty project. It adds a folder called Plugin. Inside that is a folder called Android. Inside that is a few folders (bin, gen, libs, res, src) and a few files (AndroidManifest, build, build, default, local and proguard. Is this right? Should there be more?

    I just noticed that the second post on this forum says his game crashes, but did he do anything more than import all this? Is there documentation anywhere on what I need to do with this?

    I have read all the posts on this thread, but they are all talking about the app crashing or not working properly, I don't even know where to start to actually implement this into my game.
     
  21. AdsySingle

    AdsySingle

    Joined:
    Jan 5, 2011
    Posts:
    116
    I've tried following syslord2k2's instructions but the ant thing throws me. When I change the directory to my project folder and trye to type ant create-jar I get "'ant' is not recognized as an internal or external command. This doesn't surprise me because ant wasn't installed into that folder. Is there supposed to be something put into it? Did I miss a step?
    I noticed above someone mentions they "classes.jar and classes.dex both file in %unity%\Editor\Data\PlaybackEngines\androidplayer\ bin". What is that? I haven't heard of either of those things, or about having to put anything into the Editor folders. Clearly I'm missing something huge here.
     
  22. TheAssassin

    TheAssassin

    Joined:
    Jan 13, 2011
    Posts:
    51
    You need to install ant from here: http://ant.apache.org/
    Let me know if you get it to work. I haven't been able to, but I did get a bit farther than you. Ant is giving me a compiler error and I can't find the log it talks about so idk what it is doing.

    The reason there seems to be no documentation or instructions I believe is that the OpenFeint plugin was done first and there are some instructions in that post here: OpenFeint Plugin I think the op on this thread thought everyone had seen that already. (I missed it for awhile too.)
    There are some basic instructions in the unitypackage for OpenFeint, but if you have read all of this thread you have probably got all that already. What you were missing was ant.
     
  23. MicroEyes_old

    MicroEyes_old

    Joined:
    Jun 9, 2011
    Posts:
    188
    To Adsy,


    You have to add ANT_HOME to Environment Variable and restart system.
    e.g., my ANT_HOME: "C:\Android\android-sdk\tools\ant"
    and path : %ANT_HOME%\bin (where %ANT_HOME% refer to the above variable)
     
  24. MicroEyes_old

    MicroEyes_old

    Joined:
    Jun 9, 2011
    Posts:
    188
    To Adsy,

    "classes.jar" and "classes.dex" are unity packages for android player..
    if u don't hav , arrange them.
    They r in "C:\Program Files\Unity\Editor\Data\PlaybackEngines\androidplayer\bin" on my system.. check urs...

    to use them with ant u have to add "C:\Program Files\Unity\Editor\Data\PlaybackEngines\androidplayer\bin" or ur %unity%\Editor\Data\PlaybackEngines\androidplayer\bin" to Environment Variable to PATH variable
     
    Last edited: Jul 29, 2011
  25. MicroEyes_old

    MicroEyes_old

    Joined:
    Jun 9, 2011
    Posts:
    188
    To Assassin,

    u r unable to access unity packages that r in "C:\Program Files\Unity\Editor\Data\PlaybackEngines\androidplayer\bin" on my system..

    plz add ur unity android player's bin path to Environment Variable in PATH variable
     
  26. AdsySingle

    AdsySingle

    Joined:
    Jan 5, 2011
    Posts:
    116
    Thanks you heaps MicroEyes, that was perfectly clear and exactly what I was after. But I still get the same problem. 'ant' is not recognized as an internal or external command
     
  27. AdsySingle

    AdsySingle

    Joined:
    Jan 5, 2011
    Posts:
    116
    Anyone help me out any more with this? Have I perhaps written the Environment Variable entries incorrectly? I really need to figure this out.

    I have ANT_HOME added to User Variables (not System Variables) with the value C:\Program Files\Android\android-sdk\tools\ant

    I tried adding it to System Variables but it didn't change anything.

    I have the above mentioned paths added to the PATH System Variable.

    I still get ant is not a recognised command.


    *UPDATE
    I tried navigating to the folder where I downloaded and installed ant (was I supposed to do that, or is it supposed to already be in android tools?) and in that folder is an actual file called ant. So in the command prompt I tried typing the ant command when in that folder and I get
    "ANT_HOME" is set incorrectly or ant could not be located. Please set ANT_HOME"
    so what have I don't wrong here?
    Should I have installed ant 1.8.2 into android tools?
     
    Last edited: Aug 2, 2011
  28. MicroEyes_old

    MicroEyes_old

    Joined:
    Jun 9, 2011
    Posts:
    188
    To Adsy,

    Please Add ANT_HOME to System Variable and then restart ur System to get effect.
    and add "%ANT_HOME%\bin" exactly to ur Path in System Variables..

    and don't forget to restart ur system, i already made that request and fixed..
     
    Last edited: Aug 2, 2011
  29. TheAssassin

    TheAssassin

    Joined:
    Jan 13, 2011
    Posts:
    51
    Ok so I finally found that there is a build.properties file that was incorrect at least for my system. I fixed that to the right path and now I can build successfully in ant but when I build the game in unity it gives me this error:

    Code (csharp):
    1. Building DEX Failed!
    2. C:\Users\Paul E Hansen\Documents\New Unity Project 1\Temp/StagingArea> java -Xmx1024M -Djava.ext.dirs="C:/Program Files (x86)/Android/android-sdk-windows\platform-tools/lib/" -jar "C:/Program Files (x86)/Android/android-sdk-windows\platform-tools/lib/dx.jar" --dex --verbose --output=bin/classes.dex bin/classes.jar plugins
    3. processing archive bin\classes.jar...
    4. processing com/unity3d/player/a/a.class...
    5. processing com/unity3d/player/a/b.class...
    6. processing com/unity3d/player/a/c$a$a.class...
    7. processing com/unity3d/player/a/c$a.class...
    8. processing com/unity3d/player/a/c.class...
    9. processing com/unity3d/player/a/d$a$a.class...
    10. processing com/unity3d/player/a/d$a.class...
    11. processing com/unity3d/player/a/d.class...
    12. processing com/unity3d/player/a/e$a$1.class...
    13. processing com/unity3d/player/a/e$a$2.class...
    14. processing com/unity3d/player/a/e$a.class...
    15. processing com/unity3d/player/a/e.class...
    16. processing com/unity3d/player/a/f.class...
    17. processing com/unity3d/player/a/g.class...
    18. processing com/unity3d/player/a/h.class...
    19. processing com/unity3d/player/a/i.class...
    20. processing com/unity3d/player/a/j.class...
    21. processing com/unity3d/player/a/k.class...
    22. processing com/unity3d/player/b/a.class...
    23. processing com/unity3d/player/b/b.class...
    24. processing com/unity3d/player/a/l.class...
    25. processing com/unity3d/player/a.class...
    26. processing com/unity3d/player/PlayerPrefs.class...
    27. processing com/unity3d/player/b$1.class...
    28. processing com/unity3d/player/b$2.class...
    29. processing com/unity3d/player/b$3.class...
    30. processing com/unity3d/player/b.class...
    31. processing com/unity3d/player/c.class...
    32. processing com/unity3d/player/d$a.class...
    33. processing com/unity3d/player/d$b.class...
    34. processing com/unity3d/player/d.class...
    35. processing com/unity3d/player/e$a$a.class...
    36. processing com/unity3d/player/e$a$b.class...
    37. processing com/unity3d/player/e$a$c.class...
    38. processing com/unity3d/player/e$a$d.class...
    39. processing com/unity3d/player/e$a$e$a.class...
    40. processing com/unity3d/player/e$a$e.class...
    41. processing com/unity3d/player/e$a$f.class...
    42. processing com/unity3d/player/e$a$g.class...
    43. processing com/unity3d/player/e$a.class...
    44. processing com/unity3d/player/e.class...
    45. processing com/unity3d/player/UnityPlayer$1.class...
    46. processing com/unity3d/player/UnityPlayer$2.class...
    47. processing com/unity3d/player/f.class...
    48. processing com/unity3d/player/g.class...
    49. processing com/unity3d/player/UnityPlayer$3.class...
    50. processing com/unity3d/player/UnityPlayer$4.class...
    51. processing com/unity3d/player/UnityPlayer$5.class...
    52. processing com/unity3d/player/UnityPlayer$6.class...
    53. processing com/unity3d/player/UnityPlayer$7.class...
    54. processing com/unity3d/player/UnityPlayer$8.class...
    55. processing com/unity3d/player/UnityPlayer$9.class...
    56. processing com/unity3d/player/UnityPlayer$10.class...
    57. processing com/unity3d/player/UnityPlayer$11.class...
    58. processing com/unity3d/player/UnityPlayer$12.class...
    59. processing com/unity3d/player/UnityPlayer$13.class...
    60. processing com/unity3d/player/UnityPlayer$14.class...
    61. processing com/unity3d/player/UnityPlayer$15.class...
    62. processing com/unity3d/player/UnityPlayer$16.class...
    63. processing com/unity3d/player/UnityPlayer$17.class...
    64. processing com/unity3d/player/UnityPlayer$18.class...
    65. processing com/unity3d/player/UnityPlayer.class...
    66. processing com/unity3d/player/UnityPlayerActivity.class...
    67. processing com/unity3d/player/UnityPlayerNativeActivity.class...
    68. processing com/unity3d/player/UnityPlayerProxyActivity.class...
    69. processing com/unity3d/player/UnityWallpaperService$1.class...
    70. processing com/unity3d/player/UnityWallpaperService.class...
    71. processing com/unity3d/player/VideoPlayer.class...
    72. processing com/unity3d/player/WWW.class...
    73. processing org/fmod/FMODAudioDevice.class...
    74. processing archive plugins\.\admob-sdk-android.jar...
    75. ignored resource META-INF/MANIFEST.MF
    76. processing com/admob/android/ads/AdListener.class...
    77. processing com/admob/android/ads/AdManager$1.class...
    78. processing com/admob/android/ads/AdManager$Gender.class...
    79. processing com/admob/android/ads/AdManager.class...
    80. processing com/admob/android/ads/AdMobActivity$1.class...
    81. processing com/admob/android/ads/AdMobActivity.class...
    82. processing com/admob/android/ads/a.class...
    83. processing com/admob/android/ads/b$1.class...
    84. processing com/admob/android/ads/b.class...
    85. processing com/admob/android/ads/AdView$1.class...
    86. processing com/admob/android/ads/AdView$a.class...
    87. processing com/admob/android/ads/AdView$b.class...
    88. processing com/admob/android/ads/AdView$c.class...
    89. processing com/admob/android/ads/AdView$d.class...
    90. processing com/admob/android/ads/AdView$e.class...
    91. processing com/admob/android/ads/AdView$f.class...
    92. processing com/admob/android/ads/AdView$g$1.class...
    93. processing com/admob/android/ads/AdView$g.class...
    94. processing com/admob/android/ads/AdView.class...
    95. processing com/admob/android/ads/c.class...
    96. processing com/admob/android/ads/InterstitialAd$a.class...
    97. processing com/admob/android/ads/InterstitialAd$Event.class...
    98. processing com/admob/android/ads/InterstitialAd$b.class...
    99. processing com/admob/android/ads/InterstitialAd$c.class...
    100. processing com/admob/android/ads/InterstitialAd$d.class...
    101. processing com/admob/android/ads/InterstitialAd$e.class...
    102. processing com/admob/android/ads/InterstitialAd$f.class...
    103. processing com/admob/android/ads/InterstitialAd.class...
    104. processing com/admob/android/ads/InterstitialAdListener.class...
    105. processing com/admob/android/ads/SimpleAdListener.class...
    106. processing com/admob/android/ads/d$a.class...
    107. processing com/admob/android/ads/d.class...
    108. processing com/admob/android/ads/analytics/InstallReceiver$1.class...
    109. processing com/admob/android/ads/analytics/InstallReceiver.class...
    110. processing com/admob/android/ads/e.class...
    111. processing com/admob/android/ads/f.class...
    112. processing com/admob/android/ads/g.class...
    113. processing com/admob/android/ads/h.class...
    114. processing com/admob/android/ads/i.class...
    115. processing com/admob/android/ads/j$a.class...
    116. processing com/admob/android/ads/j$b.class...
    117. processing com/admob/android/ads/j$c.class...
    118. processing com/admob/android/ads/j$d.class...
    119. processing com/admob/android/ads/j.class...
    120. processing com/admob/android/ads/k$a.class...
    121. processing com/admob/android/ads/k$b.class...
    122. processing com/admob/android/ads/k$c.class...
    123. processing com/admob/android/ads/k$d.class...
    124. processing com/admob/android/ads/k.class...
    125. processing com/admob/android/ads/l.class...
    126. processing com/admob/android/ads/m.class...
    127. processing com/admob/android/ads/n.class...
    128. processing com/admob/android/ads/o.class...
    129. processing com/admob/android/ads/p.class...
    130. processing com/admob/android/ads/q$1.class...
    131. processing com/admob/android/ads/q$2.class...
    132. processing com/admob/android/ads/q$a.class...
    133. processing com/admob/android/ads/q.class...
    134. processing com/admob/android/ads/r.class...
    135. processing com/admob/android/ads/s$a.class...
    136. processing com/admob/android/ads/s$b.class...
    137. processing com/admob/android/ads/s.class...
    138. processing com/admob/android/ads/t.class...
    139. processing com/admob/android/ads/u$a.class...
    140. processing com/admob/android/ads/u.class...
    141. processing com/admob/android/ads/v.class...
    142. processing com/admob/android/ads/w.class...
    143. processing com/admob/android/ads/x.class...
    144. processing com/admob/android/ads/y$a.class...
    145. processing com/admob/android/ads/y.class...
    146. processing com/admob/android/ads/z$a$1.class...
    147. processing com/admob/android/ads/z$a.class...
    148. processing com/admob/android/ads/z.class...
    149. processing com/admob/android/ads/aa.class...
    150. processing com/admob/android/ads/ab.class...
    151. processing com/admob/android/ads/ac$a.class...
    152. processing com/admob/android/ads/ac$b.class...
    153. processing com/admob/android/ads/ac$c.class...
    154. processing com/admob/android/ads/ac$d.class...
    155. processing com/admob/android/ads/ac$e.class...
    156. processing com/admob/android/ads/ac$f.class...
    157. processing com/admob/android/ads/ac$g.class...
    158. processing com/admob/android/ads/ac$h.class...
    159. processing com/admob/android/ads/ac$i.class...
    160. processing com/admob/android/ads/ac.class...
    161. processing com/admob/android/ads/view/AdMobWebView.class...
    162. processing com/admob/android/ads/ad.class...
    163. processing com/admob/android/ads/ae.class...
    164. processing com/admob/android/ads/af.class...
    165. processing com/admob/android/ads/ag.class...
    166. processing com/admob/android/ads/ah.class...
    167. processing com/admob/android/ads/ai.class...
    168. processing com/admob/android/ads/aj.class...
    169. processing com/admob/android/ads/ak.class...
    170. processing com/admob/android/ads/al.class...
    171. processing com/admob/android/ads/am.class...
    172. processing com/admob/android/ads/an.class...
    173. processing com/admob/android/ads/ao.class...
    174. processing com/admob/android/ads/ap$a.class...
    175. processing com/admob/android/ads/ap.class...
    176. processing archive plugins\.\com.paul.game.jar...
    177. processing com/paul/game/AdMobTestActivity$1.class...
    178. processing com/paul/game/AdMobTestActivity.class...
    179. processing com/paul/game/R$attr.class...
    180. processing com/paul/game/R$bool.class...
    181. processing com/paul/game/R$drawable.class...
    182. processing com/paul/game/R$integer.class...
    183. processing com/paul/game/R$string.class...
    184. processing com/paul/game/R.class...
    185. processing org/example/AdMobTest/AdMobTestActivity$1.class...
    186. processing org/example/AdMobTest/AdMobTestActivity.class...
    187. processing org/example/AdMobTest/R$attr.class...
    188. processing org/example/AdMobTest/R$bool.class...
    189. processing org/example/AdMobTest/R$drawable.class...
    190. processing org/example/AdMobTest/R$integer.class...
    191. processing org/example/AdMobTest/R$string.class...
    192. processing org/example/AdMobTest/R.class...
    193. processing archive plugins\.\org.example.AdMobTest.jar...
    194. processing org/example/AdMobTest/AdMobTestActivity$1.class...
    195.  
    196. UNEXPECTED TOP-LEVEL EXCEPTION:
    197. java.lang.IllegalArgumentException: already added: Lorg/example/AdMobTest/AdMobTestActivity$1;
    198.     at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
    199.     at com.android.dx.dex.file.DexFile.add(DexFile.java:143)
    200.     at com.android.dx.command.dexer.Main.processClass(Main.java:372)
    201.     at com.android.dx.command.dexer.Main.processFileBytes(Main.java:346)
    202.     at com.android.dx.command.dexer.Main.access$400(Main.java:59)
    203.     at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:294)
    204.     at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
    205.     at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
    206.     at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:190)
    207.     at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:122)
    208.     at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
    209.     at com.android.dx.command.dexer.Main.processOne(Main.java:313)
    210.     at com.android.dx.command.dexer.Main.processAllFiles(Main.java:233)
    211.     at com.android.dx.command.dexer.Main.run(Main.java:185)
    212.     at com.android.dx.command.dexer.Main.main(Main.java:166)
    213.     at com.android.dx.command.Main.main(Main.java:90)
    214. 1 error; aborting
    215.  
    216. UnityEngine.Debug:LogError(Object)
    217. PostProcessAndroidPlayer:BuildDex(String, String, Single, Single) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPipeline/PostProcessAndroidPlayer.cs:573)
    218. PostProcessAndroidPlayer:PostProcess(BuildTarget, String, String, String, String, String, String, BuildOptions) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPipeline/PostProcessAndroidPlayer.cs:166)
    219. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
    220.  
    I can compile an android game in unity that does not have admob just fine so there is still something wrong with it.

    Any Ideas?

    @MicroEyes Thanks a ton you got me looking in the right direction.
     
  30. MicroEyes_old

    MicroEyes_old

    Joined:
    Jun 9, 2011
    Posts:
    188
    To Assassin,

    Open the jar file named with ur bundle name (in my case its in.test.carm.jar) that u created with "ant create-jar" that is in "Plugin\Android\bin\" in ur Unity Project.

    Open with any compression software winrar\7Zip.

    and delete org folder from jar file and rebuild from Unity.. It worked.. :)

    That error is bcoz of same file "AdMobTestActivity.class" in ur project and also in "AdMob" package

    Just explore both folders in Jar file, u found the same file twice..
     
    Last edited: Aug 3, 2011
  31. j349900963

    j349900963

    Joined:
    Jun 9, 2010
    Posts:
    1
    anyone can upload the success demo...more better include a 'readme' ...
    loooooooooool...
    thx...
    i pray for u, not god...
     
  32. TheAssassin

    TheAssassin

    Joined:
    Jan 13, 2011
    Posts:
    51
    @MircoEyes Thank you so much I would have never figured that one out. It works great now!
     
    Last edited: Aug 20, 2011
  33. Mandroid

    Mandroid

    Joined:
    Aug 20, 2011
    Posts:
    1
    I'm having trouble getting the following line to find my class file;

    Code (csharp):
    1. IntPtr cls_JavaClass    = AndroidJNI.FindClass("org.example.myClass");
    I'm not actually sure where to position myClass.class to get this to work, or if the class file needs to have a specific package.

    Any help would be appreciated
     
  34. MicroEyes_old

    MicroEyes_old

    Joined:
    Jun 9, 2011
    Posts:
    188
    To Mandroid,
    This File is in Bin Folder in Android AdMob Folder... And don't use org.example.myClass instead use "org/example/myClass"..
     
  35. MicroEyes_old

    MicroEyes_old

    Joined:
    Jun 9, 2011
    Posts:
    188
    If AnyBody need any help related to AdMob (this thread)... please PM on my Profile / Inbox..
     
  36. unitynewb

    unitynewb

    Joined:
    Feb 22, 2009
    Posts:
    243
    How would I add com.unity3d so that I don't get the error of it being not found when running ant? I out the path in my path variable, but that dis not help. I also tried to ads the full.jar path to my path variable and that didn't help.

    Can somebody post a screenshot or something of how you make your com.unity3d findable in windows 7

    Edit: I figured it out. It made a directory on my C drive, I ended up copying the Unity files in there.
     
    Last edited: Sep 17, 2011
  37. syst3m

    syst3m

    Joined:
    Sep 17, 2011
    Posts:
    6
    hi,

    my problem, ant create-jar



    help me :(
     
  38. syst3m

    syst3m

    Joined:
    Sep 17, 2011
    Posts:
    6
    @microeyes

    i have the same problem but not solved :s

    how do solve problem?
     
  39. crazyKnight

    crazyKnight

    Joined:
    Nov 22, 2010
    Posts:
    55
    hi ,

    i am using your current package to add adMob to my game and its working absolutely fine,I was thinking if i could even implement Facebook with the current plugin( I have people in my company who can write the code for the Facebook implementation in the plugin),but for that i have to pass the string(the text which will be posted on Facebook) from unity.

    i don't know how to pass the string to the plugin or pass it as a parameter and even how to read that string in the plugin code.

    can you please help me out with this.

    Thanks in Advance.
     
  40. imamizer

    imamizer

    Joined:
    Mar 7, 2011
    Posts:
    20
    let me add some proper infos about solutions.
    some of them already given here but some of there are not so easy to understand.

    you need android-sdk, java, and apache ant. you must install ant before beginning installation.
    test your ant by typing to console (run > cmd > and type "ant"). you must get some info about your ant if you set it up properly. otherwise you will get "'ant' is not recognized as an internal or external command" error.
    i suggest you to rename your ant folder into short string like "ant" and place it into short adress like "c" drive. (c:\ant). long adress names or folder names may cause problem.

    to set environment variables: r.click your computer icon on your desktop or go run > settings > control panel >system.
    go advanced tab. click environment variables. click new to add new variable of select existing one and click edit to modify.
    if you prefer manual install you must add ANT_HOME variable as told in previous posts. put that variable into both system and user variable to be sure(i m not sure if its necessary to put into both but put it anyway)
    secondly you must modify your path variable. to do this edit your path variable and add your unity android player files location. to edit existing variable simply ad ";" and type your folder adress. Mine is like this after adding my unity file adress "C:\ant\bin;C:\Program Files\Unity\Editor\Data\PlaybackEngines\androidplayer\bin".

    if you are still having problems with installing ant i suggest you to install this. it sets system variables automaticly. but i m not sure if it runs, i did not tested it yet still using ant download that i mentioned previously.

    if you are still having error when you hit "ant create-jar". go to your project folder\assests\plugings\android

    open local.properties file with any tex editor. check bottom line for "sdk.dir" folder is pointing your android-sdk folder.
    "sdk.dir=C:\\android-sdk" dont forget to use double slash in here.
    open build.properties file in that folder again with any text editor. check bottom line for "external.libs.absolute.dir" line if it is pointing your unity androidplayer files.it must be like this if you installed unity to default folder:
    "external.libs.absolute.dir=C:\\Program Files\\Unity\\Editor\\Data\\PlaybackEngines\\androidplayer\\bin"
    also dont forget to use double slashes when defining your folder address.

    lastly, if you do everything right do not become frustrated after testing your application.you must wait a couple hours to see the result. first ad request triggers your ads system and needs couple hours to get it working.

    EDIT : You may also recieve error when building your jar file if you have your unity project in long adress such as "C:\Documents and Settings\User\Desktop\Unity\Audio\Assets\Plugins\Android"
    i copied my project to c and worked properly. it is now "C:\Audio\Assets\Plugins\Android"
     
    Last edited: Oct 4, 2011
  41. Zahel

    Zahel

    Joined:
    Sep 20, 2011
    Posts:
    43
    So, I've successfully built all files, and they're integrated into my project. My problem is the ads don't show up. So, I added the code in the AdMobTestActivity for the Enable/DisableAds calls, and added a c# class to call the functions like show in this thread. When I do that, my game crashes on the phone.

    AdMobTestActivity:
    Code (csharp):
    1.  
    2. package com.SkyParlorStudios.FireAndDiceLite; //this has to be changed
    3.  
    4. import android.os.Bundle;
    5. import android.os.Handler;
    6. import android.util.Log;
    7. import android.view.View;
    8. import android.view.ViewGroup.LayoutParams;
    9. import android.widget.LinearLayout;
    10. import android.os.Message;
    11.  
    12. import com.unity3d.player.*;
    13.  
    14. import com.admob.android.ads.AdView;
    15. import com.admob.android.ads.SimpleAdListener;
    16. import com.admob.android.ads.AdManager;
    17.  
    18. public class AdMobTestActivity extends UnityPlayerActivity
    19. {
    20.     public AdView adView;
    21.     private boolean adVisible = true;
    22.     protected void onCreate(Bundle savedInstanceState)
    23.     {
    24.         Log.i("AdMob", "onCreate");
    25.  
    26.         // super (UnityPlayerActivity) will use setContentView() ...
    27.         super.onCreate(savedInstanceState);
    28.  
    29.         // ... so instead of using setContentView(), we call addContentView() from setupAds()
    30.         setupAds();
    31.  
    32.         // Add test devices (check the logcat for the ID string of your device..)
    33.         AdManager.setTestDevices( new String[] { "0123456789ABCDEF0123456789ABCDEF" } ); //this has to be changed
    34.     }
    35.     private Handler handler = new Handler()
    36.     {
    37.         public void  handleMessage(Message msg)
    38.         {
    39.             switch (msg.what)
    40.             {
    41.                 case 0:
    42.                     if (adVisible)
    43.                     {
    44.                         adView.setVisibility(View.INVISIBLE);
    45.                         adVisible = false;
    46.                     }
    47.                     break;
    48.                 case 1:
    49.                     if (!adVisible)
    50.                     {
    51.                         adView.setVisibility(View.VISIBLE );
    52.                         adVisible = true;
    53.                     }
    54.                     break;
    55.                 default:
    56.                     break;
    57.             }
    58.         }
    59.     };
    60.  
    61.     public void EnableAds()
    62.     {
    63.         handler.sendEmptyMessage(1);
    64.         //adView.setVisibility(View.VISIBLE );
    65.     }
    66.  
    67.     public void DisableAds()
    68.     {
    69.         handler.sendEmptyMessage(0);
    70.         //adView.setVisibility(View.INVISIBLE );
    71.     }  
    72.     private void setupAds()
    73.     {
    74.  
    75.             LinearLayout layout = new LinearLayout(this);
    76.         layout.setOrientation(LinearLayout.VERTICAL);
    77.             addContentView(layout, new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
    78.  
    79.             adView = new AdView(this);
    80.         layout.addView(adView, new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
    81.  
    82.             adView.setBackgroundColor(0xff000000);
    83.             adView.setPrimaryTextColor(0xffffffff);
    84.             adView.setSecondaryTextColor(0xffcccccc);
    85.             adView.setKeywords("kickoff Goal Pinball game spiel bundesliga male Flipper Bumper Parlotones kick off 3d soccer fussball football tor vuvuzela");
    86.             adView.setRequestInterval(20);
    87.  
    88.         // add listener for easier debugging
    89.             adView.setAdListener( new SimpleAdListener()
    90.             {
    91.                 public void onFailedToReceiveAd(com.admob.android.ads.AdView adView)
    92.                 {
    93.                     Log.d("AdListener", "onFailedToReceiveAd: " + adView.toString());
    94.                     super.onFailedToReceiveAd(adView);
    95.                 }
    96.  
    97.                 public void onFailedToReceiveRefreshedAd(com.admob.android.ads.AdView adView)
    98.                 {
    99.                     Log.d("AdListener", "onFailedToReceiveRefreshedAd: " + adView.toString());
    100.                     super.onFailedToReceiveRefreshedAd(adView);
    101.                 }
    102.  
    103.                 public void onReceiveAd(com.admob.android.ads.AdView adView)
    104.                 {
    105.                     Log.d("AdListener", "onReceiveAd: " + adView.toString());
    106.                     super.onReceiveAd(adView);
    107.                 }
    108.  
    109.                 public void onReceiveRefreshedAd(com.admob.android.ads.AdView adView)
    110.                 {
    111.                     Log.d("AdListener", "onReceiveRefreshedAd: " + adView.toString());
    112.                     super.onReceiveRefreshedAd(adView);
    113.                 }
    114.             } );
    115.             adView.requestFreshAd();
    116.     }
    117. }
    118.  
    and the AndroidManifest:

    Code (csharp):
    1.  
    2. <?xml version="1.0" encoding="utf-8"?>
    3. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    4.       package="com.SkyParlorStudios.FireAndDiceLite"
    5.       android:versionCode="1"
    6.       android:versionName="1.0">
    7.     <uses-sdk android:minSdkVersion="6" />
    8.     <application
    9.         android:icon="@drawable/app_icon"
    10.         android:label="@string/app_name">
    11.         <activity android:name=".AdMobTestActivity"
    12.             android:label="@string/app_name">
    13.             <intent-filter>
    14.                 <action android:name="android.intent.action.MAIN" />
    15.                 <category android:name="android.intent.category.LAUNCHER" />
    16.             </intent-filter>
    17.         </activity>
    18.  
    19.         <!-- The application's publisher ID assigned by AdMob -->
    20.        <meta-data android:value="a14e865d68576a0" android:name="ADMOB_PUBLISHER_ID" />
    21.  
    22.        <!-- AdMobActivity definition -->
    23.        <activity android:name="com.admob.android.ads.AdMobActivity"
    24.                  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
    25.                  android:configChanges="orientation|keyboard|keyboardHidden" />
    26.  
    27.        <!-- Track Market installs -->
    28.        <receiver android:name="com.admob.android.ads.analytics.InstallReceiver" android:exported="true">
    29.            <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" />
    30.            </intent-filter>
    31.        </receiver>
    32.  
    33.    </application>
    34.  
    35.    <!-- AdMob SDK requires Internet permission -->
    36.    <uses-permission android:name="android.permission.INTERNET" />
    37.  
    38. </manifest>
    39.  
    Any ideas what's wrong?

    EDIT:
    Fixed my initial problem, AdMob was denying my ad requests. Once I fixed that I had ads!

    I'd still like to be able to enable/disable them though, so if anyone knows why that makes my game crash I would love to know.
     
    Last edited: Oct 4, 2011
  42. MicroEyes_old

    MicroEyes_old

    Joined:
    Jun 9, 2011
    Posts:
    188
    To syst3m,

    Hi,

    "classes.jar" and "classes.dex" are unity packages for android player..
    if u don't hav , arrange them.
    They r in "C:\Program Files\Unity\Editor\Data\PlaybackEngines\androidplayer\bin" on my system.. check urs...

    To use them with ANT, u have to add "C:\Program Files\Unity\Editor\Data\PlaybackEngines\androidplayer\bin" or ur %unity%\Editor\Data\PlaybackEngines\androidplayer\bin" to System Environment Variable to PATH variable ....


    Happy to Help...!!!

    Please Share here if this solve ur problem.... :)
     
  43. MicroEyes_old

    MicroEyes_old

    Joined:
    Jun 9, 2011
    Posts:
    188
    To Zahel,

    Plz add 3 more permissions in ur xml file...

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <!-- to get Android Device ID -->


    Your Cs file looks ok... but u can Download mine from
    "AdMobTestActivity.java" file...
    http://www.megaupload.com/?d=641PYVF0

    You can use:
    DisableAds(): To Completely Disable Advertisements on App startup or as u like..
    EnableAds(): To Enable Adv...
    HideAdv(): To hide Adv temporarily
    ShowAdv(): To Show Adv that is hide by HideAdv() function...


    Share here if u got any problem...
    Plz Pm me..
     
  44. syst3m

    syst3m

    Joined:
    Sep 17, 2011
    Posts:
    6
    heyy build success!!! :)

    i can turkish support help :)))

    thanks for syslord2k2 MicroEyes imamizer
     
  45. a28306

    a28306

    Joined:
    Sep 28, 2011
    Posts:
    11
    Hey Guys.
    I have a problem.
    I use this plugin in my project,there is nothing wrong until I run my game on my cellphone.When I touth the game icon,it looks like be launched,but ,quickly,it shut down.
    Then I find the problem.when i build the project,if i choose "emulater" in "Device filter" ,the game will run well,and the ads are displayed.
    if i choose "armv6 with VFP",the game can't run.
    anyone can help me ?thanks.
     
  46. lyh1

    lyh1

    Joined:
    Jun 30, 2010
    Posts:
    92
    Hi here,
    Anyone using the admob plugin along with unity3d 3.4 nativeActivity?
    Just figure out that when you add a view in nativeActivity, there are no onTouch message called.
    This means your ads show, but it is not clickable. You lose money!
    But fall back to the old Activity and add a view on it, things run flawlessly.
     
  47. a28306

    a28306

    Joined:
    Sep 28, 2011
    Posts:
    11
    Here is my steps.
    1,creat a new project in eclipse.
    project name: AdMob,package name:com.jytx.game,activity:AdMobTestActivity
    2,import the AdMob plugin into Unity,and cope what in the folds "\src\org\example\AdMobTest","res\org\example\AdMobTest" and "gen\org\example\AdMobTest" to the folds "\src\com\jytx\game","\resc\com\jytx\game" and "\gen\com\jytx\game".copy the xml insteat of the new project's.
    3,open "AdMobTestActivity.java" and "AndroidManifest.xml".change the package name to my package name,
    4,save and re-build the project.use cmd,type:jar cvf com.jytx.game com\ to make a jar of com fold.
    5,copy the jar to MyUnityProject\Assets\Plugins\Android\bin,copy the xml file toMyUnityProject\Assets\Plugins\Android\.
    6,went into Player Settings for android and changed bundle identifier to my package name.choose Device filter to ARMv6.
    7,build an run.
    8.the game is open on my cellphone but close quickly,these is just a black screen for 0.1 second.

    here is the logcat
    Code (csharp):
    1.  
    2. 10-14 11:21:38.117: INFO/AdMobTest(13348): onCreate
    3. 10-14 11:21:38.187: DEBUG/dalvikvm(13348): Trying to load lib /data/data/com.jytx.game/lib/libmono.so 0x45f3e6b0
    4. 10-14 11:21:38.187: DEBUG/dalvikvm(13348): Added shared lib /data/data/com.jytx.game/lib/libmono.so 0x45f3e6b0
    5. 10-14 11:21:38.523: DEBUG/proxy(13348): Added shared lib /assets/libs/armeabi-vfp/libmono.so 0x80c19e74
    6. 10-14 11:21:38.523: DEBUG/proxy(13348): No JNI_OnLoad found in /assets/libs/armeabi-vfp/libmono.so 0x80c19e74
    7. 10-14 11:21:38.523: DEBUG/dalvikvm(13348): Trying to load lib /data/data/com.jytx.game/lib/libunity.so 0x45f3e6b0
    8. 10-14 11:21:38.523: DEBUG/dalvikvm(13348): Added shared lib /data/data/com.jytx.game/lib/libunity.so 0x45f3e6b0
    9. 10-14 11:21:39.273: INFO/DEBUG(1537): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    10. 10-14 11:21:39.273: INFO/DEBUG(1537): Build fingerprint: 'ZTE/U880/U880/U880:2.2.2/FRG83G/eng.root.20110725.180810:user/release-keys'
    11. 10-14 11:21:39.273: INFO/DEBUG(1537): pid: 13348, tid: 13348  >>> com.jytx.game <<<
    12. 10-14 11:21:39.273: INFO/DEBUG(1537): signal 4 (SIGILL), fault addr 48f82aec
    13. 10-14 11:21:39.273: INFO/DEBUG(1537):  r0 00000000  r1 00000000  r2 afd48a0c  r3 00000001
    14. 10-14 11:21:39.273: INFO/DEBUG(1537):  r4 4950a6d8  r5 00000000  r6 49514fb0  r7 afd48ea4
    15. 10-14 11:21:39.281: INFO/DEBUG(1537):  r8 00000000  r9 00000000  10 48f6e700  fp 80d0e608
    16. 10-14 11:21:39.281: INFO/DEBUG(1537):  ip 4950a924  sp bec6f0d8  lr afd103f0  pc 48f82aec  cpsr 40000010
    17. 10-14 11:21:39.336: INFO/DEBUG(1537):          #00  pc 48f82aec  
    18. 10-14 11:21:39.336: INFO/DEBUG(1537):          #01  pc 000103ec  /system/lib/libc.so
    19. 10-14 11:21:39.336: INFO/DEBUG(1537): code around pc:
    20. 10-14 11:21:39.336: INFO/DEBUG(1537): 48f82acc e59f1350 e1a02007 e1c380f8 e0841001
    21. 10-14 11:21:39.336: INFO/DEBUG(1537): 48f82adc e5835010 e5835014 e1a00003 ebff4d44
    22. 10-14 11:21:39.336: INFO/DEBUG(1537): 48f82aec eddf7a85 e59f6330 e28d0078 e3a03020
    23. 10-14 11:21:39.336: INFO/DEBUG(1537): 48f82afc e0846006 edc67a06 e5203074 e5865004
    24. 10-14 11:21:39.336: INFO/DEBUG(1537): 48f82b0c e5865008 e586500c e5865010 e5865014
    25. 10-14 11:21:39.336: INFO/DEBUG(1537): code around lr:
    26. 10-14 11:21:39.336: INFO/DEBUG(1537): afd103d0 0a000014 e5964000 e5967000 e2144903
    27. 10-14 11:21:39.336: INFO/DEBUG(1537): afd103e0 1a000012 e5961000 e2015a02 ebfff99e
    28. 10-14 11:21:39.336: INFO/DEBUG(1537): afd103f0 e3853001 e1500003 0a000008 e3550000
    29. 10-14 11:21:39.336: INFO/DEBUG(1537): afd10400 13a01001 03a01081 e5865000 e1a00006
    30. 10-14 11:21:39.336: INFO/DEBUG(1537): afd10410 e3a02001 ebfff9b8 e1a00004 e8bd87f0
    31. 10-14 11:21:39.336: INFO/DEBUG(1537): stack:
    32. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f098  00000000  
    33. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f09c  afd18b6f  /system/lib/libc.so
    34. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0a0  0020c010  [heap]
    35. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0a4  491de66b  
    36. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0a8  4950a6d8  
    37. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0ac  48f7b6a4  
    38. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0b0  49515278  
    39. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0b4  afd48ea4  
    40. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0b8  49514fb4  
    41. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0bc  4950a6d8  
    42. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0c0  00000000  
    43. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0c4  49514fb0  
    44. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0c8  afd48ea4  
    45. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0cc  afd32f5d  /system/lib/libc.so
    46. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0d0  df002777  
    47. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0d4  e3a070ad  
    48. 10-14 11:21:39.344: INFO/DEBUG(1537): #01 bec6f0d8  00000000  
    49. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0dc  afd103f0  /system/lib/libc.so
    50. 10-14 11:21:39.344: INFO/DEBUG(1537):     bec6f0e0  00000000  
    51. 10-14 11:21:39.352: INFO/DEBUG(1537):     bec6f0e4  49515128  
    52. 10-14 11:21:39.352: INFO/DEBUG(1537):     bec6f0e8  4951530c  
    53. 10-14 11:21:39.352: INFO/DEBUG(1537):     bec6f0ec  49514c08  
    54. 10-14 11:21:39.352: INFO/DEBUG(1537):     bec6f0f0  49515338  
    55. 10-14 11:21:39.352: INFO/DEBUG(1537):     bec6f0f4  49515260  
    56. 10-14 11:21:39.352: INFO/DEBUG(1537):     bec6f0f8  4951518c  
    57. 10-14 11:21:39.352: INFO/DEBUG(1537):     bec6f0fc  49515334  
    58. 10-14 11:21:39.352: INFO/DEBUG(1537):     bec6f100  4951529c  
    59. 10-14 11:21:39.352: INFO/DEBUG(1537):     bec6f104  495150e0  
    60. 10-14 11:21:39.352: INFO/DEBUG(1537):     bec6f108  49515048  
    61. 10-14 11:21:39.352: INFO/DEBUG(1537):     bec6f10c  495152bc  
    62. 10-14 11:21:39.352: INFO/DEBUG(1537):     bec6f110  49515360  
    63. 10-14 11:21:39.352: INFO/DEBUG(1537):     bec6f114  4951524c  
    64. 10-14 11:21:39.352: INFO/DEBUG(1537):     bec6f118  49515080  
    65. 10-14 11:21:39.352: INFO/DEBUG(1537):     bec6f11c  49514fa8  
    66. 10-14 11:21:39.656: INFO/ActivityManager(1345): Process com.jytx.game (pid 13348) has died.
    67.  
    68.  
    if i change the Device filter to emulator ,the game can run and the ads are displayed.

    here is my AdMobTestActivity.java
    Code (csharp):
    1.  
    2. package com.jytx.game;
    3.  
    4. import android.os.Bundle;
    5. import android.provider.Settings.Secure;
    6. import android.util.Log;
    7. import android.view.ViewGroup.LayoutParams;
    8. import android.widget.LinearLayout;
    9.  
    10. import com.unity3d.player.*;
    11.  
    12. import com.admob.android.ads.AdView;
    13. import com.admob.android.ads.SimpleAdListener;
    14. import com.admob.android.ads.AdManager;
    15.  
    16. public class AdMobTestActivity extends UnityPlayerActivity
    17. {
    18.     protected void onCreate(Bundle savedInstanceState)
    19.     {
    20.         Log.i("AdMobTest", "onCreate");
    21.         super.onCreate(savedInstanceState);
    22.         // super (UnityPlayerActivity) will use setContentView() ...
    23. //     
    24.  
    25.         // ... so instead of using setContentView(), we call addContentView() from setupAds()
    26.         Log.i("AdMobTest", "onSetAds");
    27.         setupAds();
    28.         Log.i("AdMobTest", "onGetId");
    29.         // Add test devices (check the logcat for the ID string of your device..)
    30. //      AdManager.setTestDevices( new String[] { "ABCDEF1234578901234567890123456" } );
    31.        
    32.         final String androidId = Secure.getString(getContentResolver(), Secure.ANDROID_ID); //get Android Device Id.
    33.         AdManager.setTestDevices( new String[] { androidId } ); //Add Android ID to Admob.
    34.         Log.i("AdMobTest", "onFinish");
    35.  
    36.     }
    37.  
    38.     private void setupAds()
    39.     {
    40.         /* These are the default values taken from attrs.xml / layout.xml
    41.  
    42.         <declare-styleable name="com.admob.android.ads.AdView">
    43.             <attr name="backgroundColor" format="color" />
    44.             <attr name="primaryTextColor" format="color" />
    45.             <attr name="secondaryTextColor" format="color" />
    46.             <attr name="keywords" format="string" />
    47.             <attr name="refreshInterval" format="integer" />
    48.         </declare-styleable>
    49.  
    50.         <LinearLayout
    51.             xmlns:android="http://schemas.android.com/apk/res/android"
    52.             xmlns:myapp="http://schemas.android.com/apk/res/com.example.SampleApp"
    53.             android:orientation="vertical"
    54.             android:layout_width="fill_parent"
    55.             android:layout_height="fill_parent">
    56.  
    57.             <com.admob.android.ads.AdView android:id="@+id/ad"
    58.                 android:layout_width="fill_parent"
    59.                 android:layout_height="wrap_content"
    60.                 myapp:backgroundColor="#000000"
    61.                 myapp:primaryTextColor="#FFFFFF"
    62.                 myapp:secondaryTextColor="#CCCCCC"
    63.             />
    64.         </LinearLayout>
    65.         */
    66.  
    67.         // And this is the same, but done programmatically
    68.  
    69.             LinearLayout layout = new LinearLayout(this);
    70.         layout.setOrientation(LinearLayout.VERTICAL);
    71.             addContentView(layout, new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
    72.  
    73.             AdView adView = new AdView(this);
    74.         layout.addView(adView, new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
    75.  
    76.             adView.setBackgroundColor(0xff000000);
    77.             adView.setPrimaryTextColor(0xffffffff);
    78.             adView.setSecondaryTextColor(0xffcccccc);
    79.             adView.setKeywords("Android game");
    80.             adView.setRequestInterval(15);
    81.  
    82.         // add listener for easier debugging
    83.             adView.setAdListener( new SimpleAdListener()
    84.             {
    85.                 public void onFailedToReceiveAd(com.admob.android.ads.AdView adView)
    86.                 {
    87.                     Log.d("AdListener", "onFailedToReceiveAd: " + adView.toString());
    88.                     super.onFailedToReceiveAd(adView);
    89.                 }
    90.  
    91.                 public void onFailedToReceiveRefreshedAd(com.admob.android.ads.AdView adView)
    92.                 {
    93.                     Log.d("AdListener", "onFailedToReceiveRefreshedAd: " + adView.toString());
    94.                     super.onFailedToReceiveRefreshedAd(adView);
    95.                 }
    96.  
    97.                 public void onReceiveAd(com.admob.android.ads.AdView adView)
    98.                 {
    99.                     Log.d("AdListener", "onReceiveAd: " + adView.toString());
    100.                     super.onReceiveAd(adView);
    101.                 }
    102.  
    103.                 public void onReceiveRefreshedAd(com.admob.android.ads.AdView adView)
    104.                 {
    105.                     Log.d("AdListener", "onReceiveRefreshedAd: " + adView.toString());
    106.                     super.onReceiveRefreshedAd(adView);
    107.                 }
    108.             } );
    109.  
    110.             adView.requestFreshAd();
    111.     }
    112. }
    113.  
    114.  
    and the AndroidManifest.xml
    Code (csharp):
    1.  
    2. <?xml version="1.0" encoding="utf-8"?>
    3. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    4.       package="com.jytx.game"
    5.       android:versionCode="1"
    6.       android:versionName="1.0">
    7.     <uses-sdk android:minSdkVersion="7" />
    8.     <application
    9.         android:icon="@drawable/app_icon"
    10.         android:label="@string/app_name">
    11.         <activity android:name=".AdMobTestActivity"
    12.             android:label="@string/app_name">
    13.             <intent-filter>
    14.                 <action android:name="android.intent.action.MAIN" />
    15.                 <category android:name="android.intent.category.LAUNCHER" />
    16.             </intent-filter>
    17.         </activity>
    18.  
    19.         <!-- The application's publisher ID assigned by AdMob -->
    20.        <meta-data android:value="a14e901b1d830fc" android:name="ADMOB_PUBLISHER_ID" />
    21.  
    22.        <!-- AdMobActivity definition -->
    23.        <activity android:name="com.admob.android.ads.AdMobActivity"
    24.                  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
    25.                  android:configChanges="orientation|keyboard|keyboardHidden" />
    26.  
    27.        <!-- Track Market installs -->
    28.        <receiver android:name="com.admob.android.ads.analytics.InstallReceiver" android:exported="true">
    29.            <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" />
    30.            </intent-filter>
    31.        </receiver>
    32.  
    33.    
    34. </application>
    35.  
    36.    <!-- AdMob SDK requires Internet permission -->
    37.    <uses-permission android:name="android.permission.INTERNET" />
    38.  
    39. </manifest>
    40.  
    is there any wrong with my steps.thanks
     
  48. MicroEyes_old

    MicroEyes_old

    Joined:
    Jun 9, 2011
    Posts:
    188
    To a28306,


    plz add these permissions to ur AndroidManifest.xml...

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCAT ION" />
    <uses-permission android:name="android.permission.ACCESS_MOCK_LOCAT ION" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <!-- to get Android Device ID -->

    then tell me....


    Also plz tell where did u get this error?
    on Emulator or Device ....
     
    Last edited: Oct 14, 2011
  49. a28306

    a28306

    Joined:
    Sep 28, 2011
    Posts:
    11

    i have added these permissions to my AndroidManifest.xml.i still get the error when i choose ARMv6 in the player settings.if choose Emulator it runs well.

    the logcat of using emulator
    Code (csharp):
    1.  
    2. 10-14 14:19:27.974: INFO/AdMobTest(17023): onCreate
    3. 10-14 14:19:28.060: DEBUG/dalvikvm(17023): Trying to load lib /data/data/com.jytx.game/lib/libmono.so 0x45ebe898
    4. 10-14 14:19:28.068: DEBUG/dalvikvm(17023): Added shared lib /data/data/com.jytx.game/lib/libmono.so 0x45ebe898
    5. 10-14 14:19:28.169: DEBUG/dalvikvm(1345): GC_EXTERNAL_ALLOC freed 10334 objects / 616184 bytes in 191ms
    6. 10-14 14:19:28.208: DEBUG/KeyguardViewMediator(1345): setHidden false
    7. 10-14 14:19:28.208: INFO/ActivityThread(1345): Dispatching broadcast android.intent.action.CONFIGURATION_CHANGED to com.android.server.status.StatusBarService$5@460976c0
    8. 10-14 14:19:28.216: DEBUG/StatusBarPolicy(1345): ---------------BroadcastReceive-----action=android.intent.action.CONFIGURATION_CHANGED
    9. 10-14 14:19:28.216: INFO/ActivityThread(1345):   mRegistered=true mCurOrdered=false
    10. 10-14 14:19:28.216: INFO/ActivityThread(1345): finish dispatching broadcast to com.android.server.status.StatusBarService$5@460976c0
    11. 10-14 14:19:28.216: INFO/ActivityThread(1345): Dispatching broadcast android.intent.action.CONFIGURATION_CHANGED to com.android.server.status.StatusBarPolicy$1@4611c700
    12. 10-14 14:19:28.216: INFO/ActivityThread(1345):   mRegistered=true mCurOrdered=false
    13. 10-14 14:19:28.216: INFO/ActivityThread(1345): finish dispatching broadcast to com.android.server.status.StatusBarPolicy$1@4611c700
    14. 10-14 14:19:28.216: INFO/ActivityThread(1345): Dispatching broadcast android.intent.action.CONFIGURATION_CHANGED to com.android.server.AppWidgetService$1@4611b6a0
    15. 10-14 14:19:28.216: INFO/ActivityThread(1345):   mRegistered=true mCurOrdered=false
    16. 10-14 14:19:28.216: INFO/ActivityThread(1345): finish dispatching broadcast to com.android.server.AppWidgetService$1@4611b6a0
    17. 10-14 14:19:28.216: INFO/ActivityThread(1345): Dispatching broadcast android.intent.action.CONFIGURATION_CHANGED to android.widget.DateTimeView$1@4624c1f0
    18. 10-14 14:19:28.216: INFO/ActivityThread(1345):   mRegistered=true mCurOrdered=false
    19. 10-14 14:19:28.216: INFO/ActivityThread(1345): finish dispatching broadcast to android.widget.DateTimeView$1@4624c1f0
    20. 10-14 14:19:28.216: INFO/ActivityThread(1345): Dispatching broadcast android.intent.action.CONFIGURATION_CHANGED to android.widget.DateTimeView$1@463de250
    21. 10-14 14:19:28.224: DEBUG/KeyguardViewMediator(1345): setHidden false
    22. 10-14 14:19:28.224: INFO/ActivityThread(1345):   mRegistered=true mCurOrdered=false
    23. 10-14 14:19:28.224: INFO/ActivityThread(1345): finish dispatching broadcast to android.widget.DateTimeView$1@463de250
    24. 10-14 14:19:28.240: DEBUG/KeyguardViewMediator(1345): setHidden false
    25. 10-14 14:19:28.255: DEBUG/KeyguardViewMediator(1345): setHidden false
    26. 10-14 14:19:28.294: ERROR/StatusBar(1345): performAddUpdateIcon key=android.os.Binder@4611cad0 mTicking = false mNotificationData.size() = 3 n = null
    27. 10-14 14:19:28.294: DEBUG/KeyguardViewMediator(1345): setHidden false
    28. 10-14 14:19:28.294: DEBUG/StatusBar(1345): handleMessage in StatusBarService =====================^^^====================1
    29. 10-14 14:19:28.325: DEBUG/KeyguardViewMediator(1345): setHidden false
    30. 10-14 14:19:28.357: DEBUG/KeyguardViewMediator(1345): setHidden false
    31. 10-14 14:19:28.357: DEBUG/KeyguardViewMediator(1345): setHidden false
    32. 10-14 14:19:28.388: DEBUG/KeyguardViewMediator(1345): setHidden false
    33. 10-14 14:19:28.591: DEBUG/proxy(17023): Added shared lib /assets/libs/armeabi-soft/libmono.so 0x80c19e74
    34. 10-14 14:19:28.591: DEBUG/proxy(17023): No JNI_OnLoad found in /assets/libs/armeabi-soft/libmono.so 0x80c19e74
    35. 10-14 14:19:28.591: DEBUG/dalvikvm(17023): Trying to load lib /data/data/com.jytx.game/lib/libunity.so 0x45ebe898
    36. 10-14 14:19:28.599: DEBUG/dalvikvm(17023): Added shared lib /data/data/com.jytx.game/lib/libunity.so 0x45ebe898
    37. 10-14 14:19:29.318: DEBUG/proxy(17023): Added shared lib /assets/libs/armeabi-soft/libunity.so 0x80d0f6fc
    38. 10-14 14:19:29.333: DEBUG/(17023): accel_vendor is 1
    39. 10-14 14:19:29.333: ERROR/sensorHAL(17023): Class path /sys/class/input/input6/ is for device accelerometer.
    40. 10-14 14:19:29.333: ERROR/sensorHAL(17023): Class path /sys/class/input/input5/ is for device magnetic.
    41. 10-14 14:19:29.333: ERROR/sensorHAL(17023): Class path /sys/class/input/input4/ is for device orientation.
    42. 10-14 14:19:29.333: ERROR/sensorHAL(17023): Class path /sys/class/input/input7/ is for device proximity.
    43. 10-14 14:19:29.333: ERROR/sensorHAL(17023): Class path /sys/class/input/input8/ is for device ambient.
    44. 10-14 14:19:29.341: INFO/sensorHAL(17023): g_sensor_list_size is 5.
    45. 10-14 14:19:29.403: DEBUG/dalvikvm(17023): GC_FOR_MALLOC freed 1540 objects / 151368 bytes in 43ms
    46. 10-14 14:19:29.411: ERROR/sensorHAL(1345): Come into control_open_data_source.
    47. 10-14 14:19:29.411: INFO/sensorHAL(1345): Open sensor accelerometer, devpath /dev/input/event6, fd = 118
    48. 10-14 14:19:29.411: INFO/sensorHAL(1345): Open sensor magnetic, devpath /dev/input/event5, fd = 123
    49. 10-14 14:19:29.411: INFO/sensorHAL(1345): Open sensor orientation, devpath /dev/input/event4, fd = 127
    50. 10-14 14:19:29.411: INFO/sensorHAL(1345): Open sensor proximity, devpath /dev/input/event7, fd = 130
    51. 10-14 14:19:29.411: INFO/sensorHAL(1345): Open sensor ambient, devpath /dev/input/event8, fd = 132
    52. 10-14 14:19:29.419: DEBUG/sensorHAL(1345): ****** Come into control_activate ******
    53. 10-14 14:19:29.419: DEBUG/sensorHAL(1345): Enter control_activate. active = 1, handle is 1
    54. 10-14 14:19:29.419: DEBUG/sensorHAL(1345): Try to activate accelerometer, file is :/sys/class/input/input6//active, active is 1
    55. 10-14 14:19:29.430: ERROR/sensorHAL(1345): Successfully to accelerometer sensor activate.
    56. 10-14 14:19:29.430: DEBUG/sensorHAL(1345): Try to set interval to accelerometer, file is :/sys/class/input/input6//interval, delay is 20
    57. 10-14 14:19:29.442: DEBUG/sensorHAL(1345): ****** Come into control_activate ******
    58. 10-14 14:19:29.442: DEBUG/sensorHAL(1345): Enter control_activate. active = 1, handle is 2
    59. 10-14 14:19:29.442: DEBUG/sensorHAL(1345): Come into active_magnetic
    60. 10-14 14:19:29.442: ERROR/sensorHAL(1345): open_akm_aot
    61. 10-14 14:19:29.442: ERROR/sensorHAL(1345): Now open AKM_DEVICE_NAME
    62. 10-14 14:19:29.442: DEBUG/sensorHAL(1345): flag = 0
    63. 10-14 14:19:29.442: DEBUG/sensorHAL(1345): Now set mag to 1
    64. 10-14 14:19:29.442: DEBUG/sensorHAL(1345): Try to set interval to magnetic, file is :/sys/class/input/input5//interval, delay is 20
    65. 10-14 14:19:29.442: DEBUG/sensorHAL(1345): Failed to set interval to magnetic.
    66. 10-14 14:19:29.442: INFO/AKMD2(1194): akmd2 : Compass Opened.
    67. 10-14 14:19:29.450: INFO/AdMobTest(17023): onSetAds
    68. 10-14 14:19:29.466: INFO/AdMobSDK(17023): AdMob SDK version is 20101109-ANDROID-3312276cc1406347
    69. 10-14 14:19:29.474: INFO/AdMobSDK(17023): Requesting fresh ads every 15 seconds.
    70. 10-14 14:19:29.474: WARN/AdMobSDK(17023): Ignoring requestFreshAd() because we are requesting an ad right now already.
    71. 10-14 14:19:29.474: INFO/AdMobTest(17023): onGetId
    72. 10-14 14:19:29.482: INFO/AdMobTest(17023): onFinish
    73.  
    the logcat of using Armv6
    Code (csharp):
    1.  
    2. 10-14 14:23:09.107: INFO/AdMobTest(17333): onCreate
    3. 10-14 14:23:09.247: DEBUG/dalvikvm(1345): GC_EXTERNAL_ALLOC freed 3579 objects / 307608 bytes in 136ms
    4. 10-14 14:23:09.247: INFO/PowerManagerService(1345): Step target 2: cur=49.33334 target=60 delta=2.6666667
    5. 10-14 14:23:09.271: INFO/PowerManagerService(1345): Step target 2: cur=52.000008 target=60 delta=2.6666667
    6. 10-14 14:23:09.286: INFO/PowerManagerService(1345): Step target 2: cur=54.666676 target=60 delta=2.6666667
    7. 10-14 14:23:09.302: INFO/PowerManagerService(1345): Step target 2: cur=57.333344 target=60 delta=2.6666667
    8. 10-14 14:23:09.333: DEBUG/dalvikvm(17333): Trying to load lib /data/data/com.jytx.game/lib/libmono.so 0x45ebe898
    9. 10-14 14:23:09.364: DEBUG/KeyguardViewMediator(1345): setHidden false
    10. 10-14 14:23:09.364: INFO/ActivityThread(1345): Dispatching broadcast android.intent.action.CONFIGURATION_CHANGED to com.android.server.status.StatusBarService$5@460976c0
    11. 10-14 14:23:09.364: INFO/ActivityThread(1345):   mRegistered=true mCurOrdered=false
    12. 10-14 14:23:09.364: INFO/ActivityThread(1345): finish dispatching broadcast to com.android.server.status.StatusBarService$5@460976c0
    13. 10-14 14:23:09.372: DEBUG/StatusBarPolicy(1345): ---------------BroadcastReceive-----action=android.intent.action.CONFIGURATION_CHANGED
    14. 10-14 14:23:09.372: INFO/ActivityThread(1345): Dispatching broadcast android.intent.action.CONFIGURATION_CHANGED to com.android.server.status.StatusBarPolicy$1@4611c700
    15. 10-14 14:23:09.372: INFO/ActivityThread(1345):   mRegistered=true mCurOrdered=false
    16. 10-14 14:23:09.372: INFO/ActivityThread(1345): finish dispatching broadcast to com.android.server.status.StatusBarPolicy$1@4611c700
    17. 10-14 14:23:09.372: INFO/ActivityThread(1345): Dispatching broadcast android.intent.action.CONFIGURATION_CHANGED to com.android.server.AppWidgetService$1@4611b6a0
    18. 10-14 14:23:09.372: INFO/ActivityThread(1345):   mRegistered=true mCurOrdered=false
    19. 10-14 14:23:09.372: INFO/ActivityThread(1345): finish dispatching broadcast to com.android.server.AppWidgetService$1@4611b6a0
    20. 10-14 14:23:09.372: INFO/ActivityThread(1345): Dispatching broadcast android.intent.action.CONFIGURATION_CHANGED to android.widget.DateTimeView$1@4624c1f0
    21. 10-14 14:23:09.372: INFO/ActivityThread(1345):   mRegistered=true mCurOrdered=false
    22. 10-14 14:23:09.372: INFO/ActivityThread(1345): finish dispatching broadcast to android.widget.DateTimeView$1@4624c1f0
    23. 10-14 14:23:09.372: INFO/ActivityThread(1345): Dispatching broadcast android.intent.action.CONFIGURATION_CHANGED to android.widget.DateTimeView$1@463de250
    24. 10-14 14:23:09.372: INFO/ActivityThread(1345):   mRegistered=true mCurOrdered=false
    25. 10-14 14:23:09.372: INFO/ActivityThread(1345): finish dispatching broadcast to android.widget.DateTimeView$1@463de250
    26. 10-14 14:23:09.380: INFO/ActivityThread(1345): Dispatching broadcast android.intent.action.CONFIGURATION_CHANGED to android.widget.DateTimeView$1@462f6d98
    27. 10-14 14:23:09.380: INFO/ActivityThread(1345):   mRegistered=true mCurOrdered=false
    28. 10-14 14:23:09.380: INFO/ActivityThread(1345): finish dispatching broadcast to android.widget.DateTimeView$1@462f6d98
    29. 10-14 14:23:09.388: DEBUG/KeyguardViewMediator(1345): setHidden false
    30. 10-14 14:23:09.403: DEBUG/KeyguardViewMediator(1345): setHidden false
    31. 10-14 14:23:09.411: DEBUG/KeyguardViewMediator(1345): setHidden false
    32. 10-14 14:23:09.482: ERROR/StatusBar(1345): performAddUpdateIcon key=android.os.Binder@4611cad0 mTicking = false mNotificationData.size() = 4 n = null
    33. 10-14 14:23:09.482: DEBUG/KeyguardViewMediator(1345): setHidden false
    34. 10-14 14:23:09.482: DEBUG/StatusBar(1345): handleMessage in StatusBarService =====================^^^====================1
    35. 10-14 14:23:09.505: DEBUG/dalvikvm(17333): Added shared lib /data/data/com.jytx.game/lib/libmono.so 0x45ebe898
    36. 10-14 14:23:09.544: DEBUG/KeyguardViewMediator(1345): setHidden false
    37. 10-14 14:23:09.599: DEBUG/KeyguardViewMediator(1345): setHidden false
    38. 10-14 14:23:09.599: DEBUG/KeyguardViewMediator(1345): setHidden false
    39. 10-14 14:23:09.646: DEBUG/KeyguardViewMediator(1345): setHidden false
    40. 10-14 14:23:10.302: DEBUG/proxy(17333): Added shared lib /assets/libs/armeabi-vfp/libmono.so 0x80c19e74
    41. 10-14 14:23:10.302: DEBUG/proxy(17333): No JNI_OnLoad found in /assets/libs/armeabi-vfp/libmono.so 0x80c19e74
    42. 10-14 14:23:10.310: DEBUG/dalvikvm(17333): Trying to load lib /data/data/com.jytx.game/lib/libunity.so 0x45ebe898
    43. 10-14 14:23:10.318: DEBUG/dalvikvm(17333): Added shared lib /data/data/com.jytx.game/lib/libunity.so 0x45ebe898
    44. 10-14 14:23:12.591: INFO/DEBUG(1537): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    45. 10-14 14:23:12.591: INFO/DEBUG(1537): Build fingerprint: 'ZTE/U880/U880/U880:2.2.2/FRG83G/eng.root.20110725.180810:user/release-keys'
    46. 10-14 14:23:12.591: INFO/DEBUG(1537): pid: 17333, tid: 17333  >>> com.jytx.game <<<
    47. 10-14 14:23:12.599: INFO/DEBUG(1537): signal 4 (SIGILL), fault addr 49354aec
    48. 10-14 14:23:12.599: INFO/DEBUG(1537):  r0 00000000  r1 00000000  r2 afd48a0c  r3 00000001
    49. 10-14 14:23:12.599: INFO/DEBUG(1537):  r4 498dc6d8  r5 00000000  r6 498e6fb0  r7 afd48ea4
    50. 10-14 14:23:12.599: INFO/DEBUG(1537):  r8 00000000  r9 00000000  10 49340700  fp 80d0e608
    51. 10-14 14:23:12.599: INFO/DEBUG(1537):  ip 498dc924  sp bec6f0d8  lr afd103f0  pc 49354aec  cpsr 40000010
    52. 10-14 14:23:12.693: INFO/DEBUG(1537):          #00  pc 49354aec  
    53. 10-14 14:23:12.693: INFO/DEBUG(1537):          #01  pc 000103ec  /system/lib/libc.so
    54. 10-14 14:23:12.693: INFO/DEBUG(1537): code around pc:
    55. 10-14 14:23:12.693: INFO/DEBUG(1537): 49354acc e59f1350 e1a02007 e1c380f8 e0841001
    56. 10-14 14:23:12.693: INFO/DEBUG(1537): 49354adc e5835010 e5835014 e1a00003 ebff4d44
    57. 10-14 14:23:12.693: INFO/DEBUG(1537): 49354aec eddf7a85 e59f6330 e28d0078 e3a03020
    58. 10-14 14:23:12.693: INFO/DEBUG(1537): 49354afc e0846006 edc67a06 e5203074 e5865004
    59. 10-14 14:23:12.693: INFO/DEBUG(1537): 49354b0c e5865008 e586500c e5865010 e5865014
    60. 10-14 14:23:12.693: INFO/DEBUG(1537): code around lr:
    61. 10-14 14:23:12.693: INFO/DEBUG(1537): afd103d0 0a000014 e5964000 e5967000 e2144903
    62. 10-14 14:23:12.693: INFO/DEBUG(1537): afd103e0 1a000012 e5961000 e2015a02 ebfff99e
    63. 10-14 14:23:12.693: INFO/DEBUG(1537): afd103f0 e3853001 e1500003 0a000008 e3550000
    64. 10-14 14:23:12.693: INFO/DEBUG(1537): afd10400 13a01001 03a01081 e5865000 e1a00006
    65. 10-14 14:23:12.693: INFO/DEBUG(1537): afd10410 e3a02001 ebfff9b8 e1a00004 e8bd87f0
    66. 10-14 14:23:12.700: INFO/DEBUG(1537): stack:
    67. 10-14 14:23:12.700: INFO/DEBUG(1537):     bec6f098  00000000  
    68. 10-14 14:23:12.700: INFO/DEBUG(1537):     bec6f09c  afd18b6f  /system/lib/libc.so
    69. 10-14 14:23:12.700: INFO/DEBUG(1537):     bec6f0a0  0020b790  [heap]
    70. 10-14 14:23:12.700: INFO/DEBUG(1537):     bec6f0a4  495b066b  
    71. 10-14 14:23:12.700: INFO/DEBUG(1537):     bec6f0a8  498dc6d8  
    72. 10-14 14:23:12.700: INFO/DEBUG(1537):     bec6f0ac  4934d6a4  
    73. 10-14 14:23:12.700: INFO/DEBUG(1537):     bec6f0b0  498e7278  
    74. 10-14 14:23:12.700: INFO/DEBUG(1537):     bec6f0b4  afd48ea4  
    75. 10-14 14:23:12.700: INFO/DEBUG(1537):     bec6f0b8  498e6fb4  
    76. 10-14 14:23:12.700: INFO/DEBUG(1537):     bec6f0bc  498dc6d8  
    77. 10-14 14:23:12.700: INFO/DEBUG(1537):     bec6f0c0  00000000  
    78. 10-14 14:23:12.708: INFO/DEBUG(1537):     bec6f0c4  498e6fb0  
    79. 10-14 14:23:12.708: INFO/DEBUG(1537):     bec6f0c8  afd48ea4  
    80. 10-14 14:23:12.708: INFO/DEBUG(1537):     bec6f0cc  afd32f5d  /system/lib/libc.so
    81. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f0d0  df002777  
    82. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f0d4  e3a070ad  
    83. 10-14 14:23:12.716: INFO/DEBUG(1537): #01 bec6f0d8  00000000  
    84. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f0dc  afd103f0  /system/lib/libc.so
    85. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f0e0  00000000  
    86. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f0e4  498e7128  
    87. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f0e8  498e730c  
    88. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f0ec  498e6c08  
    89. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f0f0  498e7338  
    90. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f0f4  498e7260  
    91. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f0f8  498e718c  
    92. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f0fc  498e7334  
    93. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f100  498e729c  
    94. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f104  498e70e0  
    95. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f108  498e7048  
    96. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f10c  498e72bc  
    97. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f110  498e7360  
    98. 10-14 14:23:12.716: INFO/DEBUG(1537):     bec6f114  498e724c  
    99. 10-14 14:23:12.724: INFO/DEBUG(1537):     bec6f118  498e7080  
    100. 10-14 14:23:12.724: INFO/DEBUG(1537):     bec6f11c  498e6fa8  
    101. 10-14 14:23:13.247: INFO/BootReceiver(1345): Copying /data/tombstones/tombstone_06 to DropBox (SYSTEM_TOMBSTONE)
    102. 10-14 14:23:13.247: INFO/ActivityManager(1345): Process com.jytx.game (pid 17333) has died.
    103.  
     
  50. MicroEyes_old

    MicroEyes_old

    Joined:
    Jun 9, 2011
    Posts:
    188
    Hi a28306,

    Actually, i m not getting where u r having problem?.. i think the problem is with directory structure..
    i m unable to understard ur directory structure u hav... plz tell me..
     
    Last edited: Oct 14, 2011