zhanghai / MaterialProgressBar

Material Design ProgressBar with consistent appearance
Apache License 2.0
2.21k stars 279 forks source link

How to be compatible with my local version:25.0.2. #74

Closed Sky24n closed 6 years ago

Sky24n commented 6 years ago

Error:Could not find com.android.support:appcompat-v7:26.0.2. Required by: project :base Please install the Android Support Repository from the Android SDK Manager. Open Android SDK Manager

zhanghai commented 6 years ago
compile ('me.zhanghai.android.materialprogressbar') {
    exclude group: 'com.android.support', module: 'appcompat-v7'
}
compile 'com.android.support:appcompat-v7:25.0.2'
Sky24n commented 6 years ago

Error:Supplied String module notation 'me.zhanghai.android.materialprogressbar' is invalid. Example notations: 'org.gradle:gradle-core:2.2', 'org.mockito:mockito-core:1.9.5:javadoc'.

Sky24n commented 6 years ago

This is local build: android { compileSdkVersion 25 buildToolsVersion "25.0.2"

defaultConfig {
    minSdkVersion 15
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
}

} dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.android.support:recyclerview-v7:25.3.1' }

classpath 'com.android.tools.build:gradle:2.3.2'

zhanghai commented 6 years ago

Are you building this project locally, or using this library as a dependency? (Because I saw no materialprogressbar in your build.gradle) If you mean the latter one, try this:

compile ('me.zhanghai.android.materialprogressbar:library:1.4.2') {
    exclude group: 'com.android.support', module: 'appcompat-v7'
    exclude group: 'com.android.support', module: 'support-annotations'
}
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-annotations:25.3.1'

The basic idea is to exclude the transitive dependency with new version pulled in by this library, and supply older version manually.

Sky24n commented 6 years ago

All right,Thank you very much.