Stop Android Studio from using Support Library
android, android-fragments, android-support-library, java
Solution
If you've removed the support library from the `build.gradle`, and there's no file in the `libs` folder, have you made sure to delete the imports?
From the error message, it looks like you'll have the following import (else the error wouldn't know about trying to cast to a support Fragments) at the top of your class:
`import android.support.v4.app.Fragment;`
Delete this, replace it with:
`import android.app.Fragment;`
Do this with all the support references.
Problem
I'm trying to get my Android project in Android Studio to NOT use the Support library. My issue is that when I use fragments it is expecting support fragments and causing the app to crash. My Min SDK is 14 and my Target SDK is 19. My understanding is that because I'm targeting these versions I should not need the support library. Correct me if I'm wrong. I'm trying to correct this error `java.lang.ClassCastException: com.google.android.gms.maps.MapFragment cannot be cast to android.support.v4.app.Fragment`. And I am aware I can fix it by just using `SupportMapFragment` instead. But I do not want to do this. I want to use the regular MapFragment So my main question is how can I get it to stop expecting support library fragments and just use regular fragments. I've also had this issue with other fragments not just the map.