A problem occurred configuring project ‘:katan’.
文件名、目录名或卷标语法不正确。
katan这个project应该是找不到导致的编译问题。
你看下settings.properties的配置,还有对应的build.gradle
换了发布名 ,换了目录都不行
log2.zip (59.1 KB)
settings.gradle
include ‘:libcocos’,’:libservice’,’:testproname’
project(’:libcocos’).projectDir = new File(COCOS_ENGINE_PATH,‘cocos/platform/android/libcocos2dx’)
project(’:testproname’).projectDir = new File(NATIVE_DIR, ‘app’)
if(PROP_ENABLE_INSTANT_APP == “true” || PROP_ENABLE_INSTANT_APP == “yes”) {
include ':instantapp'
project(':instantapp').projectDir = new File(NATIVE_DIR, 'instantapp')
}
rootProject.name = “testproname”
build.gradle内容
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply from: NATIVE_DIR +"/build.gradle"
项目目录下,native/engine/android/app目录是否存在?没存在需要重新构建
存在的
app目录下 build.gradle 的内容
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: ‘com.android.application’
RES_PATH = RES_PATH.replace("\", “/”)
COCOS_ENGINE_PATH = COCOS_ENGINE_PATH.replace("\", “/”)
buildDir = “${RES_PATH}/proj/build/$project.name”
android {
compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger()
buildToolsVersion PROP_BUILD_TOOLS_VERSION
ndkPath PROP_NDK_PATH
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId APPLICATION_ID
minSdkVersion PROP_MIN_SDK_VERSION
targetSdkVersion PROP_TARGET_SDK_VERSION
versionCode 1
versionName "1.0"
externalNativeBuild {
cmake {
targets "cocos"
arguments "-DRES_DIR=${RES_PATH}", "-DCOCOS_X_PATH=${COCOS_ENGINE_PATH}", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_LD=gold"
cppFlags "-frtti -fexceptions -fsigned-char"
}
ndk { abiFilters PROP_APP_ABI.split(':') }
}
}
sourceSets.main {
java.srcDirs "../src", "src"
res.srcDirs "../res", 'res'
jniLibs.srcDirs "../libs", 'libs'
manifest.srcFile "AndroidManifest.xml"
assets.srcDir "${RES_PATH}/data"
jniLibs {
// Vulkan validation layer
// srcDir "${android.ndkDirectory}/sources/third_party/vulkan/src/build-android/jniLibs"
}
}
externalNativeBuild {
cmake {
path "../CMakeLists.txt"
buildStagingDirectory "${RES_PATH}/proj/build"
}
}
signingConfigs {
release {
if (project.hasProperty("RELEASE_STORE_FILE") && !RELEASE_STORE_FILE.isEmpty()) {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}
}
buildTypes {
release {
debuggable false
jniDebuggable false
renderscriptDebuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (project.hasProperty("RELEASE_STORE_FILE")) {
signingConfig signingConfigs.release
}
// resValue "string", "app_name", PROP_APP_NAME
}
debug {
debuggable true
jniDebuggable true
renderscriptDebuggable true
// resValue "string", "app_name", "${PROP_APP_NAME}-dbg"
// applicationIdSuffix ".debug"
}
}
}
dependencies {
implementation fileTree(dir: '../libs', include: ['*.jar','*.aar'])
implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
implementation fileTree(dir: "${COCOS_ENGINE_PATH}/cocos/platform/android/java/libs", include: ['*.jar'])
implementation project(':libservice')
implementation project(':libcocos')
}
方便给最简demo, 这样看不出问题
该主题在最后一个回复创建后14天后自动关闭。不再允许新的回复。