This is a migrated thread and some comments may be shown as answers.

obfuscation apk file runtime error.

1 Answer 48 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Myung Eun
Top achievements
Rank 1
Myung Eun asked on 23 Dec 2014, 07:42 AM

 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... ?






1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 29 Dec 2014, 09:19 AM
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.

 
Tags
General Discussion
Asked by
Myung Eun
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or