Unable to do release build in Android Studio 2.3 - android-studio-2.3

I am getting the following error when i am trying to build my library module. This happened after I upgraded my studio to 2.3, before that it was working fine.
Error:Execution failed for task ':ABC:dexguardRelease'.
Cannot cast object 'AndroidDependency{artifactFile=/Users/.../Library/../extras/android/m2repository/com/android/support/design/25.1.0/design-25.1.0.aar, coordinates=com.android.support:design:25.1.0#aar, projectPath=null, extractedFolder=/Users/.../.android/build-cache/43e8b63934cde56d5e4203435db0b96a40055fac/output, variant=null, isSubModule=false, jarsRootFolder=/Users/.../.android/build-cache/43e8b63934cde56d5e4203435db0b96a40055fac/output/jars}' with class 'com.android.builder.dependency.level2.AndroidDependency' to class 'com.android.builder.model.AndroidLibrary'

I was able to solve this by upgrading to dexguard version 8. Note that gradle 3.1+ will not detect your license file in same folder as the dexguard jar

Related

Flutter giving errror in old sdk files although I have upgraded the sdk

I created project using flutter sdk version 1.7.8. After long time when I run the build it was giving me errors in sdk files. So I just downloaded new version of flutter sdk (2.2). I have changed environment path to latest sdk version, but when I run project it still giving me error related to older sdk version.
Here is the error
/C:/flutter_windows_v1.7.8+hotfix.4-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_slidable-0.4.9/lib/src/widgets/slidable.dart:786:46: Error: Method not found: 'TypeMatcher'.
return context.ancestorStateOfType(const TypeMatcher());
This is my environment variable
Why it is giving error related to version 1.78, although I have provided version 2.2 in my environment variable.
I think the one of the plugins that you are using is deprecated when you upgrade flutter you mostly need to upgrade the plugins as well.
and you need to change your pubspec.yaml file also and change the dart version .
so run flutter clean first.
change dart version. then try to run if it doesnt work still you need to upgrade plugins and remove the deprecated plugin.
OR
You might have the old Path in your IDE (Android Studio, VS CODE ) ETC.

Why I can't create new grails application in Netbeans 8.2?

OS: Windows 10
JDK: jdk1.8.0_65
IDE: Netbeans 8.2
Steps I had taken:
1. I had installed Netbeans, selecting the ALL column, meaning it can support Groovy or the grails application.
2. I also had installed the latest version of Grails which is the grails-3.3.5.
3. After installing everything, I opened Netbeans.
STEPS I HAD TAKEN IN NETBEANS
File > New Project > Groovy > Grails Application > then I clicked next.
After that I had clicked the Configure Grails... button. Then I copy pasted the file path of my grails home directory (in my case that is C:\Program Files\NetBeans 8.2\grails-3.3.5) under the textbox of Grails Home then clicked on OK.
The problem here is that I cannot create a new project. It kept on displaying this message box: "Unexpected error occured while creating the application. See output window for more details."
And there it shows the error: "Specifiy an application name or use --inplace to create an application in the current directory"
What should I do? Please help me. I need this for my job application's exam. Thank you so much.
I get exactly the same error as you when creating a Grails 3.3.5 project in NetBeans 8.2 on Windows 10. This is because of a longstanding bug in NetBeans: Bug 258407 - Error when creating a Grails 3.1.x project, which also impacts more recent releases of Grails.
Although that bug has Status: VERIFIED FIXED, unfortunately the fix was not applied to release 8.2 itself ("...this bug is fixed in development builds not 8.2"). You have two possible workarounds:
Install a DEV build of NetBeans 8.x which contains the fix.
Install the beta release of NetBeans 9.0 which contains the fix.
Option 1: Using a DEV release of NetBeans
Download the most recent nightly Dev build of NetBeans 8.2.
Activate Groovy and locate Grails 3.3.5 in the same way as you did on NetBeans 8.2.
You can then successfully create your Grails application using the Groovy > Grails Application project wizard, and run it:
Option 2: Using a beta release of NetBeans 9.
Download and unzip NetBeans 9 beta from the Apache NetBeans 9.0 Beta web site.
Start NetBeans 9 beta and install the Groovy/Grails plugin:
Locate Grails 3.3.5 in the same way as you did on NetBeans 8.2 (Tools > Options > Miscellaneous > Groovy > Grails Home).
You can then successfully create your Grails application using the Groovy > Grails Application project wizard, and run it:

Eclipse: An internal error occurred during: “Update Hierarchy”

While trying to run the Google cloud dataflow Wordcount example in eclipse referenced here https://cloud.google.com/dataflow/docs/quickstarts/quickstart-java-eclipse
I am getting the following error:
An internal error occurred during: "Update Hierarchy".
Tried to create a TypeHierarchyPipelineOptionsHierarchy for a Java Project 'my project name' where no PipelineOptions type exists
This issue was also faced by somebody else as per the following stackoverflow link:
Eclipse: An internal error occurred during: "Update Hierarchy"
I tried the solution above, the project compiles but it does not run even after Force Update of Snapshots/Releases as explained above.
Based on my research of the problem it looks like google-cloud-dataflow-java-sdk-all-2.0.0-beta1.jar does not have the PipelineRunner class, which is causing the error. The 1.9.0 version of the same jar had those classes.
I cannot use 1.9.0 version of the jar directly because it causes other compilation errors e.g. package change to 'org.apache.beam' instead of 'com.google.cloud.dataflow'
Indeed, there's an issue in the older versions of the Google Cloud Dataflow plugin for Eclipse -- older versions are not forward-compatible with Dataflow SDKs 2.x series, but the project generation may still automatically create a project using the newest 2.x SDK.
To solve the problem, please upgrade to the newest version of the plugin.
Projects generated with versions 1.1.2 of the Dataflow Plugin for Eclipse and earlier will generate projects using the most recent archetype. With the release of Dataflow 2.0.0-beta1, the generated project will use the Apache Beam SDK as an underlying dependency. Modifying the project version to 1.9.0 or earlier will not modify the generated code, which causes the compilation failures you're experiencing.
Version 1.1.3 of the plugin will ensure that any generated project remains within the Dataflow namespace. Future versions will also work forwards-compatibly with Apache Beam. Version 1.1.3 should be available - in Eclipse, go to Help -> Check for Updates (possibly running Perform Setup Tasks to clear the cached current version) should make the updated plugin available.
We have published version 1.1.3 of the Dataflow Plugin for Eclipse; the quickstart example should now function. The project you've generated will not work until a future release of the Dataflow Plugin for Eclipse. Updating the plugin and re-running the quickstart should succeed.

Grails GGTS "Task 'assemble' not found in root project" error when running "grails war" in Command Prompt

I have been learning Groovy/Grails Tool Suite (GGTS) 3.6.4, with Grails 2.4.4 using some video tutorials. When I attempt to package the project into an application using the grails war command on the Windows command prompt, I get the following error:
"Error Gradle build terminated with error: Task 'assemble' not found in root project ..."
Any references to this error that I have found online have only involved Android Studio (for instance), so I am at a loss here as to how to fix it for GGTS.
I have Android Studio 1.0.1 installed, and in case it was affecting the Grails packaging, I tried the solution of removing the <component name="FacetManager"> from the general Android Studio "MyApplication.iml" file, but that had no effect. I couldn't find any analogous file for the GGTS.
In case the issue lies elsewhere in my overall installation, I have Java JRE 7_79 (64-bit) installed, as well as the the JDK 1.7.0_79 (64-bit)
OK. I found out what the cause of the error was, and how to avoid it in the future.
The Problem
Grails 3.0.1 requires the following files for grails war to work:
build.gradle
gradle.properties
gradlew
gradlew.bat
\gradle (directory)
Grails 2.4.4 does not require any of the above files for making a WAR file.
GGTS 3.6.4 does not work with Grails 3.0.1, but it comes with and works fine with Grails 2.4.4.
The Solution
Copying the stated Gradle files & directory to a GGTS project folder fixed the problem. However, I wasn't satisfied with needing to do this manually or with a custom batch file for every project.
Looking deeper, it turns out that when working out compatibility issues between the Java 32-bit JRE existing on my system and the Java 64-bit JRE & SDK, Grails, and GGTS versions (there was a lot of fiddling to get things working), at one point I had set up my global variable to Grails to be directed at 3.0.1, and I failed to update it to Grails 2.4.4. Making this change has fixed the issue.
Explaining the Cause
When following this video series on installing a compatible set of Java, Grails, and GGTS, the instructor manually downloaded the latest version of Grails from the Grails site and then downloaded GGTS separately from its own site. Both of these were older versions than what I was working with.
In my case it turns out that, after setting up the Java SDK & Grails, the latest version of GGTS (3.6.4) did not work properly with the latest version of Grails (3.0.1). Fortunately the GGTS bundle came with an older version of Grails (2.4.4), and by referencing that, GGTS would work correctly. However, although I changed the IDE reference to Grails, I forgot to reset my environment variable ...
So GGTS was setting up the project for using Grails 2.4.4. However, when calling grails war, the command was using Grails 3.0.1! Apparently these two versions of Grails use different files for creating a WAR file, so GGTS was not setting up the project directories with the correct local files, and the packaging was failing.
Avoiding Future Occurrences
So, when using GGTS 3.6.4, make sure that all references to Grails point to Grails 2.4.4.
In general, if any GGTS bundle contains a version of Grails, you should have everything set up to use that version, even if it is old.

IBM Worklight 6.1.0 - Unable to deploy Worklight adapters using ANT tasks

I've just updated my Worklight Studio from 6.0.0.1 to 6.1.0 and with the update I've gone ahead and updated the worklight-build-tools.jar on my path. It's worth mentioning that my team has already updated the project we're working on to 6.1.0.
Following the update, I ran the ANT tasks to build and deploy all project artifacts.
The result, I wasn't able to deploy the adapters to the local development server.
I unzipped the worklight-build-tools.jar and poked around for a while and found the adapter-deployer task has been moved to a different location within the jar. I added the new taskdef to my build.xml and got the error below.
Can someone shed some light on this? The class doesn't seem to exist in the jar at all.
Here is the error from the ant:
Buildfile: /Users/mario/Documents/workspace/workspace-myproject/MyWorklightProject/build.xml
BUILD FAILED
/Users/mario/Documents/workspace/workspace-myproject/MyWorklightProject/build.xml:35: taskdef class com.ibm.worklight.config.ant.appserver.UpdateAppServerTask cannot be found
using the classloader AntClassLoader[/Users/mario/Documents/workspace/workspace-myproject/MyWorklightProject/worklight-build-tools.jar]
You can find worklight-ant-builder.jar and worklight-ant-deployer.jar after installing Worklight Server 6.1, and looking in the WL_INSTALL_DIR/WorklightServer/ folder.
worklight-ant-builder.jar is for these tasks:
http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.deploy.doc%2Fdevref%2Fr_ant_tasks_deploy_projects.html
http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.deploy.doc%2Fdevref%2Fr_ant_tasks_buld_deploy_apps.html
worklight-ant-deployer.jar is for these tasks:
http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.deploy.doc%2Fdevref%2Fr_ant_tasks_buld_deploy_adapters.html
http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.deploy.doc%2Fdevref%2Fr_ant_tasks_for_deploying_and_configuring.html

Resources