Flutter .exe Release not running on Windows - windows

When I build flutter for windows with flutter build windows it generates a .exe file with its .dll files etc. However, running that file (.exe) gives me a white screen and my app is not running normally.
Running flutter run --release -d windows however builds my app normally and I can use it.
What is wrong here that running the .exe file is not starting my app properly?
This is my release folder structure when running flutter build windows:
Running the .exe file:

I was using sqflite_common_ffi on Windows and this was causing the issue. Initializing it was only valid for debug thus I had to add the sqlite3.dll to the release build folder. Then it worked fine like before when starting the .exe file.
Detailed description can be found here: https://github.com/tekartik/sqflite/issues/574

Related

Can't find React native project on iOS Simulator or Xcode project

I have deleted my project on Xcode may it be .xcworkspace or .xcodeproj.
Because of that, I had to delete IOS and android folders while downgrading, updating and re-upgrading my react version to re-install IOS and android folders.
Thanks to that the emulator is working but unfortunately the project isn't present in the emulator and is still absent with Xcode. One thing to point out is that the simulator only appears when ran in the integrated terminal and nor in general terminal after cd-ing in the project folder.
Can anyone please help re-integrating the project in the emulator and on Xcode, please.
Here is the error when the emulator is running in a general terminal:
Here is the error when the emulator is running in a general terminal:
error Command failed: xcrun instruments -s
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk' (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
Here is the error for building the project within emulator when ran from VS code integrated terminal:
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening project.xcodeproj
The process you need to follow is so similar to renaming a react native app. Basically you just need to run react-native upgrade in your root project directory. For further info you can check another question here. The instructions below explains how to create another react native project based on a copied one with a new name.
First copy the directory which your to-be-name-changed application exists. And go to your newly cloned directory.
Change the name at index.ios/android.js file which is given as a parameter to AppRegistry.
Change the name and version accordingly on package.json
Delete /ios and /android folders which are remaining from your older app.
Run $react-native upgrade to generate /ios and /android folders again.
Run $react-native link for any native dependency.
Finally run $react-native run-ios or anything you want.
Courtesy of
https://stackoverflow.com/questions/42506068/how-can-i-regenerate-ios-folder-in-react-native-project

Qt5 - Why the .exe don't run anything when make a deployment?

I have a problem with building an application file (*.exe) on windows. I create a simple project and run on QtCreator the result is:
It hasn't any error and warning. After that, I build it with release using kit is Desktop Qt 5.12.1 MSVC2017 64-bit, I got a folder release after rebuild with qmlTest.exe
To continues, I deploy it to follow this link
Deployment Qt apps on Windows
I got some files into the release file of my project
But when I click on qmlTest.exe nothing appears, no error, no missing dll files notifications. I checked process task and no qmlTest was running.
Who can tell me what I was wrong?
Thanks for your kind help!
You are missing some folders & files like QtQml and QtQuick etc..
Qt has a tool called "windeployqt.exe" to do exactly this.
It is used from the Console like this:
windeployqt.exe --dir PATH_TO_DEPLOY --compiler-runtime --release --qmldir PATH_TO_QML MY_EXE
PATH_TO_DEPLOY: an empty folder where you would like the dependencies to be copied
PATH_TO_QML: the folder where you have your qml files
MY_EXE: path to your executable
So in your case, it would look something like this:
C:\Qt\5.12.1\msvc2017_64\bin\windeployqt.exe --dir C:\Users\...\Desktop\deployFolder --compiler-runtime --release --qmldir C:\Users\...\Desktop\QmlTest\qml C:\Users\...\Desktop\build-qmlTest-Desktop_Qt...-Release\release\qmlTest.exe
After running the tool, all the files you need will be in the deployFolder. You just have to copy the executable from the release folder and you're done.
More infos can be found here: https://doc.qt.io/qt-5/windows-deployment.html

Packaged Electron app (.exe) crashes silently, runs fine via command line

Running my Electron app via command-line works fine, but when I double-click the .exe of the packaged app, nothing happens other than my cursor doing a quick "busy" animation. I assume my app is silently crashing.
Is there a way I can get an error message or a crash report from the .exe to help me see what's going on?
From the root of my app directory, both these methods result in my app running fine:
node_modules\.bin\electron.cmd .
electron-packager .
node_modules\.bin\electron.cmd my_app-win32-x64\resources\app
Environment
OS: Windows 10 Anniversary x64
Node: 4.3.1
Npm: 1.14.12
Local electron: 1.4.3
Local and Global electron-packager: 8.1.0
electron-rebuild (for native module "serialport"): 1.2.1
This was not an Electron problem. This was my app trying to access a path relative to process.cwd(), which, when double-clicking the .exe file in the output folder, was not the expected one.
I was able to debug this by running the .exe from the command line, instead of double-clicking the .exe:
my_app-win32-x64\my_app.exe
This causes console.log() output to be visible in the command prompt, which allowed me to finally see the exception that was occurring.
One way to debug such issues is to open a terminal or cmd and drag the exe to it or launch the exe from the terminal or cmd. this will print any uncaught error the app might be throwing.
This can be an issue with paths if you're spawning sub processes - you can use https://github.com/jonluca/node-fix-path to fix the paths on linux and macos

Unable to run the Sencha Cordova project in Windows 8.1 Computer

I have downloaded the sample Sencha project from Lee in her blog (Lee's Sample Project).
I have installed all the necessary software like Sencha Cmd version 5.0.1.231 , Ruby, Compass, sass, Java, Node.js,Sencha Touch, Cordova in my windows 8.1 machine before proceeding to work.
I have followed the steps from this answer (Answer Link)
When I run the following Sencha Command inside the Sencha Project which I downloaded.
sencha app build package
It says the project builds on older version of Sencha, Please Upgrade to new Sencha Cmd Version.
so I have run the following Command.
sencha app upgrade
After that ,I repeated the step 1, i.e, I run the same command
sencha app build package
I have created a new folder namely LeeCode inside my tomcat webapps directory.
Now I have copied all the files inside my sencha project and pasted it inside LeeCode folder.
After doing the above step ,I have opened Chorme Browser and type http://localhost:8080/LeeCode
I was able to see that the project is working fine in Chrome browser.
Now I have created new Cordova project by issuing the following command in command prompt.
cordova create LeeCodeCordova
Then I have added the platform by using the following command,
cordova platform add windows
Then I have removed all content of www folder in my cordova project.
Now I have copied the Sencha files from LeeCode folder (which is inside my Tomcat webapps directory).
Then I have run the following command
Cordova build windows
Then I have run the following command
Cordova run windows -- --win
I was able only to see the first screen after that it hangs , I was not able to see the next screen in Cordova, but if run the same project as mentioned in chrome , I was able to all the screens in the project.

Grunt, Cordova & Windows Phone

I am developing an app for multiple platforms using Cordova. Grunt is used as a build tool. I use it to copy my source code to the right folder for each platform so I can develop them independently.
This works fine with Android using the scripts that are provided by Cordova. However, I have no idea if or how it is possible to automate the WP build process. I'm looking for two things:
Add all files in the www directory to the VS project (it does not include files that are not added to the project, which is sad).
Build, install and run the app in the emulator. I used adb & Grunt's exec for Android which was really simple, is there something similar for WP?
If you look in a cordova windows phone project there is a directory called 'cordova' which contains scripts to do all of this.
There should be scripts to build and run your project.
The run script can pretty much do it all. You can call it like :
run --device --release
or
run --emulator --debug
or just
run
A recent commit now makes it possible to use www\** in the .csproj file, which solved my first issue.

Resources