wangyao5 / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

Procedures when packaging #237

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add Achartengine1.0.0 to "Build Path".
2. Do "Android Tools->Export Unsigned Application Package...".
3. Problems:"conversion to dalvik format failed with error 1".

What is the expected output? What do you see instead?

Answer:Should be able to produce one of APK file, but I had a problem

Please provide a source code snippet that we can use to replicate the issue.

Answer:"conversion to dalvik format failed with error 1"

What version of the product binary library are you using?

Answer:I use achartengine1.0.0 android2.2 adt20 eclipse Indigo Release

Please provide any additional information below.

Answer:I had a 3 graphics are basic usage

Example Cord:
    /**
     * @category 
     * */
    public class AChartExample2 {
        String[] p1title;
        String[] p1value;

        public AChartExample2(String[] title, String[] value) {
            p1title = title;
            p1value = value;
        }

        public Intent execute(Context context) {
            return ChartFactory.getBarChartIntent(con, getBarDataset(),
                    getBarRenderer(), Type.DEFAULT);
        }

        @SuppressWarnings("deprecation")
        public XYMultipleSeriesRenderer getBarRenderer() {

            XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
            SimpleSeriesRenderer r = new SimpleSeriesRenderer();

            r.setColor(Color.GREEN);
            renderer.addSeriesRenderer(r);

            renderer.setChartTitle("Report");
            renderer.setChartTitleTextSize(30);

            // renderer.setXTitle("site");
            renderer.setYTitle("num");

            renderer.setAxisTitleTextSize(18);
            renderer.setXAxisMin(0.5);
            renderer.setXAxisMax(5.5);
            renderer.setYAxisMin(0);
            renderer.setYAxisMax(100);

            renderer.setDisplayChartValues(true);
            renderer.setChartValuesTextSize(15);

            renderer.setShowGrid(true);
            renderer.setFitLegend(true);
            renderer.setXLabels(0);

            String xml = QHSave.GetSharedPre(con, QHWeb.GOBLE_CLASS.uKey);
            QHFlag.e("p1 name len:" + p1title.length);
            for (int i = 1; i <= p1title.length; i++) {

                String unitName = QHXml.getTitleById(xml, p1title[i - 1]);
                QHFlag.e("p1 name:" + unitName);
                renderer.addTextLabel(i, unitName);
            }

            renderer.setBarSpacing(1);
            return renderer;
        }

        private XYMultipleSeriesDataset getBarDataset() {

            XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();

            CategorySeries series = new CategorySeries("Count"); 

            QHFlag.e("p1 vale len:" + p1value.length);
            for (String val : p1value) {
                QHFlag.e("p1 value:" + val);
                series.add(Double.parseDouble(val));
            }

            dataset.addSeries(series.toXYSeries());
            return dataset;

        }
    }

Original issue reported on code.google.com by jinghanq...@gmail.com on 2 Aug 2012 at 2:54

GoogleCodeExporter commented 9 years ago

Original comment by dandrome...@gmail.com on 8 Jan 2013 at 12:23