I have came across a problem for dynamic forms in my app, which is suited for Android 2.1 and above. I know there is new Fragment API since API level 11 (Android 3.0 Honeyco
Android Studio:
Add a dependency for support compatibility package v4:
dependencies { ... compile 'com.android.support:support-v4:21.0.+' ... }
and then use import android.support.v4.app.Fragment; instead of import android.app.Fragment; in imports.
import android.support.v4.app.Fragment;
import android.app.Fragment;