android - Binary file -NoClassDefFoundError: … R$styleable circlepageIndicator.java -
error in kitkat device not in greater version of android. after changing gradle file. library used circle pager indicator. https://github.com/jakewharton/viewpagerindicator
dependencies { classpath 'com.android.tools.build:gradle:1.0.0'} to dependencies {classpath 'com.android.tools.build:gradle:1.3.0'}
error is:
binary xml file line #43: error inflating class com.viewpagerindicator.circlepageindicator caused by: java.lang.noclassdeffounderror: com.app.skedule.r$styleable 10-03 12:29:47.501 28314-28314/? e/androidruntime: @ com.viewpagerindicator.circlepageindicator.<init>(circlepageindicator.java:93) 10-03 12:29:47.501 28314-28314/? e/androidruntime: @ com.viewpagerindicator.circlepageindicator.<init>(circlepageindicator.java:74) circlepageindicator.java(inside project->java->viewpagerindicator package) package com.viewpagerindicator; public class circlepageindicator extends view implements pageindicator { private static final int invalid_pointer = -1; private float mradius; private final paint mpaintpagefill = new paint(anti_alias_flag); private final paint mpaintstroke = new paint(anti_alias_flag); private final paint mpaintfill = new paint(anti_alias_flag); private viewpager mviewpager; private viewpager.onpagechangelistener mlistener; private int mcurrentpage; private int msnappage; private float mpageoffset; private int mscrollstate; private int morientation; private boolean mcentered; private boolean msnap; private int mtouchslop; private float mlastmotionx = -1; private int mactivepointerid = invalid_pointer; private boolean misdragging; public circlepageindicator(context context) { this(context, null); } public circlepageindicator(context context, attributeset attrs) { this(context, attrs, r.attr.vpicirclepageindicatorstyle); } public circlepageindicator(context context, attributeset attrs, int defstyle) { super(context, attrs, defstyle); if (isineditmode()) return; //load defaults resources final resources res = getresources(); final int defaultpagecolor = res.getcolor(r.color.default_circle_indicator_page_color); final int defaultfillcolor = res.getcolor(r.color.default_circle_indicator_fill_color); final int defaultorientation = res.getinteger(r.integer.default_circle_indicator_orientation); final int defaultstrokecolor = res.getcolor(r.color.default_circle_indicator_stroke_color); final float defaultstrokewidth = res.getdimension(r.dimen.default_circle_indicator_stroke_width); final float defaultradius = res.getdimension(r.dimen.default_circle_indicator_radius); final boolean defaultcentered = res.getboolean(r.bool.default_circle_indicator_centered); final boolean defaultsnap = res.getboolean(r.bool.default_circle_indicator_snap); //retrieve styles attributes `typedarray = context.obtainstyledattributes(attrs, r.styleable.circlepageindicator, defstyle, 0); //error here`
by reference of link
added
dependencies { compile 'com.android.support:multidex:1.0.0'} defaultconfig { multidexenabled true}
and
public class myapplication extends multidexapplication { @override protected void attachbasecontext(context base) { super.attachbasecontext(base); multidex.install(this); }`
finally got solution.
Comments
Post a Comment