Android Map Errors - android

so i am trying to add a place autocomplete to my app but i havent even added anything yet to the java class but i have a very long error and have no idea where is coming from.
xml:
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<fragment
android:id="#+id/place_autocomplete_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment"
/>
</RelativeLayout>
</android.support.v7.widget.CardView>
java:
private String location;
Task<Void> mDatabase;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_selector);
}
error:
E/UncaughtException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/R$layout;
at com.google.android.gms.location.places.ui.PlaceAutocompleteFragment.onCreateView(Unknown Source)
at android.app.Fragment.performCreateView(Fragment.java:2112)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:874)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1061)
at android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1163)
at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2132)
at android.app.Activity.onCreateView(Activity.java:5461)
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:389)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:733)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.apps.ayodkay.services.selector.onCreate(selector.java:29)
at android.app.Activity.performCreate(Activity.java:6112)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1117)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2609)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2721)
at android.app.ActivityThread.access$900(ActivityThread.java:168)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5753)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.R$layout" on path: DexPathList[[zip file "/data/app/com.apps.ayodkay.services-1/base.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.apps.ayodkay.services-1/lib/arm, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.google.android.gms.location.places.ui.PlaceAutocompleteFragment.onCreateView(Unknown Source) 
at android.app.Fragment.performCreateView(Fragment.java:2112) 
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:874) 
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1061) 
at android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1163) 
at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2132) 
at android.app.Activity.onCreateView(Activity.java:5461) 
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:389) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:733) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 
at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469) 
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
at com.apps.ayodkay.services.selector.onCreate(selector.java:29) 
at android.app.Activity.performCreate(Activity.java:6112) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1117) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2609) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2721) 
at android.app.ActivityThread.access$900(ActivityThread.java:168) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5753) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200) 
Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.R$layout
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 32 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.apps.ayodkay.services, PID: 25664
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/R$layout;
at com.google.android.gms.location.places.ui.PlaceAutocompleteFragment.onCreateView(Unknown Source)
at android.app.Fragment.performCreateView(Fragment.java:2112)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:874)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1061)
at android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1163)
at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2132)
at android.app.Activity.onCreateView(Activity.java:5461)
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:389)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:733)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.apps.ayodkay.services.selector.onCreate(selector.java:29)
at android.app.Activity.performCreate(Activity.java:6112)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1117)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2609)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2721)
at android.app.ActivityThread.access$900(ActivityThread.java:168)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5753)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.R$layout" on path: DexPathList[[zip file "/data/app/com.apps.ayodkay.services-1/base.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.apps.ayodkay.services-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.apps.ayodkay.services-1/lib/arm, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.google.android.gms.location.places.ui.PlaceAutocompleteFragment.onCreateView(Unknown Source) 
at android.app.Fragment.performCreateView(Fragment.java:2112) 
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:874) 
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1061) 
at android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1163) 
at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2132) 
at android.app.Activity.onCreateView(Activity.java:5461) 
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:389) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:733) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 
at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469) 
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
at com.apps.ayodkay.services.selector.onCreate(selector.java:29) 
at android.app.Activity.performCreate(Activity.java:6112) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1117) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2609) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2721) 
at android.app.ActivityThread.access$900(ActivityThread.java:168) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5753) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200) 
Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.R$layout
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 32 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot

Related

Android Studio - logcat

Can someone tell me what is wrong with my app it crashes on statr .
Here is the LogCat:
Process: com.moneyegg.bdpsoft.makemonepaypal, PID: 3358
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.moneyegg.bdpsoft.makemonepaypal/com.moneyegg.bdpsoft.makemonepaypal.MainActivity}: android.view.InflateException: Binary XML file line #13: Error inflating class uses-permission
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: android.view.InflateException: Binary XML file line #13: Error inflating class uses-permission
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:757)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.moneyegg.bdpsoft.makemonepaypal.MainActivity.onCreate(MainActivity.java:32)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 
at android.app.ActivityThread.access$800(ActivityThread.java:151) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5254) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.uses-permission" on path: DexPathList[[zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/base.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.view.LayoutInflater.createView(LayoutInflater.java:571)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:665)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:65)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292) 
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
at com.moneyegg.bdpsoft.makemonepaypal.MainActivity.onCreate(MainActivity.java:32) 
at android.app.Activity.performCreate(Activity.java:5990) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 
at android.app.ActivityThread.access$800(ActivityThread.java:151) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5254) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
Suppressed: java.lang.ClassNotFoundException: android.view.uses-permission
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader
07-29 19:03:38.835 1149-1908/? E/audio_hw_generic: Error opening input stream format 1, channel_mask 0010, sample_rate 16000
07-29 19:03:38.837 1149-1520/? E/cutils-trace: Error opening trace file: Permission denied (13)
07-29 19:04:45.254 1150-1150/? E/installd: eof
07-29 19:04:45.254 1150-1150/? E/installd: failed to read size
01-01 00:00:00.000 0-0/? E/Internal: device 'emulator-5554' not found
Check your XML for Main Activity, there is a permission declaration, which should go to AndroidManifest.xml, and not in layout XMLs.

App crashes due to android.view.InflateException. Error inflating class

I know this question has been asked a million times, but i get this error only on asus zenfone 2. I feel this may be a memory allocation problem. But I am unable to trace the cause as it does cause the app to crash in other phones with lower os versions.
01-06 15:42:05.080 24439-24439/com.ikarma.clappilyandroidapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.ikarma.clappilyandroidapp, PID: 24439
android.view.InflateException: Binary XML file line #165: Error inflating class android.support.v7.widget.AppCompatEditText
at android.view.LayoutInflater.createView(LayoutInflater.java:633)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at com.ikarma.clappilyandroidapp.fragment.AddProductFragment.onCreateView(AddProductFragment.java:81)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:2074)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1286)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:758)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1671)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:532)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5264)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:900)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:695)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:607)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
at com.ikarma.clappilyandroidapp.fragment.AddProductFragment.onCreateView(AddProductFragment.java:81) 
at android.support.v4.app.Fragment.performCreateView(Fragment.java:2074) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1286) 
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:758) 
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1671) 
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:532) 
at android.os.Handler.handleCallback(Handler.java:739) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5264) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:900) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:695) 
Caused by: java.lang.RuntimeException: Failed to resolve attribute at index 96
at android.content.res.TypedArray.getColor(TypedArray.java:401)
at android.widget.TextView.<init>(TextView.java:714)
at android.widget.EditText.<init>(EditText.java:65)
at android.widget.EditText.<init>(EditText.java:61)
at android.support.v7.widget.AppCompatEditText.<init>(AppCompatEditText.java:60)
at android.support.v7.widget.AppCompatEditText.<init>(AppCompatEditText.java:56)
at java.lang.reflect.Constructor.newInstance(Native Method) 
at java.lang.reflect.Constructor.newInstance(Constructor.java:288) 
at android.view.LayoutInflater.createView(LayoutInflater.java:607) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
at com.ikarma.clappilyandroidapp.fragment.AddProductFragment.onCreateView(AddProductFragment.java:81) 
at android.support.v4.app.Fragment.performCreateView(Fragment.java:2074) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1286) 
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:758) 
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1671) 
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:532) 
at android.os.Handler.handleCallback(Handler.java:739) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5264) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:900) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:695) 
Most probably the issue is with the XML, and I think it is with the color values you are putting for either textColor, background or other such attributes.
So, you must put your xml code here to identify us the problem.

ClassNotFoundException while using coordinator layout with firebase

I am getting RuntimeException, InflateException, ClassNotFoundException.
my build.gradle have
compile 'com.android.support:appcompat-v7:24.2.1'
compile "com.google.firebase:firebase-auth:9.0.2"
and Logcat log is
Process: com.nikhil.firebase, PID: 10511
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.nikhil.firebase/com.nikhil.firebase.SignUpActivity}: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class android.support.design.widget.CoordinatorLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2426)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class android.support.design.widget.CoordinatorLayout
at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.nikhil.firebase.SignUpActivity.onCreate(SignUpActivity.java:29)
at android.app.Activity.performCreate(Activity.java:6245)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490) 
at android.app.ActivityThread.-wrap11(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:148) 
at android.app.ActivityThread.main(ActivityThread.java:5443) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class android.support.design.widget.CoordinatorLayout
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284) 
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
at com.nikhil.firebase.SignUpActivity.onCreate(SignUpActivity.java:29) 
at android.app.Activity.performCreate(Activity.java:6245) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490) 
at android.app.ActivityThread.-wrap11(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:148) 
at android.app.ActivityThread.main(ActivityThread.java:5443) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.design.widget.CoordinatorLayout" on path: DexPathList[[zip file "/data/app/com.nikhil.firebase-2/base.apk"],nativeLibraryDirectories=[/data/app/com.nikhil.firebase-2/lib/arm, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.view.LayoutInflater.createView(LayoutInflater.java:583)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284) 
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
at com.nikhil.firebase.SignUpActivity.onCreate(SignUpActivity.java:29) 
at android.app.Activity.performCreate(Activity.java:6245) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490) 
at android.app.ActivityThread.-wrap11(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:148) 
at android.app.ActivityThread.main(ActivityThread.java:5443) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 
Suppressed: java.lang.ClassNotFoundException: Didn't find class "android.support.design.widget.CoordinatorLayout" on path: DexPathList[[dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-support-annotations-24.2.1_6a41e66d0de39617155341541059c34ffee72147-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.nikhil.firebase/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.nikh
You need to add this dependency. It should work after you add it and do clean build :
compile 'com.android.support:design:24.2.1'
Please let me know if it changes anything for you.

Facebook Login Android keeps crashing

I have been constructing a Facebook login for my android app. For some reason it keeps on crashing. I have followed this tutorial to the letter, and copied whole parts of this guys code (besides the part for copying photos, I removed anything picasso related and the xml elements belonging to it. I have also removed the textview with the user name.):
https://www.youtube.com/watch?v=LPG7Rxj3u94
https://github.com/delaroy/AndroidFacebook/blob/master/app/src/main/java/com/tutorialsbuzz/androidfacebook/LoginFragment.java
I have already checked my manifest, my gradle.build files to ensure i have the right dependencies. I have checked my app ID at facebook, and have input the ssl key. Lastly I have indeed initialized the FacebookSDK before trying to inflate any xml in the loginactivity.
at the moment I don't know what the error is...
Here is my error message:
FATAL EXCEPTION: main
Process: com.example.riaan.dutchmanners, PID: 25681
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.riaan.dutchmanners/com.example.riaan.dutchmanners.LoginActivity}: android.view.InflateException: Binary XML file line #15: Error inflating class com.facebook.login.widget.LoginButton
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2658)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2723)
at android.app.ActivityThread.access$900(ActivityThread.java:172)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1422)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5832)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Caused by: android.view.InflateException: Binary XML file line #15: Error inflating class com.facebook.login.widget.LoginButton
at android.view.LayoutInflater.createView(LayoutInflater.java:640)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:933)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.inflate(LayoutInflater.java:511)
at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.example.riaan.dutchmanners.LoginActivity.onCreate(LoginActivity.java:26)
at android.app.Activity.performCreate(Activity.java:6221)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2611)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2723) 
at android.app.ActivityThread.access$900(ActivityThread.java:172) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1422) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:145) 
at android.app.ActivityThread.main(ActivityThread.java:5832) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) 
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:614)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:813) 
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:933) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:511) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:415) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:366) 
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284) 
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
at com.example.riaan.dutchmanners.LoginActivity.onCreate(LoginActivity.java:26) 
at android.app.Activity.performCreate(Activity.java:6221) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2611) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2723) 
at android.app.ActivityThread.access$900(ActivityThread.java:172) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1422) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:145) 
at android.app.ActivityThread.main(ActivityThread.java:5832) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) 
Caused by: The SDK has not been initialized, make sure to call FacebookSdk.sdkInitialize() first.
at com.facebook.internal.Validate.sdkInitialized(Validate.java:145)
at com.facebook.AccessTokenTracker.<init>(AccessTokenTracker.java:55)
at com.facebook.login.widget.LoginButton$2.<init>(LoginButton.java:563)
at com.facebook.login.widget.LoginButton.configureButton(LoginButton.java:563)
at com.facebook.FacebookButtonBase.<init>(FacebookButtonBase.java:69)
at com.facebook.login.widget.LoginButton.<init>(LoginButton.java:201)
at java.lang.reflect.Constructor.newInstance(Native Method) 
at java.lang.reflect.Constructor.newInstance(Constructor.java:288) 
at android.view.LayoutInflater.createView(LayoutInflater.java:614) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:813) 
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:933) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:511) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:415) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:366) 
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284) 
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
at com.example.riaan.dutchmanners.LoginActivity.onCreate(LoginActivity.java:26) 
at android.app.Activity.performCreate(Activity.java:6221) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2611) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2723) 
at android.app.ActivityThread.access$900(ActivityThread.java:172) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1422) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:145) 
at android.app.ActivityThread.main(ActivityThread.java:5832) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) 
If you need anything else besides this let me know!
Thank you for your help!

Android Use RecyclerView with local recyclerview library instead of loading it from the maven repo

I am trying to use RecyclerView in my project, but because we have some bad proxies, I cannot afford to add compile "com.android.support:recyclerview-v7:+" to my build.gradle because the download is very slow. Instead, for the other libraries, I simply added the .jar files to the 'libs' folder of the project and in build.gradle I have compile files('libs/android-support-v7-recyclerview.jar'). I got the .jar from the Android SDK under /extras/android/support/v7/recyclerview/libs.
I got the android-support-v4 library from the same place and it works fine.
The app is building, but at runtime, I get a NoClassDefFoundError. The behavior can be replicated using Google's RecyclerView sample found in /samples/android-21/ui/views/RecyclerView by replacing in Application/build.gradle these lines:
compile "com.android.support:support-v4:21.+"
compile "com.android.support:gridlayout-v7:21.+"
compile "com.android.support:cardview-v7:21.+"
compile "com.android.support:recyclerview-v7:+"
With these ones:
compile files('libs/android-support-v4.jar')
compile files('libs/android-support-v7-gridlayout.jar')
compile files('libs/android-support-v7-cardview.jar')
compile files('libs/android-support-v7-recyclerview.jar')
And adding the 4 jar files from the same SDK to Application/libs (you need to create the folder as it doesn't have one).
The full error log generated by the Google sample:
04-27 16:22:02.122 1405-1405/com.example.android.recyclerview E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.android.recyclerview, PID: 1405
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.recyclerview/com.example.android.recyclerview.MainActivity}: android.view.InflateException: Binary XML file line #38: Error inflating class android.support.v7.widget.RecyclerView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: android.view.InflateException: Binary XML file line #38: Error inflating class android.support.v7.widget.RecyclerView
at android.view.LayoutInflater.createView(LayoutInflater.java:633)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at com.example.android.recyclerview.RecyclerViewFragment.onCreateView(RecyclerViewFragment.java:67)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:339)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:602)
at com.example.android.common.activities.SampleActivityBase.onStart(SampleActivityBase.java:39)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1236)
at android.app.Activity.performStart(Activity.java:6006)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2288)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 
at android.app.ActivityThread.access$800(ActivityThread.java:151) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5254) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:607)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
at com.example.android.recyclerview.RecyclerViewFragment.onCreateView(RecyclerViewFragment.java:67) 
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252) 
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738) 
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617) 
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:339) 
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:602) 
at com.example.android.common.activities.SampleActivityBase.onStart(SampleActivityBase.java:39) 
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1236) 
at android.app.Activity.performStart(Activity.java:6006) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2288) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 
at android.app.ActivityThread.access$800(ActivityThread.java:151) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5254) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/recyclerview/R$styleable;
at android.support.v7.widget.RecyclerView.<init>(RecyclerView.java:487)
at android.support.v7.widget.RecyclerView.<init>(RecyclerView.java:456)
at java.lang.reflect.Constructor.newInstance(Native Method) 
at java.lang.reflect.Constructor.newInstance(Constructor.java:288) 
at android.view.LayoutInflater.createView(LayoutInflater.java:607) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
at com.example.android.recyclerview.RecyclerViewFragment.onCreateView(RecyclerViewFragment.java:67) 
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252) 
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738) 
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617) 
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:339) 
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:602) 
at com.example.android.common.activities.SampleActivityBase.onStart(SampleActivityBase.java:39) 
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1236) 
at android.app.Activity.performStart(Activity.java:6006) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2288) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 
at android.app.ActivityThread.access$800(ActivityThread.java:151) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5254) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.recyclerview.R$styleable" on path: DexPathList[[zip file "/data/app/com.example.android.recyclerview-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.support.v7.widget.RecyclerView.<init>(RecyclerView.java:487) 
at android.support.v7.widget.RecyclerView.<init>(RecyclerView.java:456) 
at java.lang.reflect.Constructor.newInstance(Native Method) 
at java.lang.reflect.Constructor.newInstance(Constructor.java:288) 
at android.view.LayoutInflater.createView(LayoutInflater.java:607) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
at com.example.android.recyclerview.RecyclerViewFragment.onCreateView(RecyclerViewFragment.java:67) 
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252) 
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738) 
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617) 
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:339) 
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:602) 
at com.example.android.common.activities.SampleActivityBase.onStart(SampleActivityBase.java:39) 
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1236) 
at android.app.Activity.performStart(Activity.java:6006) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2288) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 
at android.app.ActivityThread.access$800(ActivityThread.java:151) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5254) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
Suppressed: java.lang.ClassNotFoundException: android.support.v7.recyclerview.R$styleable
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 32 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
I also tried, as people suggested, to use the classes.jar found in extras/android/m2repository/com/android/support/recyclerview-v7/23.3.0/recyclerview-v7-23.3.0.aar but the result was exactly the same.
Any hints on what I might be missing/doing wrong?
The jar file doesn't have all the necessary source code in it. You have to use the aar file instead.
Please check this thread how an aar file can be included in your project.

Categories

Resources