gpt4 book ai didi

android - Unity3D maintemplate.gradle Kotlin依赖项

转载 作者:行者123 更新时间:2023-12-03 05:21:40 29 4
gpt4 key购买 nike

我在互联网上找不到有趣的东西,这就是为什么我寻求您的帮助。我在我的统一项目中有一个mainTemplate.gradle,在其中我试图应用kotlin-android插件。问题是,当我将我的统一项目导出到Android(或构建apk)时,它说找不到kotlin-android。在此先感谢您的帮助。
这是mainTemplate.gradle:

buildscript {
ext.kotlin_version = '1.3.11'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
}
}

allprojects {
repositories {
google()
jcenter()
flatDir {
dirs 'libs'
}
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 29
buildToolsVersion '28.0.3'
useLibrary 'org.apache.http.legacy'

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

dexOptions
{
// Prevent OutOfMemory with MultiDex during the build phase
javaMaxHeapSize "4g"
}

defaultConfig
{
minSdkVersion 26
targetSdkVersion 29

ndk {
abiFilters 'armeabi-v7a'
}
versionCode 1
versionName '0.1'

resConfigs "fr", "en", "nl", "es", "ro", "pl"
}

lintOptions {
abortOnError false
}

aaptOptions {
noCompress '.unity3d', '.ress', '.resource', '.obb', 'frenchtranslations.csv'
}

packagingOptions{
pickFirst 'lib/x86_64/libc++_shared.so'
pickFirst 'lib/x86/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
pickFirst 'lib/arm64-v8a/libc++_shared.so'
}


buildTypes {
debug {
minifyEnabled false
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'
jniDebuggable true
}
release {
minifyEnabled false
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'

signingConfig signingConfigs.debug
}
kotlinOptions {
jvmTarget = '1.8'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'

implementation 'com.android.volley:volley:1.1.0'

implementation(name: 'high-level-was-sdk-lib_9.20.3-1_debug', ext:'aar')
implementation(name: 'low-level-was-sdk-lib_6.20.3-1_release', ext:'aar')
implementation(name: 'nr_api', ext:'aar')

}

最佳答案

我知道了,这真是愚蠢。
这是修改。此后,我需要统一进行一些调整。如果有人有疑问或同一个问题,我可以尝试为您提供帮助。

dendependencies {
classpath 'com.android.tools.build:gradle:3.6.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.11"
}

关于android - Unity3D maintemplate.gradle Kotlin依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63244276/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com