Error: This application failed to start because no Qt platform plugin could be initialized (Ubuntu 18.04, Gitlab) - android-emulator

I try start android emulator on Ubuntu 18.04 in Gitlab CI but get error. Please, help.
Gitlab output:
$ emulator -avd Android28 -no-snapshot-save &
$ export APK_PATH=$CI_PROJECT_DIR/.../app-dev-debug.apk
$ mvn clean test
bash: строка 110: emulator: command not found
bash: строка 114: mvn: command not found
ERROR: Job failed: exit status 1
cmd output for gitlab-runner:
gitlab-runner#shafaci:/home/shafaci$ emulator -avd Android28
No protocol specified
No protocol specified
No protocol specified
emulator: INFO: QtLogger.cpp:68: Warning: could not connect to display :0 ((null):0, (null))
emulator: INFO: QtLogger.cpp:68: Info: Could not load the Qt platform plugin "xcb" in "/opt/platforms/emulator/lib64/qt/plugins" even though it was found. ((null):0, (null))
Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb.
((null):0, (null))
emulator: INFO: QtLogger.cpp:68: Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb.
((null):0, (null))

Related

Can't sync android emulator with flutter project

Could Not Find C:\Users\Mohammed\AppData\Local\Android\sdk\platform-tools\AdbWinApi.dll.dat
The directory name is invalid.
W/FlutterActivityAndFragmentDelegate( 9139): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
Error waiting for a debug connection: ProcessException: adb returned error:
The directory name is invalid.
Could Not Find C:\Users\Mohammed\AppData\Local\Android\sdk\platform-tools\AdbWinApi.dll.dat
Command: C:\Users\Mohammed\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 forward tcp:0 tcp:42601
Error launching application on Android SDK built for x86.
Exited (sigterm)
I solved this issue by the following 3 steps:
1 remove the sdk and emulator.
2 install again the sdk and emulator.
3 restart my computer
and then then solved it

Check failed: gl_version_string. The GL proc resolver's glGetString(GL_VERSION) with flutter

I ran flutter run -d linux and here is the error
Launching lib/main.dart on Linux in debug mode... Building Linux application... [FATAL:flutter/shell/gpu/gpu_surface_gl_delegate.cc(50)] Check failed: gl_version_string. The GL proc resolver's glGetString(GL_VERSION) failed Error waiting for a debug connection: The log reader stopped unexpectedly. Error launching application on Linux.
You have To change your Nvidia proprietary drivers To open source drivers if You don’t understant the answer is explained here with on this repository : https://github.com/fermat28/flutter_shell_gpu_surface_gl_delegate.cc_error_fix

ADB will not install APK file on Android Emulator. Just says: "Performing Streamed Install"

ADB will not install my 32-bit APK file on an emulator. But it is not showing any error message when trying to install it:
In Android Studio 4.2.2 (on my Ubuntu 20.04.2 LTS laptop) I installed an emulator: Pixel_2_API_27_Android_8.1_x86_
I then open a Terminal window and do this:
:~$ /home/henrik/Android/Sdk/platform-tools/adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully
:~$ which adb
:~$ /home/henrik/Android/Sdk/platform-tools/adb devices -l
List of devices attached
:~$ emulator #Pixel_2_API_27_Android_8.1_x86_
emulator: Android emulator version 30.7.4.0 (build_id 7453540) (CL:N/A)
handleCpuAcceleration: feature check for hvf
cannot add library /home/henrik/Android/Sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed
added library /home/henrik/Android/Sdk/emulator/lib64/vulkan/libvulkan.so
cannot add library /home/henrik/Android/Sdk/emulator/lib64/vulkan/libvulkan.so.1: full
emulator: INFO: GrpcServices.cpp:315: Started GRPC server at 127.0.0.1:8554, security: Local
emulator: INFO: EmulatorAdvertisement.cpp:93: Advertising in: /run/user/1000/avd/running/pid_68812.ini
qemu-system-i386: warning: TSC frequency mismatch between VM (2711993 kHz) and host (2711986 kHz), and TSC scaling unavailable
In a new Terminal tab I do this:
:~$ /home/henrik/Android/Sdk/platform-tools/adb devices -l
List of devices attached
emulator-5554 device product:sdk_gphone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:1
:~$ /home/henrik/Android/Sdk/platform-tools/adb -s emulator-5554 install /mnt/4AF15A0435E762B4/mypython/storage/bin/storage-0.1-armeabi-v7a-debug.apk
Performing Streamed Install
But then, nothing happens. (I waited a very long time.)
If I copy the APK file to my physical MOTO G5 Android 8.1.0 phone and install it, at least I get en error message showing that it DID install.

Appcelerator can start Genymotion emulator, but can't install package: "device not found"

On Win10, I have the following installed:
Appcelerator Studio
Appcelerator CLI
Android SDK (ADB enabled)
Genymotion (free / private license)
I'm using regular Windows Command Prompt to interact with Appcelerator, trying to run a project via a Genymotion emulator (it's the Appcelerator RSS Reader demo project). I've gotten it to the point where appc run --platform android will spin up Genymotion and start the appropriate emulator (the only device available according to the Android SDK Virtual Device Manager).
However, as soon as the emulator is ready, Appc tries to install the apk, and fails with this message:
[INFO] Making sure the adb server is running
[INFO] Installing apk: C:\Users\USERNAME\Documents\Appcelerator_Studio_Workspace\Rss Reader\build\android\bin\RSS Reader.apk
[ERROR] Failed to install apk on "192.168.128.101:5555"
[ERROR] Error: device not found
If Appc can find the appropriate emulator to start it up, why does installation fail with "device not found"?
If I immediately open a new console and check the adb connections, I see the specified device as connected:
>C:\Users\USERNAME\AppData\Local\Android\sdk\platform-tools>adb devices<br />
List of devices attached
192.168.128.101:5555 device
I have tried the following to troubleshoot:
Made sure SDK and ADB paths were correct
Made sure Genymotion paths were correct
Made sure the emulator has the correct API (25) and OS version (7.1.0)
Just a note, when I try to run appc run --platform android without the emulator / Genymotion started, it will spin up the emulator perfectly but never recognizes it being "ready", and fails with the following:
[INFO] Waiting for emulator to become ready...
[ERROR] Emulator failed to start in a timely manner
The current timeout is set to 120000 ms
If the emulator is already started, it completes as described in the top, with the "device not found" error.
Appc info (generated by Appc CLI on "run"):
Operating System
Name = Microsoft Windows 10 Enterprise
Version = 10.0.14393
Architecture = 64bit
# CPUs = 4
Memory = 17037770752
Node.js
Node.js Version = 6.11.3
npm Version = 3.10.10
Titanium CLI
CLI Version = 5.0.14
Titanium SDK
SDK Version = 6.2.2.GA
SDK Path = C:\ProgramData\Titanium\mobilesdk\win32\6.2.2.GA
Target Platform = android
Try use this:
appc run -p android -C "(name of genymotion virtual device)"

Can't use plugins for Cordova

Everytime I want to use a plugin I can't build a project and get this error:
$ cordova emulate ios
Generating config.xml from defaults for platform "ios"
Preparing ios project
Running on emulator for platform "ios" via command "/Users/jakob/Dropbox/Coding/+diplomarbeit/phonegap/rlb_cordova/platforms/ios/cordova/run" --emulator
/Users/jakob/lib/node_modules/cordova/node_modules/q/q.js:126
throw e;
^
Error: An error occurred while emulating/deploying the ios project. ** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
2013-12-31 15:54:27.469 xcodebuild[10583:641b] DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-3575/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:78
Details: Failed to load dependencies output contents from ``/Users/jakob/Dropbox/Coding/+diplomarbeit/phonegap/rlb_cordova/platforms/ios/build/rlb_cordova.build/Debug-iphonesimulator/rlb_cordova.build/Objects-normal/i386/CDVDevice.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “CDVDevice.d” couldn’t be opened because there is no such file." UserInfo=0x7ff3ba0424e0 {NSFilePath=/Users/jakob/Dropbox/Coding/+diplomarbeit/phonegap/rlb_cordova/platforms/ios/build/rlb_cordova.build/Debug-iphonesimulator/rlb_cordova.build/Objects-normal/i386/CDVDevice.d, NSUnderlyingError=0x7ff3ba042590 "The operation couldn’t be completed. No such file or directory"}. User info: {
NSFilePath = "/Users/jakob/Dropbox/Coding/+diplomarbeit/phonegap/rlb_cordova/platforms/ios/build/rlb_cordova.build/Debug-iphonesimulator/rlb_cordova.build/Objects-normal/i386/CDVDevice.d";
NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\"";
}.
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, F) [F = <lambda at /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-3575/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:168:73>]
Thread: <NSThread: 0x7ff3ba041890>{name = (null), num = 9}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
** BUILD FAILED **
The following build commands failed:
CompileC build/rlb_cordova.build/Debug-iphonesimulator/rlb_cordova.build/Objects-normal/i386/CDVDevice.o rlb_cordova/Plugins/org.apache.cordova.device/CDVDevice.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
at ChildProcess.<anonymous> (/Users/jakob/lib/node_modules/cordova/src/emulate.js:67:22)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
I only used the CLI and didn't mess with any config. Here I tried to install the device plugin like:
$ cordova plugin add org.apache.cordova.device
Fetching plugin from "org.apache.cordova.device"...
Starting installation of "org.apache.cordova.device" for android
Preparing android project
org.apache.cordova.device installed on android.
Starting installation of "org.apache.cordova.device" for ios
Preparing ios project
org.apache.cordova.device installed on ios.
Looks not too bad but however I can't build the project. Just when I remove the plugin with:
$ cordova plugin remove org.apache.cordova.device
Anyone else having this issues?
My Versions:
$ npm --version
1.3.14
$ node --version
v0.10.22
$ cordova --version
3.3.1-0.1.2
$ git --version
git version 1.8.3.4 (Apple Git-47)
I had the same problem, and I solved It creating the project with uppercase in the first letter of project name. Yes, it seems incredible, but this was the solution.