android-gradle

Indexing freeze with message: Indexing paused due to batch updated

ⅰ亾dé卋堺 提交于 2019-11-28 15:50:20
I've updated Android Studio to version 3.2. After that update one of my projects don't want to index. It freezes with the message "Indexing paused due to batch update". How can I fix this? File gradle-wrapper.properties : distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip File gradle-properties : org.gradle.jvmargs=-Xmx1536m org.gradle.parallel=true org.gradle.daemon=true org.gradle.configureondemand=true Muhamed Riyas M I faced the same issue

Android Studio: how to generate signed apk using Gradle?

你说的曾经没有我的故事 提交于 2019-11-28 15:24:38
I've searched on Google and SO but cannot find my answer. This is the first time I'm working with the gradle system and I am now at the point of generating a signed APK to upload to google play (Project is imported from eclipse). Now I've read the part here http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Building-and-Tasks that you should add signingConfigs to your build.gradle I've added these lines and now I saw that you need to run ./gradlew assembleRelease but running this in my cmd returns 'gradle' is not recognized as an internal or external command, operable program

Android Gradle: Dynamically change versionName at build time

非 Y 不嫁゛ 提交于 2019-11-28 15:23:38
I'm trying to emulate Maven release plugin in Android by using a customized version of gradle-release plugin: https://github.com/townsfolk/gradle-release The interesting steps are: Check uncommitted changes Step version code and remove -SNAPSHOT suffix from version name Build Step version name and add -SNAPSHOT suffix for next development version However the generated APK always has the previous versions (i.e. 1.0.0-SNAPSHOT instead of 1.0.0). Version numbers are stored and correctly updated in gradle.properties, so I'm assuming that I need to update the versions in the data model as well for

Why are build types distinct from product flavors?

烈酒焚心 提交于 2019-11-28 15:05:35
Preface: this is not a question about how to use build types and product flavors in an Android app. I understand the basic concepts involved. This question is more about trying to understand which configuration should be specified in a build type, which configuration should be specified in a product flavor, and whether any distinction is actually necessary. This week, I've been learning more about gradle configuration for Android apps. I initially thought I had a good handle on build types vs product flavors, but the deeper I got into the documentation the more I realized the distinction

Unable to merge dex error [duplicate]

ぃ、小莉子 提交于 2019-11-28 14:53:06
This question already has an answer here: Unable to merge dex 59 answers This is my app build.gradle file It shows error in the appcompat dependecy file. I tried clean project and build project and so many ways but still the error shows. This is my error when i run project. **Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex** Add this to your app.gradle file android { defaultConfig { multiDexEnabled true } } add the

How to add Gson extras to an Android project?

心已入冬 提交于 2019-11-28 14:21:48
I am using gson parser (latest version -> 2.8.2). I would like to use RuntimeTypeAdapterFactory which is part of the gson extras. In my build.gradle there is currently a single compile directive: compile 'com.google.code.gson:gson:2.8.2' However this gives me only the gson lib without the extras (RuntimeTypeAdapterFactory is not recognized in the project...). I have looked at gson extras' pom file ( https://github.com/google/gson/blob/master/extras/pom.xml ) and tried to add below line to my build gradle: compile 'com.google.code.gson:gson-extras:2.8.2' But gradle just won't compile the gson

Android Studio 2.2.3 Gradle Build Running Stuck

风格不统一 提交于 2019-11-28 14:19:44
I download android studio 2.2.3 and load my project. But Gradle Build Running Stuck. It continuously shows that and i am not able to run my app. what is the issue can any one help me with that? Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies] buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files classpath 'com.google.gms:google

Error: Gradle DSL method not found: compile()

你离开我真会死。 提交于 2019-11-28 14:18:59
enter image description here Hello, we've created an android app for our site, but now you want to turn it into an APK, but I've encountered the following error and do not let me move on with the compilation. Error:(60, 0) Gradle DSL method not found: 'compile()' Possible causes:<ul><li>The project 'Template' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0). <a href="fixGradleElements">Upgrade plugin to version 2.3.3 and sync project</a></li><li>The project 'Template' may be using a version of Gradle that does not

Android | Cannot add all Google libraries for version 15.0.1

和自甴很熟 提交于 2019-11-28 14:17:55
i'm learning Android while doing some work on it. I'm trying to update an app's version to Android 8.0, that includes sdk, libraries and external APIs used. I looked it up and it seems like 15.0.1 is the suggested version. But when i use it, gradle fails for play-services-analytics and firebase services to sync saying it cannot resolve the library and nor can it find the Repository if i press Install Repository. So currently i'm using version 12.0.1 for both play services and firebase services. Using it like: implementation 'com.google.android.gms:play-services-maps:12.0.1' implementation 'com

Error: The file name must end with .xml or .png when using an mp3 file

回眸只為那壹抹淺笑 提交于 2019-11-28 14:09:55
I'm using Gradle 1.5.0 with Android Studio. Project syncs with Gradle without any issues, but when I run the app, I get the follow error message Error:Execution failed for task ':App:mergeDebugResources'. /Users/Zee/Repos/App/res/drawable/notification.mp3: Error: The filename must end with .xml or .png Using an mp3 file, so not sure what to do at this point. Any help is much appreciated. You can't put mp3 file in drawable. Drawable folder is for images. Put your mp3 file or any other format in raw folder. Raw folder can be found in res/raw If it doesn't exist then just create a raw folder in