CreateProcess error=2, The system cannot find the file specified [Android studio]

后端 未结 7 1869
离开以前
离开以前 2020-12-09 09:10

I upgraded my windows and reinstalled Android studio 0.3.2. I am using windows8.1 Pro now and installed java x64, I also did set up JAVA_HOME E

相关标签:
7条回答
  • 2020-12-09 09:22

    I hope this answer can be a reference for new comer!

    I got same issue and I stuck for this error!

    Finally I got solution here!

    After I explore the error detail, I got message that there are issue with NDK. Try to disable NDK or add the following code in your gradle.build

    packagingOptions{
        doNotStrip '*/mips/*.so'
        doNotStrip '*/mips64/*.so'
    }
    
    0 讨论(0)
  • 2020-12-09 09:24

    I am getting this because of ndk path .

    Check the ndk path in local.properties file & also check the sdk path . Delete the build file , sometimes it makes the error in case you are migrating the project from Linux to windows or vice versa .

    Then click invalidate cache and restart .

    Mine this solved this issue . Hope this will help you .

    0 讨论(0)
  • 2020-12-09 09:25

    proper solution of this

    1. Download old ndk from here

    2. Extract to your SDK file path like mine is H:\SDK\ndk-bundle16

    3. Now show it in gradle.properties folder.

    0 讨论(0)
  • 2020-12-09 09:33

    I got this same error on android studio 3.1 which I've just now updated. user3235168's answer worked for me.

    Additionally I had to remove the check mark from 'Use embedded JDK(recommended)' Then browse to jdk's path - C:\Program Files\Java\jdk1.8.0_144

    0 讨论(0)
  • 2020-12-09 09:35

    Since android studio is still referring to jdk1.7.0_40 change its path

    1. Goto Files->Other Settings->Default Project Structure.

    2. Under Platform Settings Select Android sdk...under JDK location change C:\Program Files (x86)\Java\jdk1.7.0_40 to C:\Program Files\Java\jdk1.7.0_45

    That should do the trick :)

    0 讨论(0)
  • 2020-12-09 09:41

    I had exactly the same error: CreateProcess error=2, The system cannot find the file specified [Android studio] No changes, just started Android Studio (3.6.2) in the morning and the bug appeared.

    Anyway, I fixed this one by reinstalling Android Studio from scratch. I know it sounds stupid, but neither option worked for me, I just didn't have another hour to play with it.

    0 讨论(0)
提交回复
热议问题