1

This exception keeps on appearing:

java.util.MissingResourceException: Can't find bundle for base name

this error has been seen on many other webpages on StackOverflow, but reading them all and testing the given suggestions didn't help me

enter image description here

the Activity looks like this:

package net.juntermanns.mitmatmaschrapport;

import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.TextView;
import android.widget.Toast;

import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.AdListener;

import java.util.ResourceBundle;

import static java.util.ResourceBundle.getBundle;

public class DateActivity extends AppCompatActivity {

    private static ResourceBundle resourceBundle = getBundle("net/juntermanns/mitmatmaschrapportapp/src/resbundle.properties");
    final String TAG = ((resourceBundle.getString("dateactivity")));
    TextView textView;
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
  • Hi. Thank you for answering. This issue I have already took me 24hours. Do you mind writing a proper path for your suggested asset-folder ? – Andre Juntermanns Oct 04 '17 at 23:42

1 Answers1

0

For multilingual apps, you can use strings.xml files

So

res/values/strings.xml 
res/values-de/strings.xml

If you require ResourceBundle, you should create an asset folder, and load them via getAssets()

Where do I place the 'assets' folder in Android Studio?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245