我得到了上述错误
我的秤看起来像这样
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.hypersignwalletcorekotlin"
minSdkVersion 23
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
project.ext {
walletcore_version = "2.0.5"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation "com.trustwallet:wallet-core:$walletcore_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}无法理解为什么会发生这种事。
谢谢
发布于 2020-04-29 19:59:01
修补程序:将ndkVersion添加到模块的build.gradle
android.ndkVersion "your-installed-ndk-version"就像在一些例子一样。您可以从文件$ NDK / version e.properties中找到NDK版本。
背景信息:您可能使用的是AGP/Android版本3.6+:“来自Android插件( AGP ) 3.6+,添加了一个known good NDK概念,即发布AGP版本时的known good/tested NDK version”。如果下列情况下,AGP将使用该内部NDK版本:
预期内部NDK将以并排NDK的方式安装:$SDK\ndk。
如未安装:
随着新的NDK不断发布,内部嵌入的NDK版本很可能很快就过时了:如果您想使用较新的NDK版本,您确实需要使用ndkVersion配置gradle。
附加文档:有关详细信息请参阅正式文件。
发布于 2020-10-05 14:03:27
若要安装NDK的特定版本,请执行以下操作:
打开一个项目后,单击Tools >。
单击SDK工具选项卡。
选中“显示包详细信息”复选框。
选择NDK (并排)复选框以及下面对应于要安装的NDK版本的复选框。Android在android/ NDK /目录中安装ndk的所有版本。
发布于 2020-09-19 10:24:07
我不使用NDK,但仍然有这个错误。清洁项目为我工作。
构建->“清洁项目”,然后重建。
https://stackoverflow.com/questions/61157024
复制相似问题