GNU/Linux >> LINUX-Kenntnisse >  >> Ubuntu

Qt Audio Engine nicht in Ubuntu SDK?

Ich verwende Ubuntu 14.04. Ich habe Ubuntu SDK ohne Probleme mit den Anweisungen auf der Ubuntu-Website installiert. Ich habe ein neues QML-Projekt erstellt. Ich möchte eine App erstellen, die Qt Audio Engine verwendet. Hier ist mein Code, in dem ich für die Audio Engine teste:

import QtQuick 2.0
import Ubuntu.Components 0.1
import QtAudioEngine 1.0
import "ui"

MainView {
// objectName for functional testing purposes (autopilot-qt5)
objectName: "mainView"

// Note! applicationName needs to match the "name" field of the click manifest
applicationName: "com.ubuntu.developer..AudioEngineTest"

/*
 This property enables the application to change orientation
 when the device is rotated. The default is false.
*/
//automaticOrientation: true

width: units.gu(100)
height: units.gu(75)

AudioEngine {

}

Tabs {
    id: tabs

    HelloTab {
        objectName: "helloTab"
    }

    WorldTab {
        objectName: "worldTab"
    }
}
}

Wenn ich versuche, das Programm auszuführen, erhalte ich eine Fehlermeldung:Modul „QtAudioEngine“ ist nicht installiert.

Die Qt Audio Engine ist in der aktuellen Ubuntu QML API enthalten. Warum ist es nicht im SDK? Soll ich es irgendwie selbst installieren oder wird es vom Entwicklungsteam hinzugefügt?

Akzeptierte Antwort:

Ich habe diese modifizierte Version Ihres Codes (kleine Änderungen an Registerkarten) verwendet, um zu testen, was fehlte:

import QtQuick 2.0
import Ubuntu.Components 0.1
import QtAudioEngine 1.0
import "ui"

MainView {
    // objectName for functional testing purposes (autopilot-qt5)
    objectName: "mainView"

    // Note! applicationName needs to match the "name" field of the click manifest
    applicationName: "com.ubuntu.developer.AudioEngineTest"

    /*
     This property enables the application to change orientation
     when the device is rotated. The default is false.
    */
    //automaticOrientation: true

    width: units.gu(100)
    height: units.gu(75)

    AudioEngine {

    }

    Tabs {
        id: tabs

        Tab {
            title: "helloTab"
        }

        Tab {
            title: "worldTab"
        }
    }
}

Grundsätzlich müssen Sie für ein Desktop-Target folgendes Paket installieren:

sudo apt-get install qtdeclarative5-qtaudioengine-plugin

Für Ubuntu Touch:

sudo apt-get install qtdeclarative5-qtaudioengine-touch-plugin

Schließlich können Sie es mit qmlscene testen:

$ qmlscene ./audio.qml
Module 'QtAudioEngine' does not contain a module identifier directive - it cannot be protected from external registrations.
unity::action::ActionManager::ActionManager(QObject*):
    Could not determine application identifier. HUD will not work properly.
    Provide your application identifier in $APP_ID environment variable.
default openal device =  OpenAL Soft 
device list: 
     OpenAL Soft 
AudioEngine begin initialization 
creating default category 
init samples 0 
init sounds 0 
AudioEngine ready. 

Ubuntu
  1. So installieren Sie den Android SDK Manager unter Ubuntu 16.04

  2. Ubuntu – Crontab funktioniert nicht?

  3. Pulse Audio Equalizer funktioniert nicht in Ubuntu 18.04?

  4. Ubuntu 14.04 Libreoffice öffnet sich nicht?

  5. Spawn-Befehl auf Ubuntu 14.04 nicht gefunden?

So installieren Sie Google Cloud SDK auf Ubuntu 20.04

So richten Sie .Net Core in Ubuntu 20.04 ein

So installieren Sie den Audacity Audio Editor unter Ubuntu 20.04

Installieren Sie Google Cloud SDK auf Ubuntu 20.04

Ubuntu Install Kühnheit (1-Klick-Installation)

Traceroute-Befehl funktioniert nicht unter Ubuntu