Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Gradle Errors : Loosing my mind please help i will do anything [Onesignal]

Discussion in 'Android' started by MosesGameDev, Aug 31, 2019.

  1. MosesGameDev

    MosesGameDev

    Joined:
    Jul 27, 2013
    Posts:
    6
    I have been having issues with plugin compatibility in my project while integrating one signal SDK:

    Duplicate class android.support.customtabs.ICustomTabsCallback$Stub found in modules anroid-support-customtabs-23.3.0.jar (anroid-support-customtabs-23.3.0.jar) and classes.jar androidx.browser.browser-1.0.0
    UnityEngine.GUIUtility rocessEvent(Int32, IntPtr)


    One signal has a troubleshooting guide https://documentation.onesignal.com/docs/troubleshooting-unity which I have attempted to follow but with no success, Upon implementing their instructions I get an error

    Plugin with id 'com.android.application' not found.

    I suspect that maybe I am not editing the main template.grade file as required. I am completely out of my depth and have no technical knowledge in matters android.

    below is my main Gradle template file:

    Code (CSharp):
    1. buildscript {
    2.     repositories {
    3.         maven { url 'https://plugins.gradle.org/m2/'}
    4.     }
    5.     dependencies {
    6.         classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.3, 0.99.99]'
    7.     }
    8. }
    9. apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
    10.  
    11. repositories {
    12.     maven { url 'https://maven.google.com' }
    13. }
    14.  
    15. apply plugin: 'com.android.application'
    16. **APPLY_PLUGINS**
    17.  
    18. dependencies {
    19.     implementation fileTree(dir: 'libs', include: ['*.jar'])
    20. **DEPS**}
    21.  
    22. android {
    23.     compileSdkVersion **APIVERSION**
    24.     buildToolsVersion '**BUILDTOOLS**'
    25.  
    26.     compileOptions {
    27.         sourceCompatibility JavaVersion.VERSION_1_8
    28.         targetCompatibility JavaVersion.VERSION_1_8
    29.     }
    30.  
    31.     defaultConfig {
    32.         minSdkVersion **MINSDKVERSION**
    33.         targetSdkVersion **TARGETSDKVERSION**
    34.         applicationId '**APPLICATIONID**'
    35.         ndk {
    36.             abiFilters **ABIFILTERS**
    37.         }
    38.         versionCode **VERSIONCODE**
    39.         versionName '**VERSIONNAME**'
    40.     }
    41.  
    42.     lintOptions {
    43.         abortOnError false
    44.     }
    45.  
    46.     aaptOptions {
    47.         noCompress = ['.unity3d', '.ress', '.resource', '.obb'**STREAMING_ASSETS**]
    48.         ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
    49.     }**SIGN**
    50.  
    51.     buildTypes {
    52.         debug {
    53.             minifyEnabled **MINIFY_DEBUG**
    54.             useProguard **PROGUARD_DEBUG**
    55.             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD****SIGNCONFIG**
    56.             jniDebuggable true
    57.         }
    58.         release {
    59.             minifyEnabled **MINIFY_RELEASE**
    60.             useProguard **PROGUARD_RELEASE**
    61.             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD****SIGNCONFIG**
    62.         }
    63.     }**PACKAGING_OPTIONS****SPLITS**
    64. **BUILT_APK_LOCATION**
    65. **EXTERNAL_SOURCES**
    66.     bundle {
    67.         language {
    68.             enableSplit = false
    69.         }
    70.         density {
    71.             enableSplit = false
    72.         }
    73.         abi {
    74.             enableSplit = true
    75.         }
    76.     }
    77. }**SPLITS_VERSION_CODE****REPOSITORIES****SOURCE_BUILD_SETUP**
    I would appriciate any help in resolving this issue
     
    Last edited: Aug 31, 2019
  2. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,832
    Post a screenshot of Assets/Plugins/Android folder and mention what PlayServicesResolver version you have and its settings for android (screenshot).
     
  3. MosesGameDev

    MosesGameDev

    Joined:
    Jul 27, 2013
    Posts:
    6

    Resolver version 1.2.124
    Image link

     
  4. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,832
    Just search for "support" in your project once and pass me the screenshot. If you see any thing like "support-v4", just delete and build it again.
     
  5. saipraneeth34

    saipraneeth34

    Joined:
    Nov 17, 2017
    Posts:
    7
    I too am facing same issue.. :(
    Did you fix it?
     
  6. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,832
    This happens only if you have duplicate libraries. Just find out and delete the duplicates.