【发布时间】:2021-04-11 07:37:23
【问题描述】:
我正在尝试在我的 lib GDX 游戏中创建默认流功能。我遵循了一些关于添加到我的 android gradle 项目的说明,但 ofc 只允许我在我的 android 项目中使用它。 如何在我的核心文件夹中使用它?
Android gradle 构建文件:
defaultConfig {
...
multiDexEnabled true
}
compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
// Sets Java compatibility to Java 8
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.9'
}
核心 gradle 构建:
sourceCompatibility = 1.7
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets.main.java.srcDirs = [ "src/" ]
eclipse.project.name = appName + "-core"
【问题讨论】: