Gradle Sync error: unable to load windows-amd64 \ native-platform.dll library

Updated from Android Studio 1.4 to 2.0, and with the IDE my dependence of gradle from 2.0 on 1.x in the build.gradle file changed:

dependencies { classpath 'com.android.tools.build:gradle:2.0.0' } 

Updated gradle project to version 2.10.

When I tried to synchronize the project with gradle files or update the project, now I get the following error:

 Gradle sync failed: Can't load library: C:\Users\foobar\.gradle\native\19\windows-amd64\native-platform.dll Consult IDE log for more details (Help | Show Log) 
+5
source share
4 answers

Delete the "native" folder from the gradle path:

 .gradle\native\19\windows-amd64\native-platform.dll 

When you restart it, it will restore the "native" folder and the associative .dll.

+20
source

For me, when I go in and just delete the β€œnative” folder, and then allow re-synchronization with Android Studio for me. I believe that I had the same or similar problem as CodyF; my.dll was missing. The only file in the native \ 19 \ windows-amd64 folder was the .dll.lock file.

+1
source

Just rename the native-platform.dll.lock file to native-platform.dll

0
source

For security reasons, loading DLL from temporary directories may be disabled; you can try creating the tmp and changing GRADLE_OPTS to indicate the location you created. for windows

 open CMD mkdir $some_location set GRADLE_OPTS="-Dorg.gradle.native.dir=/$some_location" 

It worked for me.

0
source

Source: https://habr.com/ru/post/1247732/


All Articles