Java Android studio error: unable to parse
•
Android
I'm trying to implement gradle:
compile 'com.edmodo:cropper:1.0.2'
.. In my project, and I keep making mistakes when building gradle. The errors I get are:
That's all it shows, not even the reason. I also mentioned the answer to this, but the error still exists. Why does this error usually occur?
Edit:
My build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Edit:
Application module
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.myapp.testapp"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.code.gson:gson:2.3'
compile 'com.google.guava:guava:18.0'
compile 'com.googlecode.android-query:android-query:0.25.9'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
compile 'com.edmodo:cropper:1.0.2'
}
resolvent:
You can compile 'com. Edmodo: cropper: 1.0.1' using
build.gradle
repositories
{
mavenCentral()
}
dependencies {
compile 'com.edmodo:cropper:1.0.1'
}
Then clean - rebuild - restart - synchronize your project
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码