Results 1 to 2 of 2

Thread: Can’t create java class by QAndroidJniObject

  1. #1
    Join Date
    Jan 2011
    Posts
    127
    Thanks
    42
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Can’t create java class by QAndroidJniObject

    Try to create a java class from c++ side but keep crashing

    appBucksAdv.java

    Qt Code:
    1. package adv;
    2.  
    3. import org.qtproject.qt5.android.bindings.QtApplication;
    4. import org.qtproject.qt5.android.bindings.QtActivity;
    5.  
    6. import android.os.Bundle;
    7.  
    8. public class appBucksAdv extends QtActivity
    9. {
    10. }
    To copy to clipboard, switch view to plain text mode 

    simpleJNI.hpp

    Qt Code:
    1. #include <QObject>
    2. #include <QtAndroidExtras/QAndroidJniObject>
    3.  
    4. class simpleJNI : public QObject
    5. {
    6. Q_OBJECT
    7. public:
    8. explicit simpleJNI(QObject *parent = nullptr);
    9.  
    10. private:
    11. QAndroidJniObject advClass_;
    12.  
    13. };
    To copy to clipboard, switch view to plain text mode 

    simpleJNI.cpp

    Qt Code:
    1. #include "simpleJNI.hpp"
    2.  
    3. simpleJNI::simpleJNI(QObject *parent) :
    4. QObject(parent),
    5. advClass_("adv/appBucksAdv") //crash when I create the java class
    6. {
    7. }
    To copy to clipboard, switch view to plain text mode 

    error messages : http://pastebin.com/D1ZWJ53s

    codes : https://github.com/stereomatchingkis...er/androidTest

  2. #2
    Join Date
    Feb 2014
    Posts
    4
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Can’t create java class by QAndroidJniObject

    I can't even get my application to qmake properly when I add this "QT += androidextras" to my project file.

    If you can give me a hand on how to get my Win7/MinGW a way to identify the androidextras, then maybe I can help you out.

    Thanks!

Similar Threads

  1. Replies: 2
    Last Post: 26th October 2011, 14:53
  2. Replies: 4
    Last Post: 4th August 2011, 13:47
  3. Replies: 0
    Last Post: 4th August 2011, 12:37
  4. java class
    By mickey in forum General Programming
    Replies: 2
    Last Post: 19th July 2009, 16:49
  5. is there a class in QT4 like robot class of java
    By sathyanarayanan in forum Qt Programming
    Replies: 1
    Last Post: 18th February 2009, 12:25

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.