【问题标题】:A problem was found with the configuration of task ':app:compileDebugAidl' (type 'AidlCompile')发现任务\':app:compileDebugAidl\'(类型\'AidlCompile\')的配置有问题
【发布时间】:2022-10-18 13:28:24
【问题描述】:

当为quest2打包项目时,它会抛出这个错误! UATHelper:打包(Android(ASTC)):*出了什么问题: UATHelper:打包(Android(ASTC)):发现任务':app:compileDebugAidl'(类型'AidlCompile')的配置存在问题。 UATHelper:打包(Android (ASTC)):> 为属性“aidlFrameworkProvider”指定的文件“C:\Users\czars\AppData\Local\Android\Sdk\platforms\android-30\framework.aidl”不存在。 UATHelper:打包(Android (ASTC)):1 个可操作任务:1 个已执行 UATHelper:打包(Android(ASTC)):*尝试: UATHelper:打包(Android (ASTC)):使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。 UATHelper: 打包 (Android (ASTC)): * 在https://help.gradle.org/ 获得更多帮助 UATHelper:打包(Android(ASTC)):在 7 秒内构建失败 UATHelper: Packaging (Android (ASTC)): ERROR: cmd.exe failed with args /c "C:\Users\czars\ue projects\gradlebatch\Intermediate\Android\arm64\gradle\rungradle.bat" :app:assembleDebug UATHelper:打包(Android (ASTC)):(请参阅 C:\Users\czars\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.0\Log.txt 了解完整异常痕迹) UATHelper:打包(Android (ASTC)):AutomationTool 执行时间为 0h 0m 36s UATHelper:打包(Android (ASTC)):AutomationTool 以 ExitCode=1 退出(Error_Unknown) UATHelper:打包(Android (ASTC)):更新由 Turnkey 子流程设置的环境变量 UATHelper: Packaging (Android (ASTC)): 系统找不到指定的路径。 UATHelper: Packaging (Android (ASTC)): 系统找不到指定的路径。 PackagingResults: 错误: cmd.exe 失败,参数为 /c "C:\Users\czars\ue projects\gradlebatch\Intermediate\Android\arm64\gradle\rungradle.bat" :app:assembleDebug.

【问题讨论】:

    标签: unreal-engine5


    【解决方案1】:

    当 Android sdk、API 级别、sdk 工具、gradle 插件版本不兼容时会引发该错误。 我正在使用 android API level-29 为 metaquest-2 构建一个项目。 安卓工作室版本-4.0 为了这 :

    1. 确保配置如下所示gradle.build(项目:My_Application):
          // Top-level build file where you can add configuration options common to all sub-projects/modules.
          
              plugins {
                  id 'com.android.application' version '6.5.1' apply false
                  id 'com.android.library' version '6.5.1' apply false
                  id 'org.jetbrains.kotlin.android' version '1.7.10' apply false }
      

      gradle.build(模块:My_Application.app):

          plugins {
              id 'com.android.application'
              id 'org.jetbrains.kotlin.android'
          }
          
          android {
              namespace 'com.example.myapplication'
              compileSdk 29
          
              defaultConfig {
                  applicationId "com.example.myapplication"
                  minSdk 23
                  //noinspection ExpiredTargetSdkVersion
                  targetSdk 29
                  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
              }
              kotlinOptions {
                  jvmTarget = '1.8'
              }
              buildToolsVersion '29.0.3'
              ndkVersion '21.4.7075529'
          }
          
          dependencies {
          
              implementation 'androidx.core:core-ktx:1.9.0'
              implementation 'androidx.appcompat:appcompat:1.5.1'
              implementation 'com.google.android.material:material:1.6.1'
              //noinspection GradleDependency
              implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
              testImplementation 'junit:junit:4.13.2'
              androidTestImplementation 'androidx.test.ext:junit:1.1.3'
              androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
          }
      
      

    【讨论】:

      猜你喜欢
      • 2022-06-14
      • 2021-07-22
      • 2021-01-11
      • 1970-01-01
      • 1970-01-01
      • 2021-08-29
      • 2021-10-12
      • 2021-07-03
      • 1970-01-01
      相关资源
      最近更新 更多