Cant import android files in gluon mobile - javafx

my problem is that
import android.content.res.AssetFileDescriptor;
import android.media.AudioManager;
import javafx.scene.media.MediaPlayer;
import javafxports.android.FXActivity;
return The import android cannot be resolved.
although the class containing those imports is inside the android folder in the gluon single view project and the sdk is referenced.

Related

import Qt5Compat.GraphicalEffects: QML module not found

I am on Arch Linux and I am trying to use PySide6 and QT6 in my project since I will need to be able to use singleton qml objects and PySide2 doesn't seem to support the registration of singleton qml objects. My project uses ColorOverlays and DropShadows, so I will need GraphicalEffects support. However, according to the doc pages, these aren't supported by Qt6 and require a compatibility module, Qt5Compat.GraphicalEffects to be supported.
I am trying to import Qt5Compat.GraphicalEffects into my QML code via the import statement below:
import Qt5Compat.GraphicalEffects
However, when I add this to my project's QML in QT Creator, I am getting the error: "QML module not found."
Here are some things I have tried in order to remedy this issue:
Installed QT using the installer from the website.
Installed Qt6/5 via pacman.
Installed the qt6-5compat package from the AUR.
Installed qt6/5-base from the AUR.
Googling the issue.
How can I fix this issue with importing Qt5Compat.GraphicalEffects?
EDIT:
I am using Python and PySide6 for my backend code, but I am writing the front-end in QML, which is where I am having my issue.
Here could be the solution for the problem.
From the main directory "QT" you need to take the Qt5Compad module. This must be added to the development environment.
It works with Pyside6 and PyQT6.
Here is a better description: QT6.4 QML PYTHON module "Qt5Compat.GraphicalEffects" is not installed
You have to keep in mind that PySide2 is a binding of Qt5 and PySide6 is that of Qt6.
If you want to use ColorOverlay or DropShadow with pyside2 then you should follow the Qt5 documentation that says you should use import QtGraphicalEffects 1.15.
If instead you want to use it in pyside6 it has moved those components to the Qt5Compat module so you should use: import Qt5Compat.GraphicalEffects.
So the way to import will depend on whether you are using PySide2 (Qt5) or PySide6 (Qt6).
Note: QtCreator does not have many capabilities so many times it will throw false positives since it is not able to understand PySide. Unfortunately they have not given it "much affection" so it is not optimized to work with python obtaining that type of warnings. So just obviate the warning.

Nextjs, import styles from node_modules fails in production

Nextjs is not loading css for specific packages in production and yet works fine in development even after following Nextjs documents. As is suggested by several devs.
This is happening for several packages i have installed.
in _app.js
import 'react-toastify/dist/ReactToastify.css';
import "react-responsive-carousel/lib/styles/carousel.min.css";
in pages/about.js where am using the carousel
import {Carousel} from 'react-responsive-carousel';
<div>
<Carousel>
...
</Carousel>
</div>
The above setup works fine in development but cannot get it to work in production.
I should note, that many such questions are not receiving the attention and response.

Installing the localized version of firebaseui in a react project

I have build the FirebaseUI as described here.
I can see the local version in the dist folder, however, I'm unsure how to include it in my react project.
The docs state:
import firebaseui from './npm__{LANGUAGE_CODE}';
I feel I'm missing a step in between.
Take a look at https://github.com/firebase/firebaseui-web/blob/master/README.md#option-2-npm-module
You should be ok with
import * as firebaseui from 'firebaseui'

QT WebView/WebKit issue

I'm trying to add a WebView to my GUI. First, the app crashed unexpectedly everytime. I figured I probably needed to import WebKit 3.0 along with WebView 1.1. After adding the required import statement, I try to run but it says that module "QtWebKit" is not installed. I checked the include folder and its indeed not there.
So my question is if QtWebKit is what I need, how do I install it?
Update:
When this code exists in my .qml file, the app crashes without starting:
WebEngineView{
anchors.fill: parent
url: "http://www.google.com"
}
This is the import statement I'm using on QT 5.6:
import QtWebEngine 1.1
This is the segmentation fault error generated because of the presence of the code mentioned above:
Full demo code:
import QtQuick 2.6
import QtQuick.Controls 1.5 as QC
import QtQuick.Controls.Styles 1.4
import QtGraphicalEffects 1.0
import QtQuick.Dialogs 1.2
import QtMultimedia 5.6
import Qt.labs.controls 1.0
import QtWebEngine 1.2
ApplicationWindow {
height: 640
width: 480
visible: true
Loader{
anchors.fill: parent
sourceComponent: webComponent
}
Component{
id: webComponent
WebEngineView{
anchors.fill: parent
id: web
profile: WebEngineProfile {
storageName: "Default"
}
}
}
}
Your debugger's stack trace shows that your crash is occurring in Qt's OpenGL functions. Remember to call QtWebEngine::initialize() before you start using Qt WebEngine.
Note also:
Qt WebView is a lightweight module for running your mobile OS's native web engine. Its main QML type is called WebView.
Qt WebKit is a heavyweight module for running a fully self-contained web engine. Its main QML type is also called WebView, but this is completely unrelated to the other WebView. This module is now deprecated.
Qt WebEngine is a heavyweight module for running a fully self-contained web engine. Its main QML type is called WebEngineView. This module is meant to replace Qt WebKit.
Qt WebKit is a deprecated module. Maybe you can install it from Qt sources, but since you want to use WebView 1.1 (and that you're on Qt5.6), I think you'd better use Qt WebEngine (using deprecated modules is not recommended).
You can already see it in your folder (modules QtWebEngine and QtWebView).

import org.openqa.selenium.WebDriver;

Can anyone tell me, what are these following lines used for in selenium, and the other import commands and there uses
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
WebDriver is a tool for automating testing web applications, and in particular to verify that they work as expected.
The driver comes in the form of an xpi (firefox extension) which is added to the firefox profile when you start a new instance of FirefoxDriver. To use FirefoxDriver Firefox must be installed on machine and be in the normal location for OS.
You can find detailed information and example codes HERE

Resources