I´m getting this error while trying to compile a Flashdevelop AIR project:
Native Context not available. The Config class is only available in Adobe AIR.
My setup:
Using Starling.
Using the ANE file from https://github.com/logotype/LeapMotionAS3
Using Flex SDK 4.6.0/AIR 3.8 in Flashdevelop 4.4.4 RTM
Extended Desktop profile is on.
The error fires up when I try to use the controller.config() or screen.* as in:
if(leap.config().setFloat("Gesture.Swipe.MinLength", 200.0) && leap.config().setFloat("Gesture.Swipe.MinVelocity", 500)) leap.config().save();
My onConnect();
private function alConectar(event:LeapEvent):void{
trace("conectado");
leap.enableGesture(Gesture.TYPE_SWIPE);
leap.enableGesture(Gesture.TYPE_SCREEN_TAP);
if(leap.config().setFloat("Gesture.Swipe.MinLength", 200.0) && leap.config().setFloat("Gesture.Swipe.MinVelocity", 500)) leap.config().save();
if(leap.config().setFloat("Gesture.ScreenTap.MinForwardVelocity", 30.0) && leap.config().setFloat("Gesture.ScreenTap.HistorySeconds", .5) && leap.config().setFloat("Gesture.ScreenTap.MinDistance", 1.0)) leap.config().save();
//etc...
}
The full output:
Running process: C:\Program Files\FlashDevelop\Tools\fdbuild\fdbuild.exe "C:\Users\CASA\Documents\00_INTERACTIVE\LEAP\Leap_AirAS3Proj\Leap_AirAS3Proj.as3proj" -ipc 8b4c615f-60f6-46ac-aec0-093781073835 -version "3.8.0" -compiler "C:\Program Files\FlashDevelop\Tools\ascsdk" -library "C:\Program Files\FlashDevelop\Library"
Building Leap_AirAS3Proj
mxmlc-cli -load-config="C:\Program Files\FlashDevelop\Tools\ascsdk/frameworks/air-config.xml" -load-config+=obj\Leap_AirAS3ProjConfig.xml -debug=true -inline=true +configname=air -swf-version=21 -o obj\Leap_AirAS3Proj635190875306772137
Running java as: java.exe
Loading configuration: C:\Program Files\FlashDevelop\Tools\ascsdk\frameworks\air-config.xml
Loading configuration: C:\Users\CASA\Documents\00_INTERACTIVE\LEAP\Leap_AirAS3Proj\obj\Leap_AirAS3ProjConfig.xml
206311 bytes written to C:\Users\CASA\Documents\00_INTERACTIVE\LEAP\Leap_AirAS3Proj\obj\Leap_AirAS3Proj635190875306772137 in 6.156 seconds
Build succeeded
Done(0)
[Starting debug session with FDB]
[Starling] Initialization complete.
[Starling] Display Driver: DirectX9 (Baseline Constrained)
init
conectado
[Fault] exception, information=Error: Native Context not available. The Config class is only available in Adobe AIR.
Already change the bat/SetupSDK to: set FLEX_SDK=C:\Program Files\FlashDevelop\Tools\ascsdk to reflect the SDK (Thanks to Philippe from Flashdevelop).
Any help is welcome.
Regards!
Related
I have just started learn opencv and i encountered a problem about playing video. I use qt-creator for opencv and my os is fedora 28.
My code:
cv::VideoCapture vCap;
vCap.open("/home/enes/sample.mp4");
if(vCap.isOpened()){
cv::Mat frame;
cv::namedWindow("Video");
for(;;){
if(!vCap.read(frame)) break;
cv::imshow("Video", frame);
}
}
My problem is below.
Failed to query video capabilities: Inappropriate ioctl for device
libv4l2: error getting capabilities: Inappropriate ioctl for device
VIDEOIO ERROR: V4L: device /home/enes/sample.mp4: Unable to query number of channels
OpenCV(3.4.1) Error: Unspecified error (GStreamer: your gstreamer installation is missing a required plugin
) in handlemessage, file /builddir/build/BUILD/opencv-3.4.1/modules/videoio/src/cap_gstreamer.cpp, line 1869
VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised OpenCV exception:
OpenCV(3.4.1) /builddir/build/BUILD/opencv-3.4.1/modules/videoio/src/cap_gstreamer.cpp:1869: error: (-2) GStreamer: your gstreamer installation is missing a required plugin
in function handlemessage
CvCapture_OpenNI::CvCapture_OpenNI : Failed to open input file (/home/enes/sample.mp4): Bad file extension
What should I do to solve this problem? Thanks.
I managed to play MP4 video with OpenCV on Fedora 28 by building the opencv module from source, as described here: Install OpenCV-Python in Fedora.
I also installed most of the gstreamer-plugins-* packages and uninstalled the managed OpenCV packages before compiling Open CV.
(first-post)
i am having a problem with NativeProcess.isSupported.
its a simple app make in abobe flash publish in air 3.8 .exe. everything works great :)
< supportedProfiles> desktop extendedDesktop tv extendedTV < /supportedProfilessetup.>
NativeApplication.nativeApplication.startAtLogin = true //after install, app start auto with win
NativeProcess.isSupported
var file: File = File.applicationDirectory.resolvePath("PC_shutdown.exe") //after timer the pc shutdown
install the setup.exe file run in windows 8, thats work 100% of the time. (manual start)
as in code the app start with windows login (its work) but NativeProcess.isSupported is then false so shutdown.exe will not executed. but when i manual start the app NativeProcess.isSupported is true and .exe is executed.
first run is false > close app > restart then it's true??? i have no idea/logic.
thx
NativeProcess support only works when you package your AIR application as a bundle (i.e. you create a self contained application with a copy of Adobe Air). This is done by specifying the "-target bundle" flag OR "-target native" flag when running adt.
More info on adt bundle/native installer flags
I'm using Flash Develop 4.6.2.5, and I cannot compile my app with AIR versions above 3.9.
I've tried with 4.0, 13.0 and 14.0
Packaging: dist\app.apk
project\application.xml: error 102:
Invalid namespace http://ns.adobe.com/air/application/14.0 APK setup creation
FAILED.
Here is all the procedures I've already did:
After some struggle here is the solution:
Switch the order of the PATH at SetupSDK.bat (line ~35):
Original:
:succeed
set PATH=%PATH%;%FLEX_SDK%\bin
Modified:
:succeed
set PATH=%FLEX_SDK%\bin;%PATH%
The problem should be related with something that I've installed in my system %PATH% which is having conflicts with something from %FLEX_SDK%, by switching the order you are forcing the packager to give preference to Flex SDK.
I am making a ActionScript library which is a Flex 4 project for my Adobe AIR Native Extension in FlashDevelop. When I build the project its successful, but when I try to build the project with ExportSWC plugin to get .swc file I get the following message:
Prebuilding config C:\Users\Osama Mohammed\Documents\AndroidSIPManager\obj\AndroidSIPManager.flex.compc.xml...
Configuration writen to: C:\Users\Osama Mohammed\Documents\AndroidSIPManager\obj\AndroidSIPManager.flex.compc.xml
Running Process:
"C:\Program Files (x86)\FlashDevelop\Tools\flexsdk\bin\compc.exe" -load-config+="C:\Users\Osama Mohammed\Documents\AndroidSIPManager\obj\AndroidSIPManager.flex.compc.xml"
Error loading: C:\Program Files\Java\jdk1.7.0_25\jre\bin\server\jvm.dll
Building AsDoc
AsDoc temp output: C:\Users\Osama Mohammed\AppData\Local\Temp\7827039c-c329-4b6d-acb7-447146a5f4fe
Start AsDoc: C:\Program Files (x86)\FlashDevelop\Tools\flexsdk\bin\asdoc.exe
-lenient=true -keep-xml=true -skip-xsl=true -output "C:\Users\Osama Mohammed\AppData\Local\Temp\7827039c-c329-4b6d-acb7-447146a5f4fe" -source-path "c:\users\osama mohammed\documents\androidsipmanager\src" -doc-classes com.innovative.androidsipmanager.AndroidSIPManager com.innovative.androidsipmanager.Main -exclude-dependencies=true -target-player=10.1
Following is the error:
Error loading: C:\Program Files\Java\jdk1.7.0_25\jre\bin\server\jvm.dll
AsDoc complete (6)
Build failed (6).
Please help me in solving this error.
I had to remove Java 64 bit & install Java 32 bit. Now it is working.
Using MonoDroid 4.0.6 and MonoDevelop, any attempt to run in an emulator fails with this error listed below:
The minSdkVersion matches the emulator's SDK version. All AVDs were created by the MonoDroid isntaller.
Detecting package list location
Getting package list from device
Installing shared runtime package on device
1849 KB/s (25866362 bytes in 13.657s)
pkg: /data/local/tmp/Mono.Android.DebugRuntime-debug.apk
Success
Installing the platform framework
1565 KB/s (16530851 bytes in 10.310s)
pkg: /data/local/tmp/Mono.Android.Platform.apk
Failure [INSTALL_FAILED_OLDER_SDK]
Failed to install the platform framework
I solved this in 2 ways.
1) In the manifest the minSdkVersion should match or be lower than the emulator
2) (what tripped me up) The Mono DLLs References of the project should be set to the Android version too.
Both are needed. I come from a Java Android background so never thought to change anything but the manifest.