Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

static jfieldID xxx not valid for class java.lang.Class<org.renpy.android.PythonActivity #696

Closed
xxnet opened this issue Mar 30, 2016 · 3 comments

Comments

@xxnet
Copy link

xxnet commented Mar 30, 2016

The build out apk run correctly on Android 4.x, but fail on Android 5.1.1 and Android 6

log is same as:
#686

What is the problem and how to solve this?
how to figure it out?

Thanks.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@inclement
Copy link
Member

According to the linked issue, this is to do with accessing attributes of org.renpy.android.PythonActivity with the SDL2 bootstrap, in which case this is only a shim and you should instead use org.kivy.android.PythonActivity. Is that what you're asking about?

@xxnet
Copy link
Author

xxnet commented Apr 5, 2016

It triggered at https://kivy.org/docs/_modules/kivy/metrics.html

@reify
def fontscale(self):
'''Return the fontscale user preference. This value is 1 by default but
can vary between 0.8 and 1.2.
'''
custom_fontscale = environ.get('KIVY_METRICS_FONTSCALE')
if custom_fontscale:
return float(custom_fontscale)

   if platform == 'android':
       from jnius import autoclass
       if USE_SDL2:
           PythonActivity = autoclass('org.kivy.android.PythonActivity')
       else:
           PythonActivity = autoclass('org.renpy.android.PythonActivity')
       config = PythonActivity.mActivity.getResources().getConfiguration()
       return config.fontScale

I change bootstrap to pygame to avoid this but not work stable.
Maybe some bug there.

@inclement
Copy link
Member

Closing as not a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants