J'utilise pyqtdeploy pour emballer un script python très simple dans Qt Project. Ensuite, je vais essayer de le compiler en tant que fichier .apk. Je considère que l'environnement a été complètement mis en place jusqu'à présent, y compris Android SDK, Android NDK, Qt, studio android, fourmi etc. Une erreur étrange apparaît toujours lors de l'exécution de pyqtdeploy.pyqtdeploy jette un problème extrêmement étrange
Voici mon code:
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QLabel
class Main(QWidget):
def __init__(self):
super().__init__()
self.build_inter()
def build_inter(self):
self.lb = QLabel("Test", self)
self.lb.move(0, 0)
self.show()
if __name__ == '__main__':
app = QApplication(sys.argv)
w = Main()
sys.exit(app.exec_())
J'interceptai une partie des informations d'erreur:
..\include/pyport.h:617:60: error: expected constructor, destructor, or type conversion before '(' token
# define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE
^
..\include/fileutils.h:109:1: note: in expansion of macro 'PyAPI_FUNC'
PyAPI_FUNC(int) _Py_get_inheritable(int fd);
^
..\include/pyport.h:617:60: error: expected constructor, destructor, or type conversion before '(' token
# define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE
^
..\include/fileutils.h:111:1: note: in expansion of macro 'PyAPI_FUNC'
PyAPI_FUNC(int) _Py_set_inheritable(int fd, int inheritable,
^
..\include/pyport.h:617:60: error: expected constructor, destructor, or type conversion before '(' token
# define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE
^
..\include/fileutils.h:114:1: note: in expansion of macro 'PyAPI_FUNC'
PyAPI_FUNC(int) _Py_dup(int fd);
et la capture d'écran:
Ma config:
Avez-vous rencontré un problème similaire? Qu'est-ce que je suis supposé faire?
Merci d'avance!