DexGuard integration in Android Studio 3.0 - android-studio-3.0

I have upgraded my Android project to use the latest Android Studio 3.0 features. Since then, I am getting the following warning message on each Gradle sync:
Warning:One of the plugins you are using supports Java 8 language
features. To try the support built into the Android plugin, remove the
following from your build.gradle:
apply plugin: 'dexguard' To learn more, go to https://d.android.com/r/tools/java-8-support-message.html
If I go to the linked URL, I can see:
If Android Studio detects that your project is using Jack,
Retrolambda, or DexGuard, the IDE uses Java 8 support provided by
those tools instead.
There are migration docs for Jack and Retrolambda, but none for DexGuard.
My questions are:
Can I remove the DexGuard plugin and it will still work as expected?
If no, how should I go around resolving this warning?
I am running Android Studio 3.0 and DexGuard 8.0.16

You are probably using Dexguard for code obfuscation, encryption or tamper detection. So removing it will remove those functionalities. You should try out the 8.0.17 release of dexguard and remove retrolamb, Jack and the Dexguard-java8 plugin from your build config.
On my app this seems to keep working, on 8.0.15/8.0.16 I still had to enable dexguard-java8 to have it working.
in your app build.gradle add this to enable java8 compiling.
apply plugin: 'dexguard'
...
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
In your project.gradle just add
buildscript {
repositories {
flatDir { dirs 'dexguard' }
...
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath ':dexguard:'
...
}
}
and make sure there are no references to retrolambda or dexguard-java8 in your gradle files and everything should work fine.

Related

android studio 3.2 preview gradle sync failed but build success

Build/Sync window showed the 'CONFIGURE SUCCESSFUL' and Build Successful.
But the android studio still show the error: "Gradle project sync failed. Basic functionality will not work properly"
Update at 2019/01/15
Update android studio to 3.3 fix this problem!
I face this too.
Not a solve, but you can try.
In your project gradle file
change gradle version from 3.2.0 to 3.1.4
com.android.tools.build:gradle:3.1.4
In gradle-wrapper.properties file
change gradle version from 4.6 to 4.4
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
My problem was there was no google() in my repo list under all projects:
allprojects {
repositories {
jcenter()
google()
}
}

Grails 3.0 support in NetBeans

I was running Grails 2.2.0 in NetBeans and it was working fine. I tried to upgrade the project to Grails 3.0 but after creating the project NetBeans is not able to open the project.
Does anyone know which plugins to install in NetBeans (if available) to make Grails 3.0 work?
Just wanted to let you know that I've added initial support for grails 3 in NetBeans.
https://netbeans.org/bugzilla/show_bug.cgi?id=254405
At the moment you can get these with the latest NetBeans nightly: http://bits.netbeans.org/download/trunk/nightly/latest/
This will allow NetBeans to recognise/create projects, and the create controller/domain/etc actions working.
One important thing still missing is adding support for the gradle build files (no syntax highlighting or helpers for the gradle files), but in the meantime you may try it and report problems/improvements.

Unable to add struts 2 support to netbeans 7.4

this plugin requires plugin Editor Library to be installed.
The plugin Editor Library is requested in version >= 2.10.1.10.2 (release version 2) but only 3.46.1.22.43 (of release version different from 2) was found.
The following plugin is affected:       Struts2 Support
Now i have resolved another plugin for Struts 2 support. This plugin is called Netbeans Struts2 Plug-in and its a re-pack for the plugin i was trying to install. Though this plugin in not certified but it is working good. The developers have tested it on netbeans 7.4 but i'm using it not netbeans8 and i have not suffered any issues.
I have found another way, that is using maven. That is also a good way but i would not recommend it if you have slow internet connection.

Doing an Ant Build on Android Studio

Does Android Studio support Ant builds?
I want to run a before-compilation Ant target.
Android Studio is new, so it seems possible it's not supported in favor of Gradle.
[EDIT]
So it seems that Studio isn't meant to fully support Ant builds (see comments)
It worked fine for me until now, but I suppose there are specific configuration were it won't work as well.
InteliJ IDEA 13 EAP has all Studio features and supports Ant.
I would also like to point out that Gradle also support pre-build tasks, so you might want to consider switching to Gradle.
For those who will go will make that choice, you can generate a Gradle buil from your Eclipse project (Note : I haven't tested it, but it should take you less than minutes to try it out and see if it works for your project).
[ORIGINAL REPLY]
Android Studio definitively supports Ant builds. I have been using it on my company's project and it works fine.
But you are right that it strongly recommend Gradle, making it the default compiler for all new project created with Android Studio (but you could actually switch back to Ant).
Finally, as JoeHz pointed out, Android Studio is based on the open source version of IntelliJ, so you can also go download this version (which is currently much more stable than Android Studio).
Android Studio is based on Intellij IDEA which certainly supports Ant. It can also read the Android Studio project file.
If you can deal with the two Android Studio features that currently aren't in the IDEA 13 EAP yet, you can download that and create an Ant Build.
http://blogs.jetbrains.com/idea/2013/05/intellij-idea-13-early-preview-is-out/

IntelliJ 11 - Grails SDK is not configured

I have recently upgraded my IntelliJ 10 to the latest 11.0.1 version. I am writing grails app and until I was using the older version of IntelliJ everything was fine, however 11 doesn't allow me to successfully add Grails SDK (2.0.0) - I was trying to add the framework support, this however doesn't seem to be persisted (after adding Groovy and then choosing Grails - nothing happens). I have tried to follow those steps as well: IntelliJ IDEA 9.0 - unable to select project SDK for Grails application
I would be grateful if someone would be able to point me how to configure Grails SDK - or what could be wrong in my configuration.
Thanks,
This is exactly the way that I have my global library defined and still I was having exactly the same issue.
I followed OverZealous advice and created a new Grails project named exactly the same as the original one and boom everything is fine now! Thanks for help.
You don't need both Groovy and Grails for Grails project, just use Grails SDK. When creating a new Grails project there is an option to add new SDK, select the home path of your Grails installation and it will be configured automatically as a Global Library and this library will be added as a dependency to your module.
Grails library configuration contains all the jars from GRAILS_HOME\dist and GRAILS_HOME\lib, plus all the jars from the src directory.
In other words, it's not configured as a framework, it's just a library with all the jars from Grails distribution added to the module dependencies.
Each time I restart IntelliJ, version 13.1.2, it loses the SDK configuration. If I right-click on the project and "Add Framework Support" I can choose the SDK that is already configured and it will begin functioning properly. When it loses this setting, it won't allow me to compile or launch the app with grails. I reject the ideas to recreate the project, (been there/done that) as I have many dependent modules I have to verify and I lose all my run configurations that I've setup manually.
I'm posting the "Add framework support" step here so it might help someone else; hopefully a more permanent solution for you, but its temporary in my situation

Resources