Giter VIP home page Giter VIP logo

Comments (5)

CNHTT avatar CNHTT commented on July 29, 2024

settings.gradle

dependencyResolutionManagement {
// repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
// -->
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
// 1.添加MobSDK Maven地址
maven {
url "https://mvn.mob.com/android"
}
}
}

from sharesdk-for-android.

appdev avatar appdev commented on July 29, 2024

classpath 不需要了吗?

from sharesdk-for-android.

appdev avatar appdev commented on July 29, 2024

现在已经是这样了。

plugins {
    id 'com.android.application' version '7.2.1' apply false
    id 'com.android.library' version '7.2.1' apply false
    id 'org.jetbrains.kotlin.android' version '1.7.0' apply false
    //com.mob.sdk:MobSDK:2018.0319.1724
//    id 'com.mob.sdk' version 'MobSDK:2018.0319.1724' apply false
}

from sharesdk-for-android.

ve-weiyi avatar ve-weiyi commented on July 29, 2024

我也想问,7以后怎么使用

from sharesdk-for-android.

ve-weiyi avatar ve-weiyi commented on July 29, 2024

我找了半天,最后在一篇博客上找到的解决方法。
博客链接:https://www.jianshu.com/p/4cf5cb9e4b99

1.在最外层的build.gradle里增加classpath的引用
`buildscript {
dependencies {
// 2.注册MobSDK
classpath "com.mob.sdk:MobSDK:2018.0319.1724"
}
}

plugins {
id 'com.android.application' version '7.1.2' apply false
id 'com.android.library' version '7.1.2' apply false
id 'org.jetbrains.kotlin.android' version '1.6.21' apply false
}
apply from: "config.gradle"

task clean(type: Delete) {
delete rootProject.buildDir
}`

2.修改settings.gradle里的配置
`
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
// 1.添加MobSDK Maven地址
maven {
url "https://mvn.mob.com/android"
}
}
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
// 1.添加MobSDK Maven地址
maven {
url "https://mvn.mob.com/android"
}
jcenter()
}
}
`
修改repositoriesMode的参数,改为RepositoriesMode.PREFER_SETTINGS(原本的参数为RepositoriesMode.FAIL_ON_PROJECT_REPOS)

from sharesdk-for-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.