Skip to content Skip to sidebar Skip to footer

Android Studio Aapt.exe Finished With Non Zero Exit Value 1

In My app I am using google play services and some others and all are working fine as expected. but when I comes towards the design side , I was asked to used the segmented control

Solution 1:

I had the same problem when using the android-segment-control custom view. I think the problem comes with the newer Build Tools version (mine is now 22.0.1) which brings some default border_width value.

To remove the custom border_width:

  • In the attrs.xml file remove the "border_with" attribute so only the following remains:

    <declare-styleablename="SegmentedGroup"><attrname="corner_radius"format="dimension" /><attrname="tint_color"format="color" /><attrname="checked_text_color"format="color" /></declare-styleable>
  • In the SegmentedGroup.java file remove the "mMarginDp" variable so only the following remains:

    try {
    
        mCornerRadius = typedArray.getDimension(
                R.styleable.SegmentedGroup_corner_radius,
                getResources().getDimension(R.dimen.radio_button_conner_radius));
        mTintColor = typedArray.getColor(
                R.styleable.SegmentedGroup_tint_color,
                getResources().getColor(R.color.radio_button_selected_color));
        mCheckedTextColor = typedArray.getColor(
                R.styleable.SegmentedGroup_checked_text_color,
                getResources().getColor(android.R.color.white));
    
    } finally {
        typedArray.recycle();
    }
    

Post a Comment for "Android Studio Aapt.exe Finished With Non Zero Exit Value 1"