Android Studio - Include ResourceBundles in Module

前端 未结 4 541
陌清茗
陌清茗 2020-12-20 19:35

I currently switched from eclipse to android studio. In eclipse I had 2 projects, one android application project and one java project which I included in the android projec

4条回答
  •  抹茶落季
    2020-12-20 20:08

    Faced exactly the same problem. To make it work I finally had to create a resorces folder in my project module's main folder.

    Android resources folder

    here multiple files starting with the same name (as messages in this picture) gets bundled as a resource bundle.

    Finally had to call it using ResourceBundle.getBundle("org.eclipse.paho.client.mqttv3.internal.nls.logcat") or ResourceBundle.getBundle("org.eclipse.paho.client.mqttv3.internal.nls.messages") to get the required resource.

提交回复
热议问题