This is a migrated thread and some comments may be shown as answers.

custom plugin build error Visual studio

3 Answers 127 Views
Apache Cordova
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Felix De Lille
Top achievements
Rank 1
Felix De Lille asked on 27 Nov 2015, 10:07 AM

Hi,

 

When i deploy to apk package, i always get this.

I don't understand, it's almost the same as other plugin. The IOS part works.

Main error looks to be this:

VideoEditing.java:1: error: ';' expected

 the java code:

package cordova-plugin-video-editing;

public class VideoEditing extends CordovaPlugin {

    //@Override
    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
        return false;
    }

}

the js code:

exports.editVideo = function (source, audiosource, speed, mute, success, error) {
    cordova.exec(success, failure,
             "VideoEditing",
             "editVideo",
             [source, target]);
};

 

The complete error:

     Project files uploaded to the cloud.
        Sending build request for project CatWalk with parameters ProjectTypeGuids={070BCB52-5A75-4F8C-A973-144AF0EAFCC9}
Platform=Android
Configuration=Debug
LiveSyncToken=827wFX26gPe/WC+Hg/AAQXKNQ8DxLwqvtpwdKzTnS9huX3hyDLkZv0qiThh/vXb6FWJGzFrVoe5AadqDusEg3K/ezjUmJRrN/xkaDeK13RoDzNxgFuMCLK/Z+qK8FvlS.
C:\Users\Felix\AppData\Local\Microsoft\VisualStudio\14.0\Extensions\5rjs3myu.ycp\Targets\Build.targets(189,3): error : Server build failed. Server output: Project "CatWalk.tmp.proj" (default targets):
    Warning: Cannot include the following item(s) in your application: jspm_packages\.dependencies.json;jspm_packages\.loaderversions;Plugins\cordova-plugin-apprate-master\.gitignore;Plugins\CordovaYoutubeVideoPlayer-master\.gitignore;Plugins\CordovaYoutubeVideoPlayer-master\platforms\android\.project;Plugins\CordovaYoutubeVideoPlayer-master\platforms\android\cordova\node_modules\.bin\shjs;Plugins\CordovaYoutubeVideoPlayer-master\platforms\android\cordova\node_modules\shelljs\.documentup.json;Plugins\CordovaYoutubeVideoPlayer-master\platforms\android\cordova\node_modules\shelljs\.jshintrc;Plugins\CordovaYoutubeVideoPlayer-master\platforms\android\cordova\node_modules\shelljs\.npmignore;Plugins\CordovaYoutubeVideoPlayer-master\platforms\android\cordova\node_modules\shelljs\.travis.yml;Plugins\CordovaYoutubeVideoPlayer-master\platforms\ios\.gitignore;Plugins\CordovaYoutubeVideoPlayer-master\platforms\ios\YoutubeVideoPlayerProject\.gitignore;Plugins\CordovaYoutubeVideoPlayer-master\plugins\com.bunkerpalace.cordova.YoutubeVideoPlayer\.fetch.json;Plugins\CordovaYoutubeVideoPlayer-master\plugins\org.apache.cordova.console\.fetch.json. The build system treats items with a leading dot as hidden files or directories and does not process them. Rename the affected items in your project and try again.
    android Build Tooling revision 2015.11.25.2r
    Warning: Note: Some input files use or override a deprecated API.
    Warning: Note: Recompile with -Xlint:deprecation for details.
    Warning: Note: /home/builder/BpcTooling/Cordova3/Plugins/com.telerik.LiveSync/src/android/LiveSync-Lib/LiveSync-Lib/src/com/telerik/LiveSync/CloudSync.java uses or overrides a deprecated API.
    Warning: Note: Recompile with -Xlint:deprecation for details.
    Warning: /tmp/builds/dp6neX8G9neVYErckf/app/src/cordova-plugin-video-editing/VideoEditing/VideoEditing.java:1: error: ';' expected
    Warning: package cordova-plugin-video-editing;
    Warning: ^
    Warning: 1 error
    Warning: FAILURE:
    Warning: Build failed with an exception.
    Warning: * What went wrong:
    Warning: Execution failed for task ':compileArmv7DebugJavaWithJavac'.
    Warning: >
    Warning: Compilation failed; see the compiler error output for details.
    Warning: * Try:
    Warning: Run with
    Warning: --stacktrace option to get the stack trace. Run with
    Warning: --info
    Warning: or
    Warning: --debug option to get more log output.
    Warning: /tmp/builds/dp6neX8G9neVYErckf/app/cordova/node_modules/q/q.js:126
    Warning: throw e;
    Warning: ^
Error code 1 for command: /tmp/builds/dp6neX8G9neVYErckf/app/gradlew with args: cdvBuildDebug,-b,/tmp/builds/dp6neX8G9neVYErckf/app/build.gradle,-Dorg.gradle.daemon=true,-PcdvBuildArch=armv7,-PcdvBuildMultipleApks=true
    Error: Build failed during execution
    Error: 'Build failed with error code 8'
Done building project "projectname.tmp.proj" -- FAILED.
.

Greetings

Felix

3 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 02 Dec 2015, 02:24 PM
Hi Felix,

The Android implementation of the plugin seems incomplete. For instance it is missing imports to:
  • org.apache.cordova.CordovaPlugin;
  • org.apache.cordova.CallbackContext;
  • org.json.JSONArray;
  • org.json.JSONException;
  • org.json.JSONObject;
However, adding only those doesn't resolve the issue and I will need more time to run the app in Android Studio and try to extract the underlying JAVA errors. Are you looking to create an implementation similar o the one of this plugin.

I will update this thread as soon as I have more information - hopefully later today. In the meantime, please let me know if you've managed to resolve the issue yourself.

Regards,
Tina Stancheva
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
Felix De Lille
Top achievements
Rank 1
answered on 02 Dec 2015, 10:40 PM

Hi,

i's ok, it works now. Thanks for trying to sort it out.

Indeed it was the imports. I started using android studio also to debug.
It was a bit hard to migrate to VS afterwards but adding gradle.build for my mp4parser dependency went very well. I'm glad this process is so easy now to add maven libs. I tried first with jar file but that's far more difficult. It wasn't finding the imports even after adding source-file in the config.xml.

That plugin you describe is too basic. We wanted to slow motion the video which isn't available there.  I also don't see how to mux audio and video.

I see the lib has ffmpeg for android which could have done the trick but ffmpeg would have added 23MB in size to the apk which isn't acceptable.

Just a note: I'm having problem with the telerik forums sometimes not being accessible ("page not found"). I tried on all browsers (sometimes not all) mostly happens when i'm at my work's internet. It's very strange. The appbuilder docs are always available, it's mostly the forums.

 

Thanks again

 

0
Tina Stancheva
Telerik team
answered on 04 Dec 2015, 11:36 AM
Hi Felix,

I am happy to see you were able to develop the plugin further. Let me know if you experience any issues with it moving forward.

As for the forums, I am not sure what might be the culprit behind that behavior. My best guess is that at times the connection is slower and the forums cannot fully load. We can try to investigate that report further, but we'll need a Fiddler capture of the request from your machine to our forums at the time of the failure. A screencast of what you're seeing might also help. Thank you in advance.

Regards,
Tina Stancheva
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
Apache Cordova
Asked by
Felix De Lille
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Felix De Lille
Top achievements
Rank 1
Share this question
or