Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Alexander_F_
Beginner
310 Views

IntelXDK and Cordova JS files

Hi I am here again I have the following issue... when I inlcude in my index.html the files

<script src="intelxdk.js" type="text/javascript"></script>
<script type="text/javascript" src="cordova.js"></script>
 

The intelxdk commands works in emulator but when I build the APK the intelxdk commands doesn't work, then according older posts I removed these files from my index.html and now the intelxdk commands doesn't work in emulator and APK file, then what is the solution for this because I need to work with intelxdk commands in my application.

Thank You in advance.

 

Tags (2)
0 Kudos
19 Replies
Dale_S_Intel
Employee
310 Views

When you say "intelxdk commands" are you referring to the plugins?  If you create a new blank project, does that build and emulate for you?

Dale

Alexander_F_
Beginner
310 Views

Yes I am talking for example 

intel.xdk.device.uuid or intel.xdk.device.scanBarcode()

Yes I build a blank project and was the same issue

Alexander_F_
Beginner
310 Views

By the way I noticed now a warning in this plugin, can you tell me what does mean that?

http://cl.ly/0i0O221r0v20

 

PaulF_IntelCorp
Employee
310 Views

See > http://stackoverflow.com/a/8111799/2914328 < for a definition of the word deprecated.

Do not use those deprecated intel.xdk plugins, they are no longer supported or maintained. They will all be permanently retired at the next major release of the Intel XDK.

Please see this doc page > https://software.intel.com/en-us/xdk/docs/intel-xdk-api-cordova-plugin-methods-properties-events <

Alexander_F_
Beginner
310 Views

Lol.. I know what means the word deprecated the problem is that this application works fine the version I have in Apple Store and now I have to made a little modification and I found this problem, then I have to change all the plugins think that you must find a better solution and not deprecated all the intel.xdk plugins. 

PaulF_IntelCorp
Employee
310 Views

Follow the link to the doc page, from there you'll find links to the rewritten Cordova versions of those plugins in github repos, which can be added to your project as third-party git plugins. That's as close to the originals as you can get. Otherwise, you'll need to rewrite your app using a Cordova equivalent plugin. The Emulate tab still "supports" them, but that is going away in the next release of the XDK.

We retired those APIs because they were badly out of date, and there are many equivalent open source plugins available that are supported by the open-source community and provide much better and up-to-date functionality.

Alexander_F_
Beginner
310 Views

Okay Paul I did that but now when I go to build the APK I get this error....

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileReleaseJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 31.571 secs
ERROR building one of the platforms: Error: .../DoubleTap/platforms/android/gradlew: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: .../DoubleTap/platforms/android/gradlew: Command failed with exit code 1
    at ChildProcess.whenDone (.../DoubleTap/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:139:23)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:821:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
PaulF_IntelCorp
Employee
310 Views

The meat of that error is earlier in the log, what you gave me does not provide sufficient details.

Alexander_F_
Beginner
310 Views

log file attached

PaulF_IntelCorp
Employee
310 Views

According to the attached build log there is a problem with the Social Sharing plugin. Could be that you need to use CLI 5.4.1, but there is no way to say definitively what the reason is. Try removing it to see if the build succeeds, that will confirm that it is the source of the problem.

Alexander_F_
Beginner
310 Views

Yes I saw that and reinstalled the plugin and now works fine... let me ask you something... I try to integrate a ionic project into Intel XDK and I noticed that $ionicPlatform is not recognized and other ionic commands too... I try to find a similar command to solve the issue but if you have another idea could be appreciated.

Thank You!!!

PaulF_IntelCorp
Employee
310 Views

Sorry, but I'm not familiar with Ionic projects or the $ionicPlatform command, so I'm not able to help you out much with that question. What is the $ionicPlatform command supposed to do? Is this something you use on the command-line or something that is part of your app?

Alexander_F_
Beginner
310 Views

$ionicPlatform is similar to DeviceReady but do not worried... thank you by your help.

Have a great day Paul

Alexander_F_
Beginner
310 Views

Hey Paul today something weird happens.. I was programming and everything perfect and in the middle of the night around 12:20am here in Miami, FL... everything becomes slow and the emulator stopped only blank screen is shown... then I try to fire de deviceready event and receive this message

http://cl.ly/1v2r3m0K1H3x

and in my code is cordova.js already included.

http://cl.ly/250P1U1e0t1w

Please let me know if you turn off the server at some time or if you are under maintenance at this time every day

Thank You!

 

PaulF_IntelCorp
Employee
310 Views

Alexander -- the Emulate tab does not interact with any backend servers, but it does have problems. We are replacing that component with something much more reliable in an upcoming release. In the meantime, you may have to stop and restart the XDK from time to time.

Alexander_F_
Beginner
310 Views

I closed the Intel XDK and restarted again and the same problem... take a look to this video

http://cl.ly/1H1v0D232w0X

 

PaulF_IntelCorp
Employee
310 Views

I see a hooks directory in your project, not sure if it is empty or not, but that could be causing some issues if there is a hooks script in there. Or, possibly, one of the plugins is causing some strange init problem with the underlying cordova subsystem that is used by the Emulate tab...

Alexander_F_
Beginner
310 Views

Then what is the solution.. if you prefer I can send you the project in zip file

Thank You!

 

PaulF_IntelCorp
Employee
310 Views

If you have a plugin that includes hooks scripts it will not work with the XDK. If that directory contains hooks scripts it may be causing a problem. Are there scripts in that directory or is it empty?

Does the behavior change if you remove the plugins in the project? Keep a list of what you added, or make a copy of the project and remove plugins, one-by-one, from that copied project to see if it changes the behavior of the problem you are seeing.

Reply