Android 目录:https://blog.csdn.net/dkbnull/article/details/87932847

 

开发安卓项目时,引入了自己之前封装的一个jar包,该jar包使用了一些Java8特性,引入之后sync成功了,但是等到编译的时候就报错:

Android issues:    Invoke-customs are only supported starting with Android O (--min-api 26)Java compiler:    com.android.builder.dexing.DexArchiveBuilderException: Failed to process xxxxxx\app\libs\util-1.0.12.jar    com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.    com.android.tools.r8.CompilationFailedException: Compilation failed to complete    com.android.tools.r8.utils.AbortException

Invoke-customs are only supported starting with Android O (--min-api 26)_第1张图片

在 build.gradle 中增加如下代码:

        compileOptions {            sourceCompatibility JavaVersion.VERSION_1_8            targetCompatibility JavaVersion.VERSION_1_8        }

如下图所示

Invoke-customs are only supported starting with Android O (--min-api 26)_第2张图片

再编译,成功。

 

更多相关文章

  1. pandaboard ES学习之旅——4 Android源代码下载与编译
  2. android 开发 解码gif图片,获取每帧bitmap
  3. android图片压缩质量参数Bitmap.Config RGB_565等的含义
  4. Android怎么让RadioButton图片居中显示
  5. android点击按钮控制图片切换-kotlin
  6. android 触摸手指动作放大和缩小图片
  7. android百度地图标记点代码
  8. Android 调用系统相册选择图片并显示
  9. android自带图片资源

随机推荐

  1. 热修复AndFix详解
  2. Android趣事五则
  3. VLC Android播放器介绍
  4. Linux Kernel and Android(安卓)休眠与唤
  5. android 命令介绍
  6. textview中加链接
  7. android 静音与振动
  8. ImageView androidscaleType属性详解
  9. 关于Android的keystore生成和查看keystor
  10. Android(安卓)的 Tweened animation