Error when issuing permission android

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
NoFanru
Newbie
Posts: 16
Joined: Wed Jun 21, 2023 3:34 am
Projects: Yandere pjSEKAI boys (Yandere Rui)
Discord: nofanru
Contact:

Error when issuing permission android

#1 Post by NoFanru »

I tried to issue permission for android using this code:

Code: Select all

label splashscreen:
    if renpy.variant("android"):
        if renpy.request_permission("android.permission.MANAGE_EXTERNAL_STORAGE"):
            pause 0.01
    return
I used this before and it worked, but now when I build the apk file and run it on Android or an Android emulator, the following error appears:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 30, in <module>
AttributeError: 'NoneType' object has no attribute 'SDL_AndroidRequestPermission'

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "00start.rpyc", line 241, in script call
  File "script.rpyc", line 30, in script
  File "renpy/ast.py", line 1842, in execute
  File "renpy/python.py", line 1209, in py_eval
  File "renpy/python.py", line 1202, in py_eval_bytecode
  File "game/script.rpy", line 30, in <module>
  File "renpy/exports.py", line 4666, in request_permission
AttributeError: 'NoneType' object has no attribute 'SDL_AndroidRequestPermission'
I'm using Ren'Py 8.2.1

I also tried using it in a new project to make sure nothing was causing conflicts

Post Reply

Who is online

Users browsing this forum: Adabelitoo, Ocelot