Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2488 - MissingResourceException when trying to load localized strings from resource
Summary: MissingResourceException when trying to load localized strings from resource
Status: CONFIRMED
Alias: None
Product: Java TeeChart
Classification: Unclassified
Component: Android (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL: https://www.steema.com/support/viewto...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-26 09:45 EST by yeray alonso
Modified: 2021-11-26 09:45 EST (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2021-11-26 09:45:17 EST
Create a new project in Android Studio and add TeeChart sources as a new module as explained in the forums.
Then add an id to the ConstraitLayout in the activity_main.xml:

android:id="@+id/mainLayout" 

And create a TChart in the MainActivity:

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        ConstraintLayout mainLayout = findViewById(R.id.mainLayout);
        TChart chart = new TChart(this);
        mainLayout.addView(chart);
    }
}


E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.steema.teechartjavaandroidtest, PID: 7394
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.steema.teechartjavaandroidtest/com.steema.teechartjavaandroidtest.MainActivity}: java.util.MissingResourceException: Can't find bundle for base name com.steema.teechart.languages.languages, locale en_US
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3449)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
     Caused by: 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:63)
        at com.steema.teechart.languages.Language.activate(Language.java:78)
        at com.steema.teechart.languages.Language.getString(Language.java:84)
        at com.steema.teechart.Chart.initFields(Chart.java:204)
        at com.steema.teechart.Chart.<init>(Chart.java:529)
        at com.steema.teechart.Chart.<init>(Chart.java:523)
        at com.steema.teechart.TChart.<init>(TChart.java:293)
        at com.steema.teechart.TChart.<init>(TChart.java:285)
        at com.steema.teechart.TChart.<init>(TChart.java:281)
        at com.steema.teechartjavaandroidtest.MainActivity.onCreate(MainActivity.java:18)
        at android.app.Activity.performCreate(Activity.java:7994)
        at android.app.Activity.performCreate(Activity.java:7978)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:223) 
        at android.app.ActivityThread.main(ActivityThread.java:7656) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)