Android Studio Instant 运行无法在 android 中使用 java 8

标签 android android-studio java-8 android-instant-run

将 java 8 用于简洁的 Lambda 表达式等,但缺点是无法即时运行。 buildToolsVersion "23.0.3"

compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

如何使用 Java 8 特性启用即时运行

最佳答案

来自官方文档:

Known Issues Instant Run does not currently work with Jack and will be disabled while using the new toolchain.

https://developer.android.com/preview/j8-jack.html

关于Android Studio Instant 运行无法在 android 中使用 java 8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38323162/

相关文章:

Android Studio 北极狐无法使用 mockk 运行 JUnit 配置

android - Android Studio 中 gradle-wrapper.properties 的用途是什么?

java - 自定义 Java 8 收集器

linux - 从 TestContainer 访问 Podman REST API

java - CompletableFuture 没有按预期工作

android - 使用 Intent 调用多个 Activity

android - 错误 : "Only the Kotlin standard library is allowed to use the ' kotlin' package"

android - android studio 3 facets 无法加载bug?

android - android房间中的实体继承

android - setAndAllowWhileIdle() 和 setExactAndAllowWhileIdle() 都不是每 15 分钟每个应用程序一次。每分钟闹钟怎么办