Question Details:
Answer:
If we use
gradle clean build
, it will create a daemon. On the other hand, if we clean or build through Android studio, it also generates another daemon.
So, How can we make daemons compatible?
Answer:
Actually, there are two main reasons to be incompatible.
- One is version mismatch of Gradle and Java. Gradle version may be same but JDK versions are different.
- By default, Android Studio is using embedded JDK, which most likely has a different version from Java installed in our machine.
How can we make daemon compatible?
If we use the local java in Android Studio instead of embedded JDK, this issue will be solved.
Procedure:
- In Android Studio, go to
Project Structure -> SDK location
. - Uncheck “Use embedded JDK” and
- specify your local JDK.
Pictorial View is given below:
First Part:
Second Part:
No comments:
Post a Comment