Search Unity

Google Mobile Ad Plugin & Google Play Services (SOLVED)

Discussion in 'Unity Ads & User Acquisition' started by in2grated, Dec 8, 2015.

  1. in2grated

    in2grated

    Joined:
    Dec 8, 2015
    Posts:
    5
    SOLUTION

    Hi,
    If I import only Google Mobile Ad Plugin OR Google Play Services it is working. But when I import those components together, Unity shows an error. I tried all solutions on the internet, but they don't work. I tried different ad plugins but they don't work either. Please help me. I have been trying all solutions for a week. Can anybody upload an empty Unity project with those two components included? (working on Android phone)


    IMPORTANT : Those components work in my project. Ads are shown and clickable. Leaderboards work too. I don't think the problem is with my system. Those components don't work together.

    Google Play Games plugin for Unity
    https://github.com/playgameservices/play-games-plugin-for-unity
    Google Mobile Ads Unity Plugin
    https://github.com/googleads/googleads-mobile-unity/tree/master/unity

    My sdk manager (Android 6.0 API 23, 2.2 and 2.3.3 installed)

     
    Last edited: Dec 10, 2015
  2. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Can you send us Android logcat logfiles from the project where it's not working? Thanks
     
  3. in2grated

    in2grated

    Joined:
    Dec 8, 2015
    Posts:
    5
    Thank you so much.

    I don't understand this. Play services well working alone. It is throw error import google ad component. (play games component deleting play-services-lib folder)

    It is build error.


    And it is unity editor.log file

    https://drive.google.com/file/d/0B5vSPccPyUilRzlCOWNaQWxybGM/view

    It is console error.

    Code (CSharp):
    1. CommandInvokationFailure: Failed to re-package resources. See the Console for details.
    2. D:\01.07.2015\android-sdks\build-tools\23.0.2\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "D:/01.07.2015/android-sdks\platforms\android-23\android.jar" -F bin/resources.ap_ --extra-packages android.support.v7.appcompat:com.google.unity:com.google.example.games.mainlibproj:com.google.android.gms.base:com.google.android.gms:com.google.android.gms.drive:com.google.android.gms.games:com.google.android.gms.nearby:com.google.android.gms.plus:android.support.v4 -S "C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res" -S "C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\play-services-base-8.3.0\res" -S "C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res" -S "C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\play-services-drive-8.3.0\res" -S "C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\play-services-games-8.3.0\res" -S "C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\play-services-nearby-8.3.0\res" -S "C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\play-services-plus-8.3.0\res" -S "C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\support-v4-23.1.1\res"
    3.  
    4. stderr[
    5. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_button_bar_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <android.support.v7.widget.ButtonBarLayout>
    6. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_button_bar_material.xml: note: using v17 attributes; synthesizing resource com.AleladeStudio.Reflexable:layout/abc_alert_dialog_button_bar_material for configuration v17.
    7. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_material.xml:48: note: removing attribute http://schemas.android.com/apk/res/android:textAlignment from <android.support.v7.widget.DialogTitle>
    8. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_alert_dialog_material.xml: note: using v17 attributes; synthesizing resource com.AleladeStudio.Reflexable:layout/abc_alert_dialog_material for configuration v17.
    9. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_dialog_title_material.xml:29: note: removing attribute http://schemas.android.com/apk/res/android:textAlignment from <TextView>
    10. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_dialog_title_material.xml: note: using v17 attributes; synthesizing resource com.AleladeStudio.Reflexable:layout/abc_dialog_title_material for configuration v17.
    11. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_screen_toolbar.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:touchscreenBlocksFocus from <android.support.v7.widget.ActionBarContainer>
    12. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_screen_toolbar.xml: note: using v21 attributes; synthesizing resource com.AleladeStudio.Reflexable:layout/abc_screen_toolbar for configuration v21.
    13. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_search_view.xml:47: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
    14. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\abc_search_view.xml: note: using v17 attributes; synthesizing resource com.AleladeStudio.Reflexable:layout/abc_search_view for configuration v17.
    15. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml:42: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
    16. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml:34: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <include>
    17. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml:34: note: removing attribute http://schemas.android.com/apk/res/android:layout_toStartOf from <include>
    18. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media.xml: note: using v17 attributes; synthesizing resource com.AleladeStudio.Reflexable:layout/notification_template_big_media for configuration v17.
    19. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:60: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from <ImageView>
    20. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:46: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from <LinearLayout>
    21. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:46: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
    22. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:38: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <include>
    23. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:38: note: removing attribute http://schemas.android.com/apk/res/android:layout_toStartOf from <include>
    24. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml:30: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentEnd from <include>
    25. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_big_media_narrow.xml: note: using v17 attributes; synthesizing resource com.AleladeStudio.Reflexable:layout/notification_template_big_media_narrow for configuration v17.
    26. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from <LinearLayout>
    27. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:77: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <LinearLayout>
    28. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:96: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <TextView>
    29. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:64: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
    30. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <LinearLayout>
    31. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_lines.xml: note: using v17 attributes; synthesizing resource com.AleladeStudio.Reflexable:layout/notification_template_lines for configuration v17.
    32. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_media.xml:43: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <include>
    33. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_media.xml:33: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout>
    34. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_media.xml: note: using v17 attributes; synthesizing resource com.AleladeStudio.Reflexable:layout/notification_template_media for configuration v17.
    35. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_chronometer.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <Chronometer>
    36. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_chronometer.xml: note: using v17 attributes; synthesizing resource com.AleladeStudio.Reflexable:layout/notification_template_part_chronometer for configuration v17.
    37. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_time.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <DateTimeView>
    38. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\notification_template_part_time.xml: note: using v17 attributes; synthesizing resource com.AleladeStudio.Reflexable:layout/notification_template_part_time for configuration v17.
    39. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <CheckedTextView>
    40. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from <CheckedTextView>
    41. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:drawableStart from <CheckedTextView>
    42. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml: note: using v13 attributes; synthesizing resource com.AleladeStudio.Reflexable:layout/select_dialog_multichoice_material for configuration v13.
    43. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <CheckedTextView>
    44. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from <CheckedTextView>
    45. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:drawableStart from <CheckedTextView>
    46. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml: note: using v13 attributes; synthesizing resource com.AleladeStudio.Reflexable:layout/select_dialog_singlechoice_material for configuration v13.
    47. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\drawable\abc_textfield_search_material.xml:19: note: removing attribute http://schemas.android.com/apk/res/android:state_activated from <item>
    48. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\drawable\abc_textfield_search_material.xml: note: using v11 attributes; synthesizing resource com.AleladeStudio.Reflexable:drawable/abc_textfield_search_material for configuration v11.
    49. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <CheckedTextView>
    50. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from <CheckedTextView>
    51. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_multichoice_material.xml: note: using v17 attributes; synthesizing resource com.AleladeStudio.Reflexable:layout/select_dialog_multichoice_material for configuration v17.
    52. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <CheckedTextView>
    53. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingEnd from <CheckedTextView>
    54. C:\Users\HP\Desktop\Unity Projects\Reflexable\Temp\StagingArea\android-libraries\appcompat-v7-23.1.1\res\layout\select_dialog_singlechoice_material.xml: note: using v17 attributes; synthesizing resource com.AleladeStudio.Reflexable:layout/select_dialog_singlechoice_material for configuration v17.
    55. AndroidManifest.xml:16: error: Error: No resource found that matches the given name (at 'theme' with value '[USER=863766]@StyLe[/USER]/Theme.IAPTheme').
    56.  
    57. ]
    58. stdout[
    59. Configurations:
    60. (default)
    61.  
    62. Files:
    63.   AndroidManifest.xml
    64.     Src: () AndroidManifest.xml
    65.  
    66. Resource Dirs:
    67. Including resources from package: D:\01.07.2015\android-sdks\platforms\android-23\android.jar
    68. applyFileOverlay for drawable
    69. trying overlaySet Key=ic_plusone_medium_off_client.png
    70. trying overlaySet Key=ic_plusone_small_off_client.png
    71. trying overlaySet Key=ic_plusone_standard_off_client.png
    72. trying overlaySet Key=ic_plusone_tall_off_client.png
    73. trying overlaySet Key=common_full_open_on_phone.png
    74. trying overlaySet Key=common_ic_googleplayservices.png
    75. trying overlaySet Key=common_google_signin_btn_icon_dark.xml
    76. trying overlaySet Key=common_google_signin_btn_icon_dark_disabled.9.png
    77. trying overlaySet Key=common_google_signin_btn_icon_dark_focused.9.png
    78. trying overlaySet Key=common_google_signin_btn_icon_dark_normal.9.png
    79. trying overlaySet Key=common_google_signin_btn_icon_dark_pressed.9.png
    80. trying overlaySet Key=common_google_signin_btn_icon_light.xml
    81. trying overlaySet Key=common_google_signin_btn_icon_light_disabled.9.png
    82. trying overlaySet Key=common_google_signin_btn_icon_light_focused.9.png
    83. trying overlaySet Key=common_google_signin_btn_icon_light_normal.9.png
    84. trying overlaySet Key=common_google_signin_btn_icon_light_pressed.9.png
    85. trying overlaySet Key=c<message truncated>
    Google Ad mob AndroidManifest.xml (APPID chanced *)

    Code (CSharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <!-- This file was automatically generated by the Google Play Games plugin for Unity
    3.      Do not edit. -->
    4. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    5.     package="com.google.example.games.mainlibproj"
    6.     android:versionCode="1"
    7.     android:versionName="1.0" >
    8.  
    9.     <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />
    10.  
    11.     <!-- replaced during setup -->
    12.  
    13.  
    14.     <application>
    15.  
    16.      <!-- Required for Nearby Connections API -->
    17.         <meta-data android:name="com.google.android.gms.nearby.connection.SERVICE_ID"
    18.             android:value="" />
    19.  
    20.         <!-- the space in these forces it to be interpreted as a string vs. int -->
    21.         <meta-data android:name="com.google.android.gms.games.APP_ID"
    22.             android:value="\ 55*******" />
    23.         <meta-data android:name="com.google.android.gms.appstate.APP_ID"
    24.             android:value="\ 55********" />
    25.         <meta-data android:name="com.google.android.gms.version"
    26.             android:value="@integer/google_play_services_version" />
    27.  
    28.         <activity android:name="com.google.games.bridge.NativeBridgeActivity"
    29.             android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    30.     </application>
    31. </manifest>
    32.  

    google play services AndroidManifest.xml in the MainLibProj folder

    Code (CSharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <!-- This file was automatically generated by the Google Play Games plugin for Unity
    3.      Do not edit. -->
    4. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    5.     package="com.google.example.games.mainlibproj"
    6.     android:versionCode="1"
    7.     android:versionName="1.0" >
    8.  
    9.     <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />
    10.  
    11.     <!-- replaced during setup -->
    12.  
    13.     <application>
    14.  
    15.      <!-- Required for Nearby Connections API -->
    16.         <meta-data android:name="com.google.android.gms.nearby.connection.SERVICE_ID"
    17.             android:value="" />
    18.  
    19.         <!-- the space in these forces it to be interpreted as a string vs. int -->
    20.         <meta-data android:name="com.google.android.gms.games.APP_ID"
    21.             android:value="\ 55******" />
    22.         <meta-data android:name="com.google.android.gms.appstate.APP_ID"
    23.             android:value="\ 55*****" />
    24.         <meta-data android:name="com.google.android.gms.version"
    25.             android:value="[USER=54*****]@Integer[/USER]/google_play_services_version" />
    26.  
    27.         <activity android:name="com.google.games.bridge.NativeBridgeActivity"
    28.             android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    29.     </application>
    30. </manifest>
    Project Folder
     
    Last edited: Dec 8, 2015
  4. mostrolabs

    mostrolabs

    Joined:
    Apr 30, 2015
    Posts:
    2
    There's no need of removing methods from BackgroundResolution.cs nor removing all the .aar files, just follow what it's here: https://github.com/playgameservices/play-games-plugin-for-unity/issues/814#issuecomment-157950321 in BackgroundResolution.cs -> AddDependencies() add the following:

    svcSupport.DependOn("com.google.android.gms",
    "play-services-ads",
    PluginVersion.PlayServicesVersionConstraint);
    and in Plugin/Android/GoogleMobileAdsPlugin/AndroidManifest.xmlremove the lines:

    <activityandroid:name="com.google.android.gms.ads.AdActivity" ... />
    <activityandroid:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity".../>​

    That solves the problem and keep all the functionality from updated version of GooglePlayGameServices
     
    rasmus-unity likes this.
  5. in2grated

    in2grated

    Joined:
    Dec 8, 2015
    Posts:
    5
    Thank you so much. I was thinking something is wrong. The problem is fixed. Thank you again.
     
  6. Deleted User

    Deleted User

    Guest

    thank you veryveryvery much!
     
  7. aquariens

    aquariens

    Joined:
    Feb 15, 2016
    Posts:
    3
    Hello,

    I am having the same problem with Unity 5.3.2f1 Admob V. 3.0.1 and GPGS 8.4.0, GPGS was working fine but after adding admob it is not connecting anymore and also ads are not showing.

    What i have noticed is that when i include admob plugin and tweaks by @mostrolabs it deletes play-services-basement-8.4.0.aar file from plugin\android folder that seems to me the issue?

    Included is the SS play-services-basement.jpg
     
  8. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    yeah the problem is that Admob plugin together with google play plugin is a mess. If you install admob plugin it will remove your play-services-basement aar and also add the play-services-ads
    and no matter how you try to fix it later, it won't work, because it seems to patch something on your sdk installation and it will remove and add that file ALL THE TIME and make unity build fail.

    Someone deserves to be hang at Google for this. I don't know how many hours people lost trying to solve it. (I've spent 2 days, after a nice email from google asking me to try their wonderful google admob... worst decision ever!)

    How to fix it? If you don't want admob (which I don't after this awesome experience).
    Close unity, remove the ads aar, put back the basement aar. Important to have Unity closed because it will try to restore whatever you change otherwise.
    Then edit the BackgroundResolution.cs file... and comment out all the inside of OnPostprocessAllAssets method.

    Now you can open unity. FINALLY it won't try to adjust it.

    If you want Admob?
    I guess you can do the same but leave the ads aar inside. I haven't tried it because I'm swearing on it right now, cursing it and asking for whoever created the plugin to be punished by Chuck Norris.
     
    GabLeRoux likes this.
  9. tweetfold

    tweetfold

    Joined:
    Jun 11, 2016
    Posts:
    1
    This all long solution was not needed for me, I had just updated the Java version to jdk1.8.0_91
    Update environment variables
    JAVA_HOME - C:\Program Files\Java\jdk1.8.0_91
    PATH=%PATH%;C:\Program Files\Java\jdk1.8.0_91\bin

    This will solve entire issues you have.
     
    Last edited: Jun 12, 2016
  10. google_play_service_dev

    google_play_service_dev

    Joined:
    Oct 2, 2016
    Posts:
    16
  11. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    yeah they finally fixed it on may or so. Now the created a new problem though, if you import google play and Facebook sdk, your iOS build will fail. It makes unity crash. Already reported it a month ago.
     
  12. OsamaRazaAnsari

    OsamaRazaAnsari

    Joined:
    Nov 28, 2016
    Posts:
    3
    having this problem when I add Admob and google-play-servies together. error.png
     
  13. VegaStudio_Kevin

    VegaStudio_Kevin

    Joined:
    Jun 11, 2014
    Posts:
    12
  14. czater

    czater

    Joined:
    Aug 15, 2015
    Posts:
    4
    Is this still working? Becouse I was not able to show leaderboards and achievements :/ Admob works.
     
  15. Shenanigans2

    Shenanigans2

    Joined:
    Jul 8, 2018
    Posts:
    4
    here's a 5 min video that shows how to import both google play services and admob

     
  16. c3e3m

    c3e3m

    Joined:
    Nov 29, 2018
    Posts:
    6
    i did as the video but still cant open apk file, any other solution?