title: Android Studio 'Add as Library' missing For Universal Tween Engine on Libgdx
body: <p>I am working on a Libgdx project that uses the Universal Tween Engine. I have followed all of the steps on this page: <a href="https://github.com/libgdx/libgdx/wiki/Universal-Tween-Engine" rel="nofollow noreferrer">https://github.com/libgdx/libgdx/wiki/Universal-Tween-Engine</a> to install the Universal Tween Engine library into my project. </p>
  
  <p>After completing all of these steps the project will build and run fine (both Android and Desktop) on my laptop PC, and the animations coming from the tween engine work perfectly. </p>
  
  <p>However on my desktop computer whenever I try to run the desktop application it crashes with NoClassDefFoundException being thrown on the TweenAccessor class which is part of the Universal Tween Engine. The application compiles correctly and I can ctrl-click on the Class that it is saying it cant find and it opens up the source code of that class so I know at least some part of the IDE is finding this class. There is no red underline errors on any of the Library classes in the source code editor. Interestingly on my desktop computer I <em>can</em> run the android application and it does not crash, and the animations work perfectly. Only the Desktop version will not work. </p>
  
  <p>In trying to troubleshoot this I've run accross many things that say to switch to 'Project' view find the jar files, right click them and choose <code>Add as a Library</code> I've had to do this in the past on other projects and it did indeed work for me.</p>
  
  <p>But my problem is the <code>Add as a Library</code> option is missing from the context menu when I right click it on my desktop PC:</p>
  
  <p><a href="https://i.stack.imgur.com/SZPCO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SZPCO.png" alt="enter image description here"></a></p>
  
  <p>I've tried cleaning the project. I even completely uninstall Android Studio and downloaded a new copy and Installed it. Still get the same results after doing this.</p>
  
  <p>What determines whether or not the "Add as a Library" option will show up in the context menu when right clicking on a jar file? </p>
  
  <p>What do I have to do on my desktop PC to get it to properly use the Universal Tween Engine library jar?</p>
  
  <p>EDIT: Relevant sections of gradle.build.</p>
  
  <pre><code>project(":desktop") {
      apply plugin: "java"
      dependencies {
          compile project(":core")
          compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
          compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
          compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
          compile fileTree(dir: '../libs', include: '*.jar') // This one is not listed but I added anyway
      }
  }
  //...
  project(":android") {
      apply plugin: "android"
      configurations { natives }
      dependencies {
          compile project(":core")
          compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
          natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
          natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
          natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
          compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
          natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
          natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
          natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
          compile fileTree(dir: '../libs', include: '*.jar')
      }
  }
  //...
  project(":core") {
      apply plugin: "java"
      dependencies {
          compile "com.badlogicgames.gdx:gdx:$gdxVersion"
          compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
          compile fileTree(dir: '../libs', include: '*.jar')
      }
  }
  </code></pre>
  
  <p><strong>My Project Structure</strong></p>
  
  <pre><code>project_root_dir/
      android/
      core/
      desktop/
      html/
      ios/
      libs/
          tween-engine-api.jar
          tween-engine-api-sources.jar
  </code></pre>