I want to compile an open source android project (Netguard) using gradel (gradlew clean build
) But I encountered this Error:
A problem occurred
I have faced the same problem while update Android studio from 2.0 to 2.1 in my Windows 8 machine.
I found a solution for that.Please use the following steps.
This is happening because Android studio won't gets full NDK update in the stable channel. If you are not using NDK for your project development you can simply remove the NDK folder from your SDK directory.
[https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android][1]
For people trying out this example and facing issues with latest NDK. Can follow this solution. In build.gradle change this
classpath 'com.android.tools.build:gradle:3.0.1'
To
classpath 'com.android.tools.build:gradle:3.1.2'
The reason is mips are deprecated in the latest ndk versions, Gradle version 3.1.2 will not have a compulsion for mips. It assumes the presence for these missing folders.
For Android Studio 3.2.1 Update your
Gradle Version 4.6
Android plugin version 3.2.1
In my case, this error occured when creating a new Android Studio (Android studio 3.2.1) Java Project with
classpath 'com.android.tools.build:gradle:2.0.0-beta6'
So I´ve downgraded to
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
Not the best solution stay at an older version, but maybe it´s just a temporary bug in the beta as the NDK path in local.properties is still the same, but the IDE doesn´t complain anymore
The simple solution is download and extract the following file which contains mips64el-linux-android-4.9 and mipsel-linux-android-4.9 folders,to your toolchains folder inside sdk "android-sdk\ndk-bundle\toolchains".
Downlod this file and extraxt to toolchains foolder
In your project level Gradle file increase the dependencies classpath version low to high like
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
}
to change like
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}