Failed to apply plugin [id 'net.corda.plugins.cordformation'] - corda

I tried to migrate yo-cordapp from version 2.0 to 3.0 but gets this error.
FAILURE: Build failed with an exception.
Where:
Build file '/home/atul/Documents/mg/IdeaProjects/yo-cordapp/build.gradle' line: 36
What went wrong:
A problem occurred evaluating root project 'yo'.
Failed to apply plugin [id 'net.corda.plugins.cordformation']
Could not create plugin of type 'Cordformation'.
Could not initialize class net.corda.plugins.Cordformation
Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 0.513 secs
Stopped 0 worker daemon(s).
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Build file '/home/atul/Documents/mg/IdeaProjects/yo-cordapp/build.gradle' line: 36
A problem occurred evaluating root project 'yo'.] from daemon DaemonInfo{pid=1439, address=[1bb69a7c-e166-4da4-be23-025402c62d96 port:36544, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Idle, lastBusy=1527564107106, context=DefaultDaemonContext[uid=dbe9d9f3-b86b-448f-8d35-648c4aad50fd,javaHome=/usr/lib/jvm/java-8-oracle,daemonRegistryDir=/root/.gradle/daemon,pid=1439,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=IN,-Duser.language=en,-Duser.variant]} (build should be done).
why i am getting this error
[PS : i know this migration already bean done but i am getting this error when i tried.]

You need to apply the new cordapp plugin. See https://github.com/corda/cordapp-example/blob/release-V3/kotlin-source/build.gradle#L11.

Related

FAILURE: Build failed with an exception. * Where: Build file 'F:\Developed App\untitled1\android\build.gradle' line: 24

F:\Developed App\untitled1\android>gradlew signingReport
FAILURE: Build failed with an exception.
Where:
Build file 'F:\Developed App\untitled1\android\build.gradle' line: 24
What went wrong:
A problem occurred evaluating root project 'android'.
A problem occurred configuring project ':app'.
Could not open proj generic class cache for build file 'F:\Developed App\untitled1\android\app\build.gradle' (C:\Users\Raihan.gradle\caches\6.7\scripts\b8f
tacjwav9hf6p50aw09t36z).
> BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 60
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1s
F:\Developed App\untitled1\android>
Go to C:\Users\Raihan.gradle\caches\ and try to remove everything inside this caches folder.
Then remove untitled1/.gradle/caches/
If you're using an Android Studio, go to File -> Invalidate caches and restart
Hopefully, your problem will be solved

Ionic blank project's build failed after adding mfp-push plugin

create an blank ionic project and added mfp and mfp-push plugins. Tried to build and got this error:
BUILD FAILED in 41s
Error: cmd: Command failed with exit code 1 Error output:
C:\Users\saikmeda\TestFbSdk\platforms\android\app\src\main\java\com\ibm\mobilefirstplatform\clientsdk\cordovaplugins\push\CDVMFPPush.java:100: error: cannot access FirebaseInstanceIdService
MFPPush.getInstance().initialize(this.cordova.getActivity().getApplicationContext(), timeout);
^
class file for com.google.firebase.iid.FirebaseInstanceIdService not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
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.
Get more help at https://help.gradle.org
BUILD FAILED in 41s
The latest MFP 8.0 client side iFix for Android has been modified to work with FCM completely. The error message you see is coming because there are some changes needed in your Android project - specifically around removing GCM classes and modifying for FCM.
Follow the instructions in the link to get your project working:
http://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/notifications/handling-push-notifications/android/#migrate-to-fcm
Now, all this is required only if you use MFP's push feature. If you do not , you can remove cordova-plugin-mfp-push plugin from your project and rebuild it.

In Corda, Could not find method networkMap exception

I am following instructions on https://docs.corda.net/releases/release-V1.0/deploying-a-node.html to add a network map to the deployNodes task in
my build.gradle file. But when I run gradlew deployNodes, it gives the following error. I have tried with Cordform plugin versions 3.1.0 and 3.2.1 . Am I missing anything or any other setup that needs to be done?
FAILURE: Build failed with an exception.
* Where:
Build file '/home/ubuntu/corda/build.gradle' line: 103
* What went wrong:
A problem occurred evaluating root project 'corda'.
> Could not find method networkMap() for arguments on task ':deployNodes' of type net.corda.plugins.Cordform.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
Corda 3 removed the concept of a special network map node that serves the role of distributing the network map to the other nodes. Instead, the network map is now a collection of signed NodeInfo files distributed via HTTP. You can read more about this change here.
As a result, the networkMap option no longer exists in Cordform.

Getting an error when adding a 3rd-party jar file

Good day,
I have modified the cordapp-tutorial demo application by modifying the gradle file \cordapp-tutorial\java-source\build.gradle. More specifically, I am adding a jar file to compile a 3rd party library. I'm making the following change to the build.gradle script
but it causes the following error for the M14 milestone release:
:java-source:configureCordappFatJar FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':java-source:configureCordappFatJar'.
Cannot invoke method contains() on null object
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
I do not get this error when I am using milestone release M13
There was a bug in the 0.14.0 release of the Corda gradle plugins that caused this (a missing null check when checking with a dependency without a group).
The way to fix it would be to change the corda_gradle_plugins_version to 0.14.1.

JavaFX to Android - Execution failed for task ':deleteSrcAndLayout'

good day, I got an issue in creating an android project, Im currently using windows7 with JDK8u40 installed and Im using the latest dalvik sdk. But when I attempted to create an android project, an error was thrown:
* What went wrong:
Execution failed for task ':deleteSrcAndLayout'.
> Directory does not exist: C:\AndroidFX\CodeGenerator\src
Here's the complete error log:
C:\dalvik-sdk\samples\Ensemble8>./gradlew --info createProject -PDEBUG -PDIR=C:/
AndroidFX -PPACKAGE="hello" -PNAME="CodeGenerator" -PANDROID_SDK=C:/AndroidSDK/s
dk -PJFX_SDK=C:/dalvik-sdk -PJFX_APP=C:/Jar -PJFX_MAIN="hello.Hello"
Starting Build
Settings evaluated using empty settings script.
Projects loaded. Root project using build file 'C:\dalvik-sdk\samples\Ensemble8\
build.gradle'.
Included projects: [root project 'Ensemble8']
Evaluating root project 'Ensemble8' using build file 'C:\dalvik-sdk\samples\Ense
mble8\build.gradle'.
Starting file lock listener thread.
All projects evaluated.
Selected primary task 'createProject'
Tasks to be executed: [task ':conf', task ':androidCreateProject', task ':delete
SrcAndLayout', task ':writeAntProperties', task ':updateManifest', task ':update
StringsXml', task ':updateBuildXml', task ':createProject']
:conf (Thread[main,5,main]) started.
:conf
Executing task ':conf' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
====================================================
Android SDK: [C:/AndroidSDK/sdk]
Target: [android-21]
Project name: [CodeGenerator]
Package: [hello]
JavaFX application: [C:/Jar]
JavaFX sdk: [C:/dalvik-sdk]
JavaFX main.class: [hello.Hello]
Workdir: [C:/AndroidFX]
debug: [true]
===================================================
:conf (Thread[main,5,main]) completed. Took 0.078 secs.
:androidCreateProject (Thread[main,5,main]) started.
:androidCreateProject
Executing task ':androidCreateProject' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
Starting process 'command 'C:/AndroidSDK/sdk/tools/android.bat''. Working direct
ory: C:\AndroidFX Command: C:/AndroidSDK/sdk/tools/android.bat create project -n
CodeGenerator -p CodeGenerator -t android-21 -k hello -a Activity
An attempt to initialize for well behaving parent process finished.
Successfully started process 'command 'C:/AndroidSDK/sdk/tools/android.bat''
Error: Package name 'hello' contains invalid characters.
A package name must be constitued of two Java identifiers.
Each identifier allowed characters are: a-z A-Z 0-9 _
Proces
s 'command 'C:/AndroidSDK/sdk/tools/android.bat'' finished with exit value 0 (st
ate: SUCCEEDED)
:androidCreateProject (Thread[main,5,main]) completed. Took 1.375 secs.
:deleteSrcAndLayout (Thread[main,5,main]) started.
:deleteSrcAndLayout
Executing task ':deleteSrcAndLayout' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
:deleteSrcAndLayout FAILED
:deleteSrcAndLayout (Thread[main,5,main]) completed. Took 0.594 secs.
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\dalvik-sdk\samples\Ensemble8\build.gradle' line: 203
* What went wrong:
Execution failed for task ':deleteSrcAndLayout'.
> Directory does not exist: C:\AndroidFX\CodeGenerator\src
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to
get more log output.
BUILD FAILED
Total time: 6.531 secs
Please help me!! Im stuck!!!!
I also tried JDK7u75 but it didnt worked!!
I successfully created an android project by editing the createHelloWorld.bat under android-tools in the dalvik-sdk.

Resources