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

Error while deploying NFC qt code to android:



  • Error while deploying qt code to android:

    W System : ClassLoader referenced unknown path:
    W linker : /data/data/org.qtproject.example.NFC_Research/qt-reserved-files/plugins/platforms/android/libqtforandroid.so: is missing DT_SONAME will use basename as a replacement: "libqtforandroid.so"

    Whats this issue and how to resolve this ?

    below is my code:
    **MainWindow.cpp
    **
    manager = new QNearFieldManager(this);

        if(manager->isAvailable())
        {
            qDebug() << " Nfc is availiable";
        }
        else
        {
            qDebug() << " Nfc is not availiable";
            qWarning() << "NFC not available";
        }
        manager->setTargetAccessModes(QNearFieldManager::NdefReadTargetAccess);
        manager->registerNdefMessageHandler(this, SLOT(handleNdefMessage(QNdefMessage,QNearFieldTarget*)));
    
        connect(manager,SIGNAL(targetDetected(QNearFieldTarget*)),this,SLOT(nfcTargetDetected(QNearFieldTarget*)));
        connect(manager,SIGNAL(targetLost(QNearFieldTarget*)),this, SLOT(nfcTargetLost(QNearFieldTarget*)));
    
    
    if (!manager->startTargetDetection()) {
        qWarning() << "NFC target detection could not be started";
    }
    

    main.cpp
    QApplication a(argc, argv);
    MainWindow w;
    w.show();


  • Qt Champions 2019

    It looks more like a warning and not an error.
    Is the application deployed and does it run?



  • application id deployed but doesn't work because according to what i understand is that qt will create all libraries required to run in android device. libqtforandroid.so is a core library for running qt code .

    NFC always say as it is not available where as phone supports nfc. This can also be linked for my thread " QT NFC not working".

    Can you tell how to use nfc in qt . Examples that are there in qt are not working. When ever i use the code that i posted it will always say as nfc not availiable.


  • Qt Champions 2019

    Which Qt version are you using?
    NFC support for Android was added in 5.6


Log in to reply