obfuscation apk file runtime error.

2 posts, 0 answers
  1. Myung Eun
    Myung Eun avatar
    1 posts
    Member since:
    Dec 2014

    Posted 23 Dec 2014 Link to this post


     hi. 
     my proguard code contain 
     -dontwarn com.telerik.**
     -keep class com.telerik.**  { *; }


    apk file is successful, but run time error. 
    12-23 16:31:17.436: E/AndroidRuntime(18569): java.lang.Error: java.lang.NoSuchMethodException: getResult []
    12-23 16:31:17.436: E/AndroidRuntime(18569): at com.telerik.widget.chart.engine.databinding.PropertyNameDataPointBinding.getMemberValue(Unknown Source)
    12-23 16:31:17.436: E/AndroidRuntime(18569): at com.telerik.widget.chart.engine.databinding.ReflectiveDataPointBinding.getValue(Unknown Source)
    12-23 16:31:17.436: E/AndroidRuntime(18569): at com.telerik.widget.chart.engine.databinding.datasources.CategoricalSeriesDataSource.initializeBinding(Unknown Source)
    .....

    how can obfuscation... ?






  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 29 Dec 2014 Link to this post

    Hi Myung,

    The PropertyNameDataPointBinding uses reflection to access a method from the class of your data item. When the class is obfuscated, the method's name may be changed so may not be able to access it this way. Since this PropertyNameDataPointBinding class is intended to be used only as a convenience and not as a requirement for RadChartView, my suggestion is that you use the alternative DataPointBinding. Here's an example:

    DataPointBinding dataPointBinding = new DataPointBinding() {
                @Override
                public Object getValue(Object o) throws IllegalArgumentException {
                    return ((MyDataItem)o).getResult();
                }
            };

    Don't hesitate to get back to us if you need additional assistance.

    Regards,
    Todor
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
Back to Top