首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Android错误: java.io.IOException: CreateProcess error=2,系统找不到指定的文件

Android错误: java.io.IOException: CreateProcess error=2,系统找不到指定的文件
EN

Stack Overflow用户
提问于 2018-04-07 11:59:55
回答 2查看 1.4K关注 0票数 9

在构建一个电子商务应用程序时,我得到了以下错误。

它正在成功构建,但当我尝试运行此应用程序时,给出了如下错误:

我的build.gradle具有以下依赖关系:

代码语言:javascript
复制
dependencies {
    configurations.all {
        resolutionStrategy.eachDependency { DependencyResolveDetails details ->
            def requested = details.requested
            if (requested.group == 'com.android.support') {
                if (!requested.name.startsWith("multidex")) {
                    details.useVersion '27.1.0'
                }
            }
        }
    }
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:27.1.0'
    compile 'com.android.support:design:27.1.0'
    compile 'com.android.support:cardview-v7:27.1.0'
    compile 'com.android.support:recyclerview-v7:27.1.0'
    compile 'com.android.support:support-v4:27.1.0'
    compile 'com.android.support:preference-v7:27.1.0'
    compile 'com.android.support:preference-v14:27.1.0'
    compile 'com.google.code.gson:gson:2.8.2'
    compile 'com.squareup.retrofit2:retrofit:2.3.0'
    compile 'com.squareup.retrofit2:converter-gson:2.3.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.mcxiaoke.volley:library:1.0.19'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.daimajia.slider:library:1.1.5@aar'
    compile 'com.crystal:crystalrangeseekbar:1.1.1'
    compile 'com.github.paolorotolo:appintro:4.1.0'
    compile 'com.stripe:stripe-android:2.0.2'
    compile 'com.braintreepayments:card-form:3.3.0'
    compile 'com.braintreepayments.api:drop-in:3.+'
    compile 'com.braintreepayments.api:braintree:2.12.0'
    compile 'com.paypal.sdk:paypal-android-sdk:2.15.3'
    compile 'com.facebook.android:facebook-android-sdk:4.31.0'
    compile 'com.google.firebase:firebase-ads:12.0.1'
    compile 'com.google.firebase:firebase-auth:12.0.1'
    compile 'com.google.firebase:firebase-messaging:12.0.1'
    compile 'com.google.android.gms:play-services-auth:12.0.1'
    compile 'com.google.android.gms:play-services-maps:12.0.1'
    compile 'com.google.android.gms:play-services-location:12.0.1'
}

我不知道哪里有问题,有人知道这件事吗?

EN

回答 2

Stack Overflow用户

发布于 2018-04-17 05:00:57

通过提供指向CMake或ndk构建脚本文件的路径将Gradle链接到您的本机库。Gradle使用构建脚本将源代码导入到Android项目中,并将本机库( SO文件)打包到APK中。

如果您的现有项目使用了不推荐使用的build.properties工具,那么在配置Gradle使用CMake或ndkCompile之前,您应该打开您的CMake文件并删除以下代码:

代码语言:javascript
复制
// Remove this line
android.useDeprecatedNdk = true
票数 1
EN

Stack Overflow用户

发布于 2018-04-16 13:07:46

看来你的ndk被损坏或损坏了。

如果我是你,我会尝试

  1. 更新或尝试删除旧ndk并下载最新ndk
  2. 另外,我认为你在运行旧的Android,为什么不更新你的Android和Gralde版本呢?我总是喜欢新的稳定的Android的出现,因为的安卓更新是一支不为人知的的大军。:)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49707158

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档