Error: Default interface methods are only supported starting with Android N (--min-api 24): java.io.InputStream org.apache.poi.sl.usermodel.ObjectShape.readObjectData()

项目运行的时候,如果报错

Error: Default interface methods are only supported starting with Android N (--min-api 24): java.io.InputStream org.apache.poi.sl.usermodel.ObjectShape.readObjectData()

解决方案:

在app的build.gradle文件中添加以下代码

apply plugin: ‘com.android.application‘

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.why.project.demo"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile(‘proguard-android.txt‘), ‘proguard-rules.pro‘
        }
    }
    //
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(include: [‘*.jar‘], dir: ‘libs‘)
    implementation ‘com.android.support:appcompat-v7:28.0.0‘
    implementation ‘com.android.support.constraint:constraint-layout:1.1.3‘
    testImplementation ‘junit:junit:4.12‘
    androidTestImplementation ‘com.android.support.test:runner:1.0.2‘
    androidTestImplementation ‘com.android.support.test.espresso:espresso-core:3.0.2‘

}

原文地址:https://www.cnblogs.com/whycxb/p/9796879.html

时间: 2024-11-10 05:05:02

Error: Default interface methods are only supported starting with Android N (--min-api 24): java.io.InputStream org.apache.poi.sl.usermodel.ObjectShape.readObjectData()的相关文章

Error: Default interface methods are only supported starting with Android N (--min-api 24)类似问题解决

在app的build.gradle文件中android{添加以下代码 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } 原文地址:https://www.cnblogs.com/loaderman/p/12103280.html

8、D8: Default interface methods are only supported starting with Android N (--min-api 24): void

1.错误信息 升级完 Android N 后,有些项目运行起来报错信息大致如下: Default interface methods are only supported starting with Android N (--min-api 24): void android.arch.lifecycle.DefaultLifecycleObserver.onCreate(android.arch.lifecycle.LifecycleOwner) Message{kind=ERROR, tex

spark error Caused by: java.io.NotSerializableException: org.apache.hadoop.hdfs.DistributedFileSystem

序列化问题多事rdd遍历过程中使用了没有序列化的对象. 1.将未序列化的变量定义到rdd遍历内部.如定义入数据库连接池. 2.常量定义里包含了未序列化对象 ,提出去吧 如下常量要放到main里,不能放到rdd的遍历中. val HBASE_TABLE = sparkModel.getUserParamsVal("hbbase_table", "default_table_name") 原文地址:https://www.cnblogs.com/shaozhiqi/p/

mybatis报错 Error instantiating interface com.atguigu.mybatis.dao.DepartmentMapper with invalid types () or values ()

错因在于把 <association property="dept" select="com.atguigu.mybatis.dao.DepartmentMapper.getDeptById" column="d_id"> </association> 写成了 <association property="dept" javaType="com.atguigu.mybatis.dao.D

android studio安卓项目出现Error: Default Activity Not Found错误无法编译的解决方案

项目明明是没有问题的,有时候突然就出现Error: Default Activity Not Found错误,以前出现过我重新安装了android studio 都没有用,后来在网上(http://stackoverflow.com/questions/15825081/error-default-activity-not-found)终于找到了解决方案.方法很简单,按以下步骤就可以解决.方法: File -> Invalidate Caches / Restart...在android stu

Pig错误:ERROR 2998: Unhandled internal error. Found interface jline.Terminal, but class was expected

运行Pig时出现这个错误: [main] ERROR org.apache.pig.Main - ERROR 2998: Unhandled internal error. Found interface jline.Terminal, but class was expected 解决的办法是把${HADOOP_HOME}/share/hadoop/yarn/lib下的jline-2.1.1.jar删除掉,再重启Hadoop就可以了.

运行pig出错Unhandled internal error. Found interface jline.Terminal, but class was expected

运行pig时报如下错误 2015-07-14 10:41:12,869 [main] ERROR org.apache.pig.Main - ERROR 2998: Unhandled internal error. Found interface jline.Terminal, but class was expected 解决办法: 删除{HADOOP_HOME}/share/hadoop/yarn/lib下的jline,然后将{PIG_HOME}/lib下的jline拷到{HADOOP_H

Java 中 modifer &amp;#39;public&amp;#39; is reduntant for interface methods

http://androidren.com/index.php?qa=322&qa_1=java-%E4%B8%AD-modifer-public-is-reduntant-for-interface-methods 常常会看到接口上写了public修饰方法,然后IDE,比方:Eclipse或者IDEA常常会提示public是多余的.后来就查了一下.java默认接口的方法是public和abstract的,所以真不是必需.同一时候,假设你使用private或者protected都会报错. 所以,

Error: cannot call methods on draggable prior to initialization; attempted to call

cannot call methods on draggable prior to initialization; attempted to call  报这个问题的根本原因是因为你的引用文件有问题 ,你的jquery 的js或者css样式引用重复导致它读取两次,初始化失败就会报这个错误,好好看看配置文件 Error: cannot call methods on draggable prior to initialization; attempted to call