簡體   English   中英

Android 錯誤:java.io.IOException: CreateProcess error=2,系統找不到指定的文件

[英]Android Error : java.io.IOException: CreateProcess error=2, The system cannot find the file specified

我在構建一個電子商務應用程序時遇到以下錯誤。

它正在成功構建,但是當我嘗試運行此應用程序時,出現如下錯誤:

在此處輸入圖片說明

我的build.gradle具有以下依賴項:

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'
}

不知道問題出在哪里,有大佬知道嗎?

通過提供 CMake 或 ndk-build 腳本文件的路徑,將Gradle 鏈接到您的本機庫 Gradle 使用構建腳本將源代碼導入您的 Android Studio 項目並將您的本機庫(SO 文件)打包到 APK 中。

如果您現有的項目使用已棄用的 ndkCompile 工具,則在配置 Gradle 以使用 CMake 或 ndk-build 之前,您應該打開build.properties文件並刪除以下代碼行:

// Remove this line
android.useDeprecatedNdk = true

您的 ndk 似乎已損壞或損壞。

如果我是你,我會嘗試

  1. 更新或嘗試刪除舊的 ndk 並下載最新的 ndk
  2. 此外,我認為您正在運行舊的 Android Studio,為什么不更新您的 Android Studio 和 Gralde 版本,我總是喜歡新的穩定的 Android Studio 出現,因為android 更新是解決未知錯誤的單兵大軍 :)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM