I am having an app in which I have used style="@style/Base.Widget.AppCompat.RatingBar.Small"
for a rating bar. Now i have to use a floating action button. This is my dependency structure
dependencies {
ext {
supportLibVersion = '23.2.0'
}
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile "com.android.support:appcompat-v7:${supportLibVersion}"
compile "com.android.support:percent:${supportLibVersion}"
compile "com.android.support:design:${supportLibVersion}"
compile "com.android.support:cardview-v7:${supportLibVersion}"
compile "com.android.support:recyclerview-v7:${supportLibVersion}"
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.github.orhanobut:logger:1.12'
compile files('libs/lefu_sdk_r8.jar')
compile files('libs/achartengine-1.2.0.jar')
compile 'com.github.PhilJay:MPAndroidChart:v2.2.3'
}
I am getting android.content.res.Resources$NotFoundException:
when i try to use floating action button. After searching i got to know from this link Android Studio FloatingActionButton error that i should change the support library version to 23.1.0. But then i am not able to use the above mentioned style for the rating bar. Can anyone suggest any solution to this problem. This is the error i am getting while using FAB
Rendering Problems The following classes could not be instantiated:
- android.support.design.widget.FloatingActionButton (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE Exception Details android.content.res.Resources$NotFoundException: Resource ID #0x7f080055 type #0x0 is not valid at android.content.res.Resources.getDimension(Resources.java:624) at android.support.design.widget.FloatingActionButton.<init>(FloatingActionButton.java:128) at android.support.design.widget.FloatingActionButton.<init>(FloatingActionButton.java:105) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:835) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:811) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) at android.view.LayoutInflater.inflate(LayoutInflater.java:515) at android.view.LayoutInflater.inflate(LayoutInflater.java:394) Copy stack to clipboard
This is the error i get when i change the support library version to 23.1.0 Error:(103, 24) No resource found that matches the given name (at 'style' with value '@style/Base.Widget.AppCompat.RatingBar.Small').