android - Gradle 同步失败 : Argument for @NotNull parameter 'aFileName' of com/intellij/openapi/util/io/FileUtil. toSystemIndependentName 不能为空

标签 android android-studio android-gradle-plugin

我将我的项目导入到 Android Studio 1.3.2,现在显示错误

Gradle sync started
Gradle sync failed: Argument for @NotNull parameter 'aFileName' of com/intellij/openapi/util/io/FileUtil.toSystemIndependentName must not be null
Gradle sync completed
IllegalArgumentException: Failed to set up Android modules in project 'MaterialTabs': Argument for @NotNull parameter 'aFileName' of com/intellij/openapi/util/io/FileUtil.toSystemIndependentName must not be null

Gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.abc.abcd"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.android.support:design:23.0.0'
    compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
    compile files('libs/android-query-full.0.24.3.jar')
    compile 'com.google.android.gms:play-services:6.5.87'
}

最佳答案

我找到了这个问题的解决方案,我只是使缓存无效并重新启动它,它起作用了。

但如果仍然存在问题,我建议尝试从 gradle 更改 compileSdkVersion

关于android - Gradle 同步失败 : Argument for @NotNull parameter 'aFileName' of com/intellij/openapi/util/io/FileUtil. toSystemIndependentName 不能为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36762820/

相关文章:

android - react native 视频立即停止

android - 如何使用新的 ActivityResultContracts 类检查 "Never ask again"权限场景?

java - 使用 getMapAsync 时获取空指针

java - 未指定模块?

debugging - 如何清除Android Studio Logcat控制台日志?

android - E/EGL_emulation : tid 2633: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)

带有封装项目的 Android 项目

java - 将 RxJava 添加到依赖项后无法构建项目

java - 新的空项目上的 Android Studio org.gradle.api.tasks.TaskExecutionException

android - 无法安装cordova插件