title: Java 1.7 compatibility for a library in android studio
body: <p>I want to use <a href="https://github.com/lemmingapex/trilateration" rel="nofollow noreferrer">this</a> library in my android studio project but when I add it into project using gradle it show the following error</p>
  
  <pre><code>Error:Error converting bytecode to dex: Cause: Dex cannot parse version 52 byte code. This is caused by library dependencies that have been compiled using Java 8 or above. If you are using the 'java' gradle plugin in a library submodule add targetCompatibility = '1.7' sourceCompatibility = '1.7' to that submodule's build.gradle file.
  </code></pre>
  
  <p>It seems it is because of java 1.7 compatablility but I have no idea how to fix it. Android studio suggests to add  targetCompatibility = '1.7' sourceCompatibility = '1.7' to that submodule's build.gradle but how can I add it into gradles dependencies section?</p>