Missing Ubuntu.Components QML Module - mobile

I installed QTCreator and Ubuntu SDK as shown here.
When trying to run the code sample provided here, QTCreator tells me it can't find the Ubuntu.Components QML Module.
Notes:
The build-logs says:
file:///home/giladnaaman/Programming/Projects/CurrencyConverter/CurrencyConverter.qml:2 module "Ubuntu.Components" is not installed
But the directory /opt/qt5/imports/Ubuntu/Components
exists (and is full of files).
After adding importPaths: [ "/opt/qt5/imports" ] to the qmlproject file:
QML module does not contain information about components contained in plugins.
QMetaType::registerType: Binary compatibility break -- Type flags for 'QPaintBufferCacheEntry'[1024] don't match. Previously registered TypeFlags(0x103), now registering TypeFlags(0x3).

Do not add the importPaths property to the qmlproject.
Did you setup the QML Scene as your QML viewer?
In Qt Creator, go to Tools > Options…
Choose the External Tools tab, then in the pane select the Preview (qmlviewer) entry
On the Executable: field on the right, replace the contents with /opt/qt5/bin/qmlscene.
Optionally change the command name by double-clicking on the Preview (qmlviewer) entry from above. You can call it Preview (qmlscene).
Click on OK to save the changes.
you’ll be able to view your app through the Tools > External > Qt Quick > Preview (qmlscene)
The Ubuntu SDK is still using the older version of Qt Creator from QT4 it will not be able to locate the Ubuntu Components, and say the components are not found. But the QML Scene used for running the QML GUI will load it and run it without any problems.

Related

Codename One Recover Project

I am having an Android app that I developed in July 2019 using Eclipse (at least that is what the folder says).
Now I want to make some changes and tried to import and run the project with Eclipse.
But when trying to run the project, I get the following error messages:
These values are required!
userName - login information from codenameone.com
password - the password matching your login from codenameone.com
jarFile - the application jar file resulting from the build
ApplicationDisplayName - display name for the application in the UI
MainClassName - the name of the main class not including the package name
ApplicationPackageName - the package in which the main class resides, this will also be used to classify the application. It is recommended you give this some thought since package names are impossible to change later on some stores!
version - the version number for the application
There is some other strange behaviour, like the error:
The method getAllStyles() is undefined for the type Form
and no Simulator_Project.launch file ...
I have tried refreshing the libraries, but to no avail. Maybe there have changes been made to the build process ...
How can I run the project?

Specflow Generate Step Definition is missing from the context menu

I right click on my feature file I should get the option to Generate step definitions. It is not there in the context menu.
I did a search and it says to install specrun for nunit.
I tried installing SpecRun.Nunit from Manage NuGet Packages.
I get the error:
Severity Code Description Project File Line Suppression State
Error Unable to load the service index for source
http://packagesource.
An error occurred while sending the request.
The remote name could not be resolved: 'packagesource' 0
I have Visual Studio Enterprise 2017 isntalled.
I have installed Selenium-webdriver, Specflow
How can I solve this issue please, thanks.
You need to install the specflow nuget package as well as the Visual Studio integration package from the menu item Tools -> "Extensions and Updates..."
Here's what I have to do to make the option appear in the context menu in VS2019.
I installed Specflow normally, from Extensions-> Manage Extensions,
then searched for Specflow for Visual Studio 2019.
Installed the package and re-started VS.
Then I created a new project, a C# Test.
Once the initial setup is ready, from the context menu in the
Solution Explorer I went "Add->New Item..." and selected "SpecFlow
Feature File", I typed in the info I wanted in my Feature file.
Over any of the Gherkin lines, I right clicked to get the context
menu and selected "Go to Definition". A dialog displays, telling me
that there is not a match, but I can save the lines in clipboard. I
selected Yes.
Then again on the Solution Explorer (like step 4), Right Click
"Add->New Item...", but now selected "SpecFlow Step Definition". The
Step Definition will be that for the calculator test.
Now here's the trick:
Delete all of the steps, leaving the main class empty.
Like this:
using System;
using TechTalk.SpecFlow;
namespace SpecflowFirst
{
[Binding]
public class SpecFlowFeature1Steps
{
}
}
Then paste the snippet you got from the dialog box inside the main
class
Like this:
using System;
using TechTalk.SpecFlow;
namespace SpecflowFirst
{
[Binding]
public class SpecFlowFeature1Steps
{
[Given(#"I navigated to the github login page")]
public void GivenINavigatedToTheGithubLoginPage()
{
ScenarioContext.Current.Pending();
}
}
}
This will trigger errors in the compilation. If you point to the error in "ScenarioContext" and do "Show potential fixes", one of the fixes will be to install "Sprecflow extension". With this you install the remaining integration that will now display the option in the context menu.
That fixed the issue to me and now I can see in the context menu "Generate Step Definitions"
I followed Kyon's excellent walkthrough, but this didn't work for me. Even though SpecFlow was installed correctly, it didn't recognise the following library, or make any suggestions to "Fix this issue":
using TechTalk.Specflow
Then I noticed that, with the a brand-new MsTest project and the latest VS2019 (as of October 2020) you need to install a slightly-earlier version of SpecFlow (v2.1 compared to v2.4).
So, if you're also having problems getting this illusive "Generate Step Definitions" menu item to appear, check out your Dependencies\Packages for any exclamation marks.

['type aliases' can only be used in a .ts file]

I use command react-native init "name project" then open vscode appear to have error message code. (image)
This is what you need to do with VS Code, observe the gif carefully
Steps to resolve error
1. Go to extension
2. Click on more (...) and select Show Built-in extension
3. Search "TypeScript and JavaScript Language Features" - yellow & blue icon
4. Click on Setting icon of extension and select Disable (workspace)
5. Click on Reload / Restart Required
If you are getting this in React Native its probably a known bug in VSCode, that when Google Flow (which competes with MS Typescript) is coded, shows errors erroneously mentioning Typescript.
Your current .js code is supposed to be preprocessed by Flow into another .js file with "proper" js.
So make sure Flow is installed and then disable the Typescript parsing support. Here's the official answer on the Flow installation webpage:
Set javascript.validate.enable option to false or completely disable
the built-in TypeScript extension for your project (see gif below)...
Otherwise, you may want to stay as is and just change your code as suggested by C2P1 on March 19, 2018 on the github issue 631
To disable the [js] parser (connected to Typescript),
In VSCode menu: File -> Preferences -> User settings, (or ctrl+,) and add the following line
"javascript.validate.enable": false,
This answer was completed after seeing Idan Dagan's answer (Not the accepted answer) here: js 'types' can only be used in a .ts file - Visual Studio Code using #ts-check
And here's an excellent albeit old page about setting up the react-native environment, from Hackernoon. (You also have the VSCode React-native-full plugin)
Just disable built-in extension for TypeScript in VSCode. On the VSCode Extensions choose "Show Built-in Extensions" and then search for "TypeScript and JavaScript Language Features", Click disable then reload the VSCode. It works for me
In VScode
Press
CTRL + SHIFT + P
Use this command
Open User Settings
copy and paste the next line in the search bar in settings
#ext:vscode.typescript-language-features
ready uncheck JavaScript validation
Helped me to resolve
To disable the [js] parser (connected to Typescript),
In VSCode menu: File -> Preferences -> User settings, (or ctrl+,) and add the following line
"javascript.validate.enable": false,
This is what you are looking for. Unfortunately I haven't Googled a proper solution but we have to disable some JS checking.
https://github.com/Microsoft/vscode-react-native/issues/631
I've solved this with a plugin for VSCode "Flow Language Support". It will control the errors of the code instead of the plug-in TS-JS (built-in plugin of VS Code). In Details of plugin, guides you how to disable the original plugin TS-JS VSCode.
instead of disabling Typescript and Javascript language features extension, you can go to the extension settings, find the option Javascript > Validate: Enable, and uncheck it to remove any warnings.

Export RCP with plug-in project as dependency failure

I had a RCP application that uses a plug-in project as dependency. I have added the plug-in project into MANIFEST.MF of my RCP program and it works well. But when I exported the program, it posted an error:
The build.properties is as follows:
output.. = bin/
bin.includes = META-INF/,\
.,\
Application.e4xmi,\
plugin.xml,\
com.hpi.hpdm.console.dependencies;bundle-version="1.0.0"
source.. = src/
source.. = src/
jars.compile.order = .
source.com.hpi.hpdm.console.dependencies;bundle-version="1.0.0"/ =
Comment: com.hpi.hpdm.console.dependencies is the plug-in project, com.hpi.hpdm.console is the main project.
I don't know what "\com.hpi.hpdm.console\"1.0.0"\=" does not exise! means. Any clues will be appreciated.
Updated:
The build.properties:
The .product file Contents tab:
When exporting an RCP your .product file must list every plugin (or feature) that is used by the RCP.
If you are using a feature based product configuration:
Open the feature.xml for your code and add all your plugins to the feature (in your case the feature is 'com.hpi.hpdm.console.feature').
If you are using a plugin based product configuration:
Open the .product file editor and switch to the 'Contents' tab. If your main plugin is listed there you should be able to use the 'Add Required' button to update the list. Make sure that all your plugins have been included (along with a lot of standard Eclipse plugins).

'CoreVideo/CoreVideo.h' file not found

When I run a iOS App on my device , This error will appear
'CoreVideo/CoreVideo.h' file not found
not matter what project even though create a new project , once run the app on my device this error will appear
but the Simulator will be OK~
and I can't find some frameworks in
Target--Build Phase--Link Binary With Librares--add
like AVFoundation.framework AudioToolBox.framework
Should i reinstall the xcode on my mac~???
Make certain you've added the CoreVideo framework to your project.
Here's how I do it in my own projects:
If you need help figuring out where it is (it's hidden within the XCode app package itself), let me know and I can show you.
Also, make certain "Target Membership" is checked for CoreVideo in the File Inspector of your project. It looks like this:

Resources