2017-09-01 18 views
1

私はpyqtdeployを使用して、非常に単純なPythonスクリプトをQt Projectにパックしています。それから私は.apkファイルとしてコンパイルしようとします。 Android SDK、Android NDK、Qt、アンドロイドスタジオ、アリなど、これまで環境が完全に設定されていると考えています。pyqtdeployを実行すると、奇妙なエラーが常に表示されます。ここでpyqtdeployは非常に奇妙な問題を投げます

は私のコードです:

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_()) 

私は、エラー情報の一部を傍受:

..\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); 

とスクリーンショット:

enter image description here

マイ設定:

enter image description here

誰も同じような問題が発生しましたか?私はどうしたらいいですか?

ありがとうございます!

答えて

0

私は専門家ではありませんが、ドキュメントでは、ターゲット環境がソース環境と等しい場合を除き、「アプリケーションの実行」をチェックするのは意味がありません。あなたのウィンドウからは、WindowsからAndroidにクロスコンパイルされているようですので、「追加ビルドステップ」(「アプリケーションを実行」)の最後のパラメータを省略しようとします。あなたはそれから自分自身をテストする必要があります。 Androidスタジオだと思います。それが役に立てば幸い。

関連する問題