Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration with name 'compileClasspath' not found #257

Closed
dhvl05 opened this issue Dec 17, 2019 · 3 comments
Closed

Configuration with name 'compileClasspath' not found #257

dhvl05 opened this issue Dec 17, 2019 · 3 comments

Comments

@dhvl05
Copy link

@dhvl05 dhvl05 commented Dec 17, 2019

I'm having so much trouble with this error, I've tried AndroidX Compatibility Guide but no luck :(
I also tried changing gradle versions and onesignal-gradle-plugin versions but still not getting over and OneSignal Dashboard is giving me Missing Android Support Library error.

This is what my mainTemplate.gradle look like

buildscript {
    repositories {
        maven { url 'https://plugins.gradle.org/m2/'}
    }
    dependencies {
        classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.6, 0.99.99]'
    }
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

repositories {
    maven { url 'https://maven.google.com' }
}

buildscript {
    repositories {
        mavenCentral()
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.0'
**BUILD_SCRIPT_DEPS**}
}

allprojects {
    repositories {
        mavenCentral()
        google()
        jcenter()
        flatDir {
            dirs 'libs'
        }
    }
}

// Android Resolver Repos Start
([rootProject] + (rootProject.subprojects as List)).each {
    ext {
        it.setProperty("android.useAndroidX", true)
        it.setProperty("android.enableJetifier", true)
    }
}
([rootProject] + (rootProject.subprojects as List)).each { project ->
    project.repositories {
        def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
        maven {
            url "https://maven.google.com"
        }
        mavenLocal()
        jcenter()
        mavenCentral()
    }
}
// Android Resolver Repos End
apply plugin: 'com.android.library'
**APPLY_PLUGINS**

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
// Android Resolver Dependencies Start
    implementation 'com.android.support:appcompat-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    implementation 'com.android.support:cardview-v7:[26.0.0, 27.2.0[' // Assets/OneSignal/Editor/OneSignalDependencies.xml:7
    implementation 'com.android.support:cardview-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    implementation 'com.android.support:customtabs:[26.0.0, 27.2.0[' // Assets/OneSignal/Editor/OneSignalDependencies.xml:8
    implementation 'com.android.support:customtabs:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    implementation 'com.android.support:support-v4:[26.0.0, 27.2.0[' // Assets/OneSignal/Editor/OneSignalDependencies.xml:6
    implementation 'com.android.support:support-v4:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    implementation 'com.facebook.android:facebook-applinks:[5,6)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:6
    implementation 'com.facebook.android:facebook-core:[5,6)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:5
    implementation 'com.facebook.android:facebook-login:[5,6)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:7
    implementation 'com.facebook.android:facebook-share:[5,6)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:8
    implementation 'com.google.android.gms:play-services-base:[10.2.1, 12.1.0[' // Assets/OneSignal/Editor/OneSignalDependencies.xml:3
    implementation 'com.google.android.gms:play-services-location:[10.2.1, 12.1.0[' // Assets/OneSignal/Editor/OneSignalDependencies.xml:5
    implementation 'com.google.firebase:firebase-messaging:[10.2.1, 12.1.0[' // Assets/OneSignal/Editor/OneSignalDependencies.xml:4
    implementation 'com.parse.bolts:bolts-android:1.4.0' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:4
// Android Resolver Dependencies End
**DEPS**}

// Android Resolver Exclusions Start
android {
  packagingOptions {
      exclude ('/lib/armeabi/*' + '*')
      exclude ('/lib/mips/*' + '*')
      exclude ('/lib/mips64/*' + '*')
      exclude ('/lib/x86/*' + '*')
      exclude ('/lib/x86_64/*' + '*')
  }
}
// Android Resolver Exclusions End
android {
    compileSdkVersion **APIVERSION**
    buildToolsVersion '**BUILDTOOLS**'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        minSdkVersion **MINSDKVERSION**
        targetSdkVersion **TARGETSDKVERSION**
        ndk {
            abiFilters **ABIFILTERS**
        }
        versionCode **VERSIONCODE**
        versionName '**VERSIONNAME**'
        consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
    }

    lintOptions {
        abortOnError false
    }

    aaptOptions {
        ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
    }**PACKAGING_OPTIONS**
}**REPOSITORIES****SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**
@jkasten2
Copy link
Member

@jkasten2 jkasten2 commented Dec 17, 2019

@dhvl05 Thanks for reporting. This is the same issue as #248 so please follow that issue for updates on this Unity 2019.3 issue.

@profimedica
Copy link

@profimedica profimedica commented Jun 12, 2020

configurations {
    compileClasspath
}
buildscript {
    repositories {
        ...
    }

    dependencies {
        ...
    }
}

@yuk121
Copy link

@yuk121 yuk121 commented Mar 22, 2022

configurations {
    compileClasspath
}
buildscript {
    repositories {
        ...
    }

    dependencies {
        ...
    }
}

It works for me! thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants