gpt4 book ai didi

java - 未知错误 : java. lang.IllegalArgumentException : ! directory.isDirectory()

转载 作者:行者123 更新时间:2023-12-02 09:38:21 25 4
gpt4 key购买 nike

我只是尝试重建我的项目,没有进行任何更改,但我收到了一个我似乎无法解决的未知错误。

我尝试清理项目并重建项目,以及重新启动 Android Studio,但没有任何效果。该错误还指出某些功能已被弃用,但这并没有阻止该应用程序在 10 分钟前完美运行。

返回错误:


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> 1 exception was raised by workers:
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: !directory.isDirectory()


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 7s
31 actionable tasks: 28 executed, 3 up-to-date

带有堆栈跟踪:


0:15:15.045 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
00:15:15.045 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
00:15:15.045 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
00:15:15.046 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
00:15:15.046 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:packageDebug'.
00:15:15.047 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > 1 exception was raised by workers:
00:15:15.047 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] java.lang.IllegalArgumentException: !directory.isDirectory()
00:15:15.047 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
00:15:15.047 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
00:15:15.047 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
00:15:15.047 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. Run with --scan to get full insights.
00:15:15.047 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
00:15:15.047 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org


应用级 gradle 文件:


apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.camerakitqr"
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
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'



//androidTestImplementation 'com.android.support.test:runner:1.0.2'
//androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-ml-vision:20.0.0'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.karumi:dexter:5.0.0'
implementation 'com.android.support:design:28.0.0'


}
apply plugin: 'com.google.gms.google-services'


最佳答案

将其添加到您的应用级 Gradle 文件中。

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

关于java - 未知错误 : java. lang.IllegalArgumentException : ! directory.isDirectory(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57318150/

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