Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Using Android Studio



  • Hi,

    I like writing my Android specific code in Android Studio because of the syntax highlighting and checks. But unfotunately at the biginning of my code this import fails:

    import org.qtproject.qt5.android.bindings.QtService;
    

    It is quite clear that Android Studio doesn't see it. But unfortunately it brakes a lot of the code checks. Is it possible to fix this?



  • @vlada it looks like you should set your build/compile path in Android Studio to Qt<version>/<version>/android_armv7/jar, i.e. for Qt 5.9.0 something like Qt5.9.0/5.9/android_armv7/jar



  • I would expect something like this. But unfortunately I can not find such settings in Android Studio.



  • @vlada I see, I really have no experience with Android Studio since I use Eclipse for Java development.
    However, think that if you have an external Java library you want to use with your Android app, you'll face this same situation you're experiencing with the Qt Activity.
    I suggest looking for tips about adding external libraries/jar files to your Android Studio project.i.e. this question may help.


Log in to reply