I’m using TeeChart for my Android App. I would like to change the provided source code such that the behavior fits my needs a bit better.
I tried to add some methods in the provided java classes (files in “src” folder) and then to create a .jar (containing the modified src folder) of it and added this new jar file as library. (I created the jar file by using command “jar cvf new.jar META-INF com” in command promt)
This leads to errors regarding the compiler. TeeChart classes cannot be resolved anymore.
Then I copied the whole “com” folder of the “src” folder to my project in “app>src>main>java”, which compiles fine.
But the app crashes as soon as the layout in which the TChart is placed is inflated .
Can you please give me a instruction how to import my modified source files to Android Studio properly?
thank you for your quick answer, but i’m afraid this didn’t solve my problem. As far as I can see this more a instruction how to add the teechart library in general.
What I want is to change some methods in the provided library. So I thought best way would be unzip the “src” zip folder (which I could find after installation in the downloaded “TeeChartJavaAndroidSrc_3.2015.0108” folder and then to make changes in the therein contained java classes. The next step is where I get stuck. How do I import my modified classes to Android Studio?
This creates a folder tree under your app “teechart\src\main\java\com\steema\teechart”
After installing TeeChart for Android with sources or TeeChart Java Suite with sources, you should find a src.zip containing the sources. Extracting it you’ll find the TeeChart Java for Android sources, with a structure similar than the created on the empty module above: “src\Android\com\steema\teechart”.
Copy the contents of this path into the path above in your module to have something like this:
After I did that accroding to the step ,the source code can be compiled ,but it can’t work ,it showed the following error
I know it’s a problem about Resource Bundle ,i tried lost of approches to change the property files but finally failed, could anyone can help me to find out the reason and how to solve it.
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.merkapp.hgis, PID: 18423
java.util.MissingResourceException: Can’t find bundle for base name com.steema.teechart.languages.languages, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1561)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1384)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:771)
at com.steema.teechart.languages.Language.activate(Language.java:64)
at com.steema.teechart.languages.Language.activate(Language.java:80)
at com.steema.teechart.languages.Language.getString(Language.java:86)
at com.steema.teechart.Chart.initFields(Chart.java:204)
at com.steema.teechart.Chart.(Chart.java:529)
at com.steema.teechart.Chart.(Chart.java:523)
at com.steema.teechart.TChart.(TChart.java:337)
at com.steema.teechart.TChart.(TChart.java:329)
at com.steema.teechart.TChart.(TChart.java:325)
at com.merkapp.hgis.display.PRPS.(PRPS.java:82)
at com.merkapp.hgis.ui.home.UHFFragment.initViews(UHFFragment.java:227)
at com.merkapp.hgis.ui.home.UHFFragment.onCreateView(UHFFragment.java:51)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2600)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:881)
at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1238)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1303)
at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:439)
at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManagerImpl.java:2079)
at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1869)
at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1824)
at androidx.fragment.app.FragmentManagerImpl.execSingleAction(FragmentManagerImpl.java:1696)
at androidx.fragment.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:299)
at androidx.fragment.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:235)