如何解决从build.gradle文件调用gradle文件时,未绑定的输入和/或主题错误
我面临错误
等级同步失败:由于以下原因,无法应用以下模型规则 >对于未绑定的输入和/或主题: > android.ndk {...} @ app \ src \ main \ jni \ other.gradle第35行,第3列 >主题: >-android.ndk对象[] > android.sources {...} @ app \ src \ main \ jni \ other.gradle第16行,第3列 >主题: >-android.sources对象[] > [*]-表示找不到路径或类型的模型项。 >有关更多详细信息,请查阅IDE日志(“帮助” |“显示日志”)(374毫秒)
build.gradle文件
plugins {
id 'com.android.application'
}
// Defines
apply from: 'defines.gradle'
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.exmp.application"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs',include: ['*.jar'])
implementation "androidx.core:core-ktx:+"
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
apply from: 'src/main/jni/other.gradle'
other.gradle文件:
model {
android.sources {
main {
jni {
source {
srcDirs += [ 'src' ]
}
}
}
}
android.ndk {
}
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。