Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/187.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
未知错误:java.lang.IllegalArgumentException:!directory.isDirectory()目录_Java_Android_Gradle - Fatal编程技术网

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

未知错误:java.lang.IllegalArgumentException:!directory.isDirectory()目录,java,android,gradle,Java,Android,Gradle,我只是试图重建我的项目没有改变什么,我得到了一个未知的错误,我似乎无法解决 我试图清理项目,重建项目,以及重新启动Android Studio,但没有任何效果。该错误还指出,某些功能已被弃用,但这并没有阻止应用程序在10分钟前完美运行 返回的错误: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:packageDebug'. > 1 exception

我只是试图重建我的项目没有改变什么,我得到了一个未知的错误,我似乎无法解决

我试图清理项目,重建项目,以及重新启动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


应用程序级渐变文件:


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
}

显示你的应用程序级别的渐变文件我现在编辑了谢谢这项工作谢谢!你能确切地告诉我它做了什么以供将来参考吗?Android Studio默认情况下预先打包了一小部分
Java 8
语言功能,为了支持其余功能,我们使用此代码。