这个问题,我更新我的Android工作室2.0之后发生的,当我尝试运行我得到这个:错误:警告:忽略InnerClasses属性为一个匿名内部类错误:(org.jsonschema2pojo.gradle)
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(org.jsonschema2pojo.gradle.GenerateJsonSchemaTask$_configureAndroid_closure4) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any "-target" type options. The consequence of ignoring Error:this warning is that reflective operations on this class will incorrectly Error:indicate that it is not an inner class.
这是我的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:[email protected]'
compile 'com.nineoldandroids:library:2.4.0'
compile('com.crashlytics.sdk.android:crashlytics:[email protected]') {
transitive = true;
}
}
我有同样的问题。请按照下列步骤操作: 1-关闭Android Studio并重新打开它 2 -Re构建您的项目 这对我有用。我希望这项工作也给你 –
我很确定我试过,然后我试着解决方案,我只是给了它,奇怪的是它的工作,反正谢谢:) –