Tag: android-gradle

RxJavaPlugins Error Didn't find class “com.google.devtools.build.android.desugar.runtime.ThrowableExtension”

After upgrading Android Studio 3.0 Beta 1 getting the following error. When I downgraded the error disappeared. Studio Build: Android Studio 3.0 Beta 1 Version of Gradle Plugin: ‘com.android.tools.build:gradle:3.0.0-beta1′ Version of Gradle:.0.0-beta1 Version of Java: 8 OS: MacOSX java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension; at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:364) at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:113) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6121) […]

Android Gradle adding external library and nested external libraries to a project

How do i add an external library and nested external libraries to an android project? My project structure (Not allowed to change) Apps/ App1/ build.gradle settings.gradle libraries/ library1/ build.grade settings.gradle library2/ build.grade settings.gradle library3/ build.grade settings.gradle library4/ build.grade settings.gradle App1 App1/build.gradle buildscript { … } apply plugin: ‘android’ dependencies { compile fileTree(dir: ‘libs’, include: ‘*.jar’) […]

android studio 0.4.2 + gradle + Android Source code

I’m trying to attach the android source code to my gradle project using Android Studio. The problem is that the SDK tab does not appear if you are using a gradle project and I can not attach the source code. I tried with version 0.4.3 and does not work. Any idea or work arround? EDIT: […]

What does “multiDexEnabled true” mean?

What is meant by “multiDexEnabled true” in Android gradle. Why do we use this? What is the effect if it is enabled?

Gradle build error after BSOD(java.lang.NullPointerException (no error message)

After BSOD(blue screen of death) I have next gradle build error: FAILURE: Build failed with an exception. What went wrong: java.lang.NullPointerException (no error message) Try: Run with –info or –debug option to get more log output. Exception is: java.lang.NullPointerException at org.gradle.api.internal.changedetection.state.TreeSnapshotRepository.removeTreeSnapshotUsage(TreeSnapshotRepository.java:85) at org.gradle.api.internal.changedetection.state.CacheBackedFileSnapshotRepository.remove(CacheBackedFileSnapshotRepository.java:47) at org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository$1$1.run(CacheBackedTaskHistoryRepository.java:81) at org.gradle.internal.Factories$1.create(Factories.java:22) at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:192) at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175) at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106) at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:187) […]

Change generated apk name from “app-debug.apk”

Every time I run a project with Android Studio (1.02) it’s generate an unsigned apk which located in ..\build\outputs\apk folder and get by default the name “app-debug.apk” I want to change that default name to something else. Is it possible? How?

Issue signing Android Release Build “ Failed to read key from keystore”

I’m using gradle (assembleRelease) to generate the release apk. I have saved the keystore file in project/app/filename.keystore (Within the application) I have specified details related to signing in gradle.properties file RELEASE_STORE_FILE=filename.keystore RELEASE_STORE_PASSWORD=**** RELEASE_KEY_ALIAS=alias RELEASE_KEY_PASSWORD=**** My build.gradle file has the following related to signing signingConfigs { release { storeFile file(RELEASE_STORE_FILE) storePassword RELEASE_STORE_PASSWORD keyAlias RELEASE_KEY_ALIAS keyPassword RELEASE_KEY_PASSWORD […]

Gradle: 'buildTypes' cannot be applied to groovy.lang.Closure

This question already has an answer here: buildTypes cannot be applied to groovy.lang.Closure 19 answers

How to change libs directory in Gradle?

I want to integrate Zbar into my application but cant seem to figure out how to accomplish this using the new Android Studio. I have looked through the example and have copied over the code without any issues. The problem I am having is adding the libs to my project I cant seem to figure […]

Gradle sync failed: Version: 8.4.0 is lower than the minimum version (9.0.0) required for google-services plugin

I’m trying to integrate Google’s Firebase SDK as explained here But I’m getting this error when I try to build the project: Gradle sync failed: Version: 8.4.0 is lower than the minimum version (9.0.0) required for google-services plugin. This is my project’s build.gradle file : buildscript { repositories { jcenter() } dependencies { classpath ‘com.android.tools.build:gradle:2.1.0’ […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.