这个问题发生在我将我的android工作室更新为2.0后,当我尝试运行时我得到了这个:
错误:警告:忽略匿名内部类的InnerClasses属性 错误:(org.jsonschema2pojo.gradle.GenerateJsonSchemaTask $ _configureAndroid_closure4)没有附带 错误:关联EnclosingMethod属性。这堂课可能是由一个 错误:未针对现代.class文件格式的编译器。推荐 错误:解决方案是使用最新的编译器从源代码重新编译类 错误:并且未指定任何“-target”类型选项。无视的后果 错误:此警告是对此类的反射操作将不正确 错误:表明不是内部类。
这是我的build.gradle(Modeule:app)
有人可以向我解释如何解决这个问题。
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 {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "tazligen.com.tazligen"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'NOTICE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txtd'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/NOTICE.txt'
}
productFlavors {
}
}
ext {
supportLibVersion = "23.2.1"
googlePlayServicesVersion = "8.4.0"
junitVersion = "4.12"
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile "junit:junit:${junitVersion}"
// Android Support Library
compile "com.android.support:appcompat-v7:${supportLibVersion}"
compile "com.android.support:cardview-v7:${supportLibVersion}"
compile "com.android.support:support-v4:${supportLibVersion}"
compile "com.android.support:recyclerview-v7:${supportLibVersion}"
compile "com.android.support:design:${supportLibVersion}"
// Networking libraries
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.google.code.gson:gson:2.6.2'
compile 'org.jsonschema2pojo:jsonschema2pojo-gradle-plugin:0.4.16'
compile 'javax.annotation:jsr250-api:1.0'
compile 'org.apache.httpcomponents:httpmime:4.3.1'
compile 'org.apache.httpcomponents:httpcore:4.4.4'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'io.realm:realm-android:0.84.1'
compile 'info.hoang8f:android-segmented:1.0.6'
compile 'com.github.blackfizz:eazegraph:1.2.2@aar'
compile 'com.nineoldandroids:library:2.4.0'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
}
答案 0 :(得分:2)
我自己解决了这个问题。好吧,我刚刚删除了这行
compile 'org.jsonschema2pojo:jsonschema2pojo-gradle-plugin:0.4.16'
它有效。猜猜在android studio 2.0中这不再需要了。无论如何它对我有用。