You can edit the app.iml file and comment on the entry orderEntryto remove external libraries that you do not need in your Android studio project. In my case, I want to remove all android libraries (including the Android SDK) and take this project as a pure Java project. Then I comment or delete all the following entries
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
Details of your project may differ from the above, but similarly for deleting external libraries.