加载以前的android项目失败

时间:2018-08-02 13:42:53

标签: android android-studio gradle android-gradle

我已经设置了新的Windows操作系统:10

在安装android studio并创建一个新的工作室之后,它可以正常工作,但是尝试打开现有项目时出现

错误
  

配置项目':app'时发生问题。

我已确保旧项目具有与新项目相同的gradle配置。

有人可以帮忙吗?

这是我得到的例外

Caused by: java.lang.NullPointerException
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:782)
    at com.android.build.gradle.internal.ndk.NdkHandler.getPlatformVersion(NdkHandler.java:158)
    at com.android.build.gradle.internal.ndk.NdkHandler.supports64Bits(NdkHandler.java:331)
    at com.android.build.gradle.internal.ndk.NdkHandler.getDefaultAbis(NdkHandler.java:412)
    at com.android.build.gradle.tasks.ExternalNativeJsonGenerator.create(ExternalNativeJsonGenerator.java:736)
    at com.android.build.gradle.internal.TaskManager.createExternalNativeBuildJsonGenerators(TaskManager.java:1711)
    at com.android.build.gradle.internal.ApplicationTaskManager.lambda$createTasksForVariantScope$10(ApplicationTaskManager.java:210)
    at com.android.build.gradle.internal.ApplicationTaskManager$$Lambda$205/636103725.call(Unknown Source)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
    at com.android.build.gradle.internal.ApplicationTaskManager.createTasksForVariantScope(ApplicationTaskManager.java:205)
    at com.android.build.gradle.internal.VariantManager.createTasksForVariantData(VariantManager.java:530)
    at com.android.build.gradle.internal.VariantManager.lambda$createAndroidTasks$1(VariantManager.java:352)
    at com.android.build.gradle.internal.VariantManager$$Lambda$145/195502090.call(Unknown Source)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
    at com.android.build.gradle.internal.VariantManager.createAndroidTasks(VariantManager.java:348)
    at com.android.build.gradle.BasePlugin.lambda$createAndroidTasks$6(BasePlugin.java:751)
    at com.android.build.gradle.BasePlugin$$Lambda$103/1684325025.call(Unknown Source)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
    at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:746)
    at com.android.build.gradle.BasePlugin.lambda$null$4(BasePlugin.java:652)
    at com.android.build.gradle.BasePlugin$$Lambda$79/338632383.call(Unknown Source)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
    at com.android.build.gradle.BasePlugin.lambda$createTasks$5(BasePlugin.java:648)

更新1 :旧项目包含诸如改装之类的依赖项

更新2 :我已经在分区E中安装了Android SDK和android项目

0 个答案:

没有答案