And*_*Dev 5 android gradle android-studio build.gradle
我安装了新版本的Android Studio“ 2.1.0.9”。现在,当在此同步gradle错误消息时:
gradle failed resolve com.theartofdev.edmodo:android-image-cropper:+
Run Code Online (Sandbox Code Playgroud)
我使用了任何版本的图像裁剪器,但仍然存在此消息。摇篮:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
mavenCentral()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-v4:23.1.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3'
compile 'com.theartofdev.edmodo:android-image-cropper:2.0.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.5.0'
}
android {
compileSdkVersion 'Google Apis:Google Apis:23'
buildToolsVersion '23.0.2'
useLibrary 'org.apache.http.legacy'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
}
Run Code Online (Sandbox Code Playgroud)
你应该用这个替换依赖
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
Run Code Online (Sandbox Code Playgroud)
这个对我有用
在从各种来源搜索并找到解决方案后,以下步骤对我有用。
步骤1:在android/app/src/main的AndroindManifest.xml 中添加以下内容
<activity
android:name="com.canhub.cropper.CropImageActivity"
android:theme="@style/Base.Theme.AppCompat">
</activity>
Run Code Online (Sandbox Code Playgroud)
步骤2: 将以下代码行添加到/android/build.gradle
allprojects {
repositories {
.................................
//noinspection JcenterRepositoryObsolete
jcenter() {
content {
includeModule("com.theartofdev.edmodo", "android-image-cropper")
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
步骤3:在andoid/app/build.gradle 的dependency {}节点 内添加以下行
implementation "com.theartofdev.edmodo:android-image-cropper:2.8.0"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3272 次 |
| 最近记录: |