gpt4 book ai didi

android - 应为名称,但在第 1 行第 99 列路径 $[0].apkInfo.versionName 为 STRING

转载 作者:IT老高 更新时间:2023-10-28 22:05:33 24 4
gpt4 key购买 nike

我升级到 gradle 到 3.1.1 但现在我想再次更改为 3.0.1 但更改为 3.0.1 后出现此错误

Expected a name but was STRING at line 1 column 99 path $[0].apkInfo.versionName

我之前使用的是 3.0.1,它运行良好,但在 android studio 更新后我改变了。

只有在生成签名的apk时才会出现错误。

项目 Gradle

buildscript {

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

应用分级

apply plugin: 'com.android.application'

android {
compileSdkVersion 27
defaultConfig {
applicationId "com.smiles.smartstuddy"
minSdkVersion 16
targetSdkVersion 27
versionCode 4
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:support-vector-drawable:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v13:27.1.1'
compile 'com.github.lzyzsd:circleprogress:1.2.1'
compile 'dev.dworks.libs:volleyplus:+'
implementation files('libs/YouTubeAndroidPlayerApi.jar')
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'commons-io:commons-io:2.4'
compile 'com.github.bumptech.glide:glide:4.6.1'
compile 'es.voghdev.pdfviewpager:library:1.0.3'
}

最佳答案

检查将生成 .apk 的 release 文件夹。如果有任何现有的 .apk 或 .json 文件,则将它们删除或移动到另一个位置。尝试再次生成您签名的 apk,您应该会成功。

关于android - 应为名称,但在第 1 行第 99 列路径 $[0].apkInfo.versionName 为 STRING,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49809977/

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