- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
请帮助我,我已经搜索了很多但找不到任何解决此错误的方法。
build.gragle:
apply plugin: 'com.android.application'
android {
signingConfigs {
config {
keyAlias 'leadtrak'
keyPassword 'leadtrak1'
storeFile file('/home/sheraz/AndroidStudioProjects/LeadTrak/LeadTrack/docs/LeadTrakKeyStore.jks')
storePassword 'leadtrak1'
}
}
compileSdkVersion 24
buildToolsVersion "24.0.1"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "leadtrak.activities"
minSdkVersion 9
targetSdkVersion 9
}
buildTypes {
release {
signingConfig signingConfigs.config
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
dependencies {
compile 'com.android.support:support-v4:24.2.1'
compile 'com.google.android.gms:play-services:+'
compile files('libs/acra-4.4.0.jar')
compile files('libs/commons-codec.jar')
compile files('libs/ksoap2.jar')
compile files('libs/sqlcipher.jar')
compile files('libs/twilioclient-android.jar')
compile files('libs/zip4j_1.3.1.jar')
}
错误日志:
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(net.lingala.zip4j.util.ArchiveMaintainer$1) 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. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(net.lingala.zip4j.unzip.Unzip$1) 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. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(net.lingala.zip4j.unzip.Unzip$2) 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. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(net.lingala.zip4j.util.ArchiveMaintainer$2) 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. Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(net.lingala.zip4j.zip.ZipEngine$1) 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. Error:The number of method references in a .dex file cannot exceed 64K. Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html Error:Execution failed for task ':app:transformClassesWithDexForRelease'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 2
最佳答案
我认为这是你的主要问题
The number of method references in a .dex file cannot exceed 64K.
要解决此问题,请将以下行放入您的应用级 gradle 文件。
将这一行放在defaultConfig block 中
multiDexEnabled true
并添加以下依赖
compile 'com.android.support:multidex:1.0.1'
在此之后重建您的项目。希望这可以解决您的错误。
并尝试避免 + 符号,同时在您的项目中添加依赖项,就像您处理播放服务依赖项一样
要删除 OutOfMemory 错误,请在应用级 gradle 文件的 android block
中添加此内容。
dexOptions {
//incremental true
javaMaxHeapSize "4g"
}
关于android - 错误 :warning: Ignoring InnerClasses attribute for an anonymous inner class,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39851808/
这个问题已经有答案了: Instantiate inner class object from current outer class object (3 个回答) 已关闭 7 年前。 我正在查看一些
我正在阅读 Bruce Eckel 所著的《Thinking in Java》一书。我在内部类一章中遇到了这个断言,它说:“使用本地内部类而不是匿名内部类的唯一理由是,如果您需要命名构造函数和/或重载
内部类的分类 1、本地内部类 2、实例内部类 3、静态内部类 4、匿名内部类 首先,我要在这声明一下,内部类也是类,不管它是属于何种类型。 说这个是为了端正你们内部类的角度。 只要是类,就会有类的特性
Student.Student_Card obj4 = Student.new Student_Card(namess, idss, true); Student 类是外部类,Studen_Card
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 1
基于答案:https://stackoverflow.com/a/47693998/8760211 当我尝试从类 Invoker 中对类型为 Student 的元素的列表进行排序时,发生以下编译错误。
http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.6 Every CONSTANT_Class_info e
我有几个导入的 jar 在项目构建时在 Eclipse 中出现此错误: [2011-04-08 16:31:48 - MokbeeAndroid] Dx warning: Ignoring Inner
我有一个java类,它有一些公共(public)方法,我想保留它们。 (这已经完成了)我还有一个包含静态常量的内部类。该类具有以下结构。 public class MyClass { publ
我有两个类:OuterClass 和 InnerClass。 InnerClass 是 OuterClass 的私有(private)成员,应使用 InnerClass(int) 构造函数在 Oute
我在 Android Studio 中构建代码时收到此警告。 它们很少会不显示,但大多数时候会显示。 warning: Ignoring InnerClasses attribute for an a
我是 Android 新手,正在使用 Ical4j 库来解析 ICS(Outlook 日历)文件。 但是,当我在 Eclipse 中构建应用程序时,控制台中多次出现以下警告: [2010-07-22
我有一个用 Java 编写的 REST 服务。我有一个运行良好的 GET 方法,现在我想实现 POST 方法。 @POST @Consumes(MediaType.APPLICATION_JSON)
伙计们。我对 Android 中的 PopupWindow 有疑问。 我有2个Buttons,点击任何一个都会显示一个popupWindow,它是外部类中的一个成员变量。 两个popupWindow的
伙计们。我收到这些错误(其中 504 个): Error:warning: Ignoring InnerClasses attribute for an anonymous inner class E
我最近升级到 Android Studio 3.1,并在使用 Java 项目构建 Kotlin 时收到以下警告。 InnerClass annotations are missing correspo
我正在尝试从 ClassB 访问 ClassA 中定义的内部类 Class1 ClassB.java public class ClassB implements Initializable {
我对在实例上调用 new 的可能性感到困惑,比如 InnerClass sc = pc.new InnerClass(); 我知道如何使用它,但我的问题是关于完全理解它。喜欢: JAVA文档中哪里有描
我正在尝试逐步执行名为 SVNPublisher 的 Hudson 插件的代码。我检查了 SVNPublisher 的代码,使用 Netbeans 打开项目,然后单击“调试主项目”。这导致 Firef
这是我的 java 文件的样子: public class MyActivity { public class MyVector {
我是一名优秀的程序员,十分优秀!