Git Product home page Git Product logo

Comments (9)

MichaelJokAr avatar MichaelJokAr commented on May 31, 2024

报什么错

from multilanguages.

YonStone avatar YonStone commented on May 31, 2024

没有报错,就是必须要在getString()前加上getApplicationContext()才能正常翻译。但是demo下载下来跑又不需要加上

from multilanguages.

MichaelJokAr avatar MichaelJokAr commented on May 31, 2024

你是在activity里的么

from multilanguages.

YonStone avatar YonStone commented on May 31, 2024

是的,我怕自己误操作,把几个activity和资源文件,包括MultiLanguagesApp都是直接复制到新建的项目中。不过没有加入MyService和MyIntentService,(我看源代码 这部分代码不执行也能翻译成功,是这里的原因吗)

from multilanguages.

MichaelJokAr avatar MichaelJokAr commented on May 31, 2024

我在mainActivity里也没有用getApplicationContext(),你的activity的attachBaseContext有自己重写么

from multilanguages.

YonStone avatar YonStone commented on May 31, 2024

有用过getApplicationContext()的啊,上面那段代码是直接复制过去的,attachBaseContext是在BaseActivity里重写

from multilanguages.

MichaelJokAr avatar MichaelJokAr commented on May 31, 2024

image

from multilanguages.

MichaelJokAr avatar MichaelJokAr commented on May 31, 2024

@YonStone 麻烦试试v0.0.8版本

from multilanguages.

qiudanyao avatar qiudanyao commented on May 31, 2024

有用过getApplicationContext()的啊,上面那段代码是直接复制过去的,attachBaseContext是在BaseActivity里重写

请问解决了嘛?

from multilanguages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.