gpt4 book ai didi

android-studio - Android Studio 3 : Could not find the AndroidManifest. xml文件

转载 作者:行者123 更新时间:2023-12-02 20:54:26 29 4
gpt4 key购买 nike

迁移到 Android studio 3 后,我无法编译,因为出现以下错误:

Error:Could not find the AndroidManifest.xml file, using  generation 
folder
[/home/salacr/git/Evotech/app/build/generated/source/apt/debug])
Error:Parceler: Code generation did not complete successfully. For
more details add the compiler argument -AparcelerStacktrace
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

它可能与 android 注释的使用有关,我的 app/build.gradle 如下所示:

apply plugin: 'com.android.application'
apply plugin: 'realm-android'

def AAVersion = '4.3.1'
def parcelerVersion = '1.1.9'

android {
compileSdkVersion 26
buildToolsVersion '26.0.1'

defaultConfig {
applicationId "com.my.app"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
}
signingConfigs {
release {
storeFile file("******")
storePassword "******"
keyAlias "******"
keyPassword "******"
}
}
buildTypes {
release {
minifyEnabled false
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}

splits {
abi {
enable true // enable ABI split feature to create one APK per ABI
universalApk true //generate an additional APK that targets all the ABIs
}
}
/*
// map for the version code
project.ext.versionCodes = ['armeabi':1, 'armeabi-v7a':2, 'arm64-v8a':3, 'mips':5, 'mips64':6, 'x86':8, 'x86_64':9]

android.applicationVariants.all { variant ->
// assign different version code for each output
variant.outputs.each { output ->
output.versionCodeOverride =
project.ext.versionCodes.get(output.getFilter(com.android.build.OutputFile.ABI), 0) * 1000000 + android.defaultConfig.versionCode
}
}
*/

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

}

dependencies {

implementation "org.parceler:parceler-api:$parcelerVersion"
annotationProcessor "org.parceler:parceler:$parcelerVersion"
annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
implementation "org.androidannotations:androidannotations-api:$AAVersion"
implementation 'com.android.support:appcompat-v7:26.0.1'
implementation 'com.android.support:multidex:1.0.2'
}

我无法找到此问题的根本原因,有什么建议吗?我尝试了不同的 graddle 版本以及使用不同的 buildToolsVersion 工具,但没有效果。

有什么建议吗?

谢谢!

编辑1:我发现问题就在这里:

splits {
abi {
enable true // enable ABI split feature to create one APK per ABI
universalApk true //generate an additional APK that targets all the ABIs
}
}

没有这个,一切都会按预期进行。 IT 人员发现此配置与新 Android studio 中的 androidannotations 不兼容

编辑2:androidannotation 中已经存在问题:https://github.com/androidannotations/androidannotations/issues/2034

最佳答案

我遇到了类似的问题,当我将 android 注释版本从 4.4.0 更新到 4.5.0 时解决了我的问题。

关于android-studio - Android Studio 3 : Could not find the AndroidManifest. xml文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45682730/

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