build.gradle

Android Studio - Issue in build.gradle uncaught translation error ExecutionException OutOfMemory

让人想犯罪 __ 提交于 2019-12-04 01:45:40
I am having a strange problem with my Android app in Android Studio. Everything seemed to be working fine, until today after adding some new files and making some updates to build.gradle . The error message I am seeing is the following: Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit

How to make an Android Library available via build.gradle?

泪湿孤枕 提交于 2019-12-04 01:44:40
问题 I made an android library that I'd like upload to make it available for all the android devs via build.gradle. I've followed these steps and these steps, but this is the first time that I'm doing this and can't achieve it. I'd appreciate advices or instructions from some of you that already made it. But I'm not even sure what do I have to do. I wanna make my library available for all the android developers by writing something like this in their build.gradle: compile 'com.actionbarsherlock

Program type already present: android.support.constraint.BuildConfig

烂漫一生 提交于 2019-12-04 01:05:11
build.gradle (Module: app) apply plugin: 'com.android.application' android { compileSdkVersion 'android-P' buildToolsVersion '27.0.3' defaultConfig { multiDexEnabled true applicationId "tk.megh.myapplication" minSdkVersion 'P' targetSdkVersion 'P' versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } dexOptions { preDexLibraries = false } } dependencies { implementation 'com.android.support:multidex:1.0.1'

Which gradle file to use to set the application as debuggable?

别等时光非礼了梦想. 提交于 2019-12-04 01:04:59
I am newbie to android development. I have just started setting up my device to debug my application. while going through android develop tools it says to set buildTypes debuggable to true in build.gradle file . I am not sure which grade file to use gradle.build(Module) or gradle.build(project)? There are two gradle files in your project - Top level App level You need to add it to your app level gradle file - YourApplicationRootFolder -> app -> build.gradle You need to add it like this - buildTypes { debug { debuggable true } release { minifyEnabled false proguardFiles getDefaultProguardFile(

Gradle | Spring boot dependencies are not excluding

孤街醉人 提交于 2019-12-04 00:46:14
问题 I'm trying to get log4j to work in a project that I'm working on. I added the relevant log4j dependencies in build.gradle and excluded the Spring boot starter logging so it can work. This worked fine when I used Maven as the build tool, but once I switched to Gradle it's not working at all (excepts the logging from Spring boot starter). Here are the dependencies in my build.gradle dependencies { compile('org.springframework.boot:spring-boot-starter-data-jpa') compile('org.springframework.boot

Generate Checkstyle HTML report with Gradle

Deadly 提交于 2019-12-04 00:21:40
I'd like to get the output of running Checkstyle via Gradle as an HTML report. I've found nothing in the Checkstyle plugin documentation . I've added the following to my build.gradle file. checkstyleTask { reports { html { destination "build/reports/checkstyle.html" } } } but this yielded What went wrong: A problem occurred evaluating root project 'MyProject'. Could not find method checkstyleTask() for arguments [build_1vu33nc0ekgtoo19jt e86o8o42$_run_closure8@1d8ee20] on root project 'MyProject'. Is there a way to generate Checkstyle HTML reports using Gradle? Thanks. JB Nizet Here's how I do

Android Failed looking up window with support version 27.0.0

走远了吗. 提交于 2019-12-04 00:11:34
After the update of supportVersion to 27.0.0 ONLY on Android 5.0.2 the app crash with this stacktrace: W/WindowManager: Failed looking up window java.lang.IllegalArgumentException: Requested window android.view.ViewRootImpl$W@f004691 does not exist at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8426) at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8417) at com.android.server.wm.WindowManagerService.removeWindow(WindowManagerService.java:2558) at com.android.server.wm.Session.remove(Session.java:186) at

Error:Execution failed for task ':app:processDebugGoogleServices'. > Please fix the version conflict

孤人 提交于 2019-12-03 23:31:37
After updating my google play services to rev 28 i'm getting this error. Im not sure why this is happening as it was working fine before. here is my build.gradle file apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' android { compileSdkVersion 23 buildToolsVersion '23.0.2' defaultConfig { applicationId "com.matsoltech.pakistancurrentaffairs" minSdkVersion 10 targetSdkVersion 23 versionCode 11 versionName "2.1.1" } buildTypes { release { multiDexEnabled = true minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules

Android Studio Multiple dex files gradle error

空扰寡人 提交于 2019-12-03 23:28:11
I get this error when I Run->app for an Android application in Android Studio UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lcom/google/common/annotations/Beta; ... And here is the output of gradlew -q :app:dependencies +--- project :shared +--- com.google.api-client:google-api-client:1.19.0 | +--- com.google.oauth-client:google-oauth-client:1.19.0 | | +--- com.google.http-client:google-http-client:1.19.0 | | | +--- com.google.code.findbugs:jsr305:1.3.9 | | | \--- org.apache.httpcomponents:httpclient:4.0.1 | | | +--- org.apache.httpcomponents:httpcore

Could not find com.android.tools.build:gradle:3.0.0 [duplicate]

▼魔方 西西 提交于 2019-12-03 22:36:18
This question already has an answer here: Could not find com.android.tools.build:gradle:3.0.0-alpha1 in circle ci 13 answers When I try to build may Android project from command line, I get following error messages: A problem occurred configuring project ':mylib'. Could not resolve all files for configuration ':mylib:classpath'. Could not find com.android.tools.build:gradle:3.0.0. Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar https://repo1