Код: Выделить всё
> java.io.IOException: Unable to delete directory 'C:\my_project\android\build'
Failed to delete some children. This might happen because a process has files open or has its working directory set in the target directory.
- C:\my_project\android\build\tmp\.cache\expanded\expanded.lock
- C:\my_project\android\build\tmp\.cache\expanded
- C:\my_project\android\build\tmp\.cache
- C:\my_project\android\build\tmp
Код: Выделить всё
googleКод: Выделить всё
project(":core") {
apply plugin: "java-library"
dependencies {
api "com.badlogicgames.gdx:gdx:$gdxVersion"
api "com.badlogicgames.gdx:gdx-ai:$gdxAIVersion"
}
}
project(":game") {
apply plugin: "java-library"
dependencies {
api project(":core")
}
}
project(":mobile") {
apply plugin: "java-library"
dependencies {
api project(":game")
}
}
project(":android") {
apply plugin: "com.android.library"
configurations { natives }
dependencies {
api project(":mobile")
api "androidx.core:core:$androidxCoreVersion"
api "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
}
}
project(":google") {
apply plugin: "com.android.application"
dependencies {
implementation project(":android")
implementation "com.android.support:multidex:$multidexVersion"
constraints {
implementation('androidx.fragment:fragment') {
version {
strictly "$androidxCoreVersion"
}
}
}
}
}
project(":huawei") {
apply plugin: "com.android.application"
dependencies {
implementation project(":android")
implementation "com.android.support:multidex:$multidexVersion"
}
}
Код: Выделить всё
apply plugin: 'com.android.library'
android {
compileSdk 34
buildToolsVersion = '34.0.0'
namespace "my.package.name.android"
defaultConfig {
minSdkVersion 19
targetSdkVersion 34
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
task copyAndroidNatives() {
file("libs/armeabi/").mkdirs();
file("libs/armeabi-v7a/").mkdirs();
file("libs/x86/").mkdirs();
file("libs/arm64-v8a/").mkdirs()
file("libs/x86_64/").mkdirs()
configurations.natives.files.each { jar ->
def outputDir = null
if (jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a")
if (jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86")
if (jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a")
if (jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64")
if (outputDir != null) {
copy {
from zipTree(jar)
into outputDir
include "*.so"
}
}
}
}
tasks.whenTaskAdded { packageTask ->
if (packageTask.name.contains("package")) {
packageTask.dependsOn 'copyAndroidNatives'
}
}
Подробнее здесь: https://stackoverflow.com/questions/795 ... s-to-8-1-4
Мобильная версия