I developed an app for Api 21 (Lollipop), and i want this app to run on Api 19 (Kitkat+) devices.
Sadly i got this error:
E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.myurl.myapp , PID: 14398
java.lang.NoClassDefFoundError: android.support.v4.view.LayoutInflaterCompatHC
at android.support.v4.view.LayoutInflaterCompat$LayoutInflaterCompatImplV11.setFactory(LayoutInflaterCompat.java:42)
at android.support.v4.view.LayoutInflaterCompat.setFactory(LayoutInflaterCompat.java:79)
at android.support.v7.app.AppCompatDelegateImplV7.installViewFactory(AppCompatDelegateImplV7.java:790)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:57)
at com.myurl.myapp.FeedActivity.onCreate(FeedActivity.java:194)
This happens at the first line of onCreate() method:
super.onCreate(savedInstanceState);
These are my imports:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:21.+'
compile "com.android.support:appcompat-v7:21.0.+"
compile 'com.android.support:cardview-v7:21.+'
compile 'com.android.support:recyclerview-v7:21.+'
}
Does anybody know how to solve this problem?