android-gradle-plugin

How to set custom Java compiler args on an Android project?

那年仲夏 提交于 2020-12-27 06:12:30
问题 I'm putting the following at the end of my project gradle file: gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs += ['-Xep:MissingOverride:ERROR', '-Xep:MissingCasesInEnumSwitch:ERROR',] } } However, in my code if I remove an @Override annotation somewhere or remove a switch statement, my Android project still builds. Shouldn't it fail with an error? 回答1: I googled your problem and found this post that described your problem and the solution looks like this:

How to set custom Java compiler args on an Android project?

心已入冬 提交于 2020-12-27 06:11:12
问题 I'm putting the following at the end of my project gradle file: gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs += ['-Xep:MissingOverride:ERROR', '-Xep:MissingCasesInEnumSwitch:ERROR',] } } However, in my code if I remove an @Override annotation somewhere or remove a switch statement, my Android project still builds. Shouldn't it fail with an error? 回答1: I googled your problem and found this post that described your problem and the solution looks like this:

Plugin “Android Bundle Support” is incompatible

感情迁移 提交于 2020-12-13 03:10:36
问题 everyone, I have a very weird error when i launch android studio since last update. I have this error: Plugin Error: Plugin "Android Bundle Support" is incompatible (until build AI-195.SNAPSHOT < AI-201.8743.12). I can't find any info online about it. When i paste on google just like i did here. No results are found. Could you please tell how i could fix it ? Sorry about not giving anymore details but there is very few info online. Thank you so much in advance ;) 回答1: Android Support plugins

Gradle Error : More than one file was found with OS independent path 'META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version'

一曲冷凌霜 提交于 2020-12-12 11:19:11
问题 I needed android-image-cropper library for my android app and so i added it to the gradle dependency. After syncing, a number of errors were showing up. Here's one and the gradle won't fix: More than one file was found with OS independent path 'META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version' And my build.gradle from the app is: apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "asif.com.firebasedemo.activity"

Gradle threw an error while downloading artifacts from the network .. Exception: Gradle task assembleDebug failed with exit code 1

大城市里の小女人 提交于 2020-12-08 05:56:57
问题 I just started with app development with flutter, but am not even able to run the test app. This is what come on console : Launching lib/main.dart on AOSP on IA Emulator in debug mode... Running Gradle task 'assembleDebug'... Exception in thread "main" java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:225) at java.util.zip.ZipFile.(ZipFile.java:155) at java.util.zip.ZipFile.(ZipFile.java:169) at org.gradle

Gradle threw an error while downloading artifacts from the network .. Exception: Gradle task assembleDebug failed with exit code 1

浪尽此生 提交于 2020-12-08 05:56:10
问题 I just started with app development with flutter, but am not even able to run the test app. This is what come on console : Launching lib/main.dart on AOSP on IA Emulator in debug mode... Running Gradle task 'assembleDebug'... Exception in thread "main" java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:225) at java.util.zip.ZipFile.(ZipFile.java:155) at java.util.zip.ZipFile.(ZipFile.java:169) at org.gradle

Note: Recompile with -Xlint:deprecation for details

我是研究僧i 提交于 2020-12-06 13:14:00
问题 Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. I found many posts about this issue but none that says how to deal in android studio. Where i can set this system property in this IDE, for the project only? 回答1: I had the same question and found the answer elsewhere. This answer says that it can be configured in Android Studio's settings under Build Execution -> Compiler -> Java Compiler -> Additional command line parameters, but I

Note: Recompile with -Xlint:deprecation for details

不想你离开。 提交于 2020-12-06 13:09:29
问题 Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. I found many posts about this issue but none that says how to deal in android studio. Where i can set this system property in this IDE, for the project only? 回答1: I had the same question and found the answer elsewhere. This answer says that it can be configured in Android Studio's settings under Build Execution -> Compiler -> Java Compiler -> Additional command line parameters, but I

Note: Recompile with -Xlint:deprecation for details

ぐ巨炮叔叔 提交于 2020-12-06 13:09:26
问题 Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. I found many posts about this issue but none that says how to deal in android studio. Where i can set this system property in this IDE, for the project only? 回答1: I had the same question and found the answer elsewhere. This answer says that it can be configured in Android Studio's settings under Build Execution -> Compiler -> Java Compiler -> Additional command line parameters, but I

Note: Recompile with -Xlint:deprecation for details

青春壹個敷衍的年華 提交于 2020-12-06 13:08:41
问题 Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. I found many posts about this issue but none that says how to deal in android studio. Where i can set this system property in this IDE, for the project only? 回答1: I had the same question and found the answer elsewhere. This answer says that it can be configured in Android Studio's settings under Build Execution -> Compiler -> Java Compiler -> Additional command line parameters, but I