build.gradle

Error: Gradle: execution failed for task ':app:preDexDebug'

情到浓时终转凉″ 提交于 2019-11-27 04:52:55
I had a self created jar from another projected imported as a library into my other project. When I changed code in that project and exported a new jar to replaced the old one I cannot run my app anymore. I only get the following error: I have tried removing and adding and adding as dependency, adding as library. Nothing seems to work. I have also done clean build and a rebuild. We've seen this problem in the past when our project was compiling with a version of Java different from the one used to compile the library. The magic number is just used to identify class files so that is not the

org.gradle.api.UncheckedIOException: Failed to capture snapshot of input

荒凉一梦 提交于 2019-11-27 04:30:28
问题 I was trying to build my project again after installing the latest preview version of android studio, but follow exception is showing on updating the gradle version: org.gradle.api.UncheckedIOException: Failed to capture snapshot of input files for task ':app:mergeDebugResources' property 'aapt2FromMaven' during up-to-date check. at org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository.snapshotTaskFiles(CacheBackedTaskHistoryRepository.java:331) at org.gradle.api

Android Studio Gradle: Error:Execution failed for task ':app:processDebugGoogleServices'. > No matching client found for package

微笑、不失礼 提交于 2019-11-27 04:14:03
问题 I am trying to upgrade my google play services dependencies to 8.4.0 by following the example Google gives here, but I am getting the following error ('com.example.exampleapp' is a replacement for my app package name): Error:Execution failed for task ':app:processDebugGoogleServices'. > No matching client found for package name 'com.example.exampleapp' Project build.gradle: buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.0.0-alpha3'

Cannot resolve symbol 'GooglePlayServicesClient'

旧巷老猫 提交于 2019-11-27 03:37:03
问题 I am trying to migrate a project from Eclipse to Android Studio, the project can be build in Eclipse and was successful imported to Android Studio, however, I get Cannot resolve symbol 'GooglePlayServicesClient' error in Android Studio. I followed the official tutorial to imported Google Play service in Android Studio, and an other package " com.google.android.gms.common.ConnectionResult " that used in my project does not have same issue. Only ' GooglePlayServicesClient ' cannot be resolved.

Android Studio: Resolving Duplicate Classes

社会主义新天地 提交于 2019-11-27 03:27:35
问题 When I try to run my android application on an Android device, the gradle console reports the following error: Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/loopj/android/http/AsyncHttpClient$1.class When I search for the "AsyncHttpClient" class, I see that it's indeed being found in two separate locations: /Users/Afflatus/.gradle/caches/modules-2/files-2.1

java.lang.NullPointerException (no error message)

一世执手 提交于 2019-11-27 03:26:52
I know that this question of mine has been asked many times and I did follow most of the answers but none of those helped me. So this is my problem, whenever I sync my project it always fails. Here is how the gradle console look like: Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies] Configuration on demand is an incubating feature. Incremental java compilation is an incubating feature. :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE

Error while compiling release build in Android Studio 3.0 RC2

时光毁灭记忆、已成空白 提交于 2019-11-27 03:18:36
问题 How can I fix this issues while compiling release build in Android Studio 3.0 RC2 Error:Error: commons-logging defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses] Error:Error: httpclient defines classes that conflict with

IntelliJ/Gradle Could not determine java version from '11.0.1'

落花浮王杯 提交于 2019-11-27 03:12:30
问题 I'm running a Linux Ubuntu 18 OS. Installed jdk in a custom local directory. Normally, IntelliJ recommends that you use the default gradle wrapper . But in my case, I want to be able to change the Gradle Version on the fly whenever it's due for an update. If you use IntelliJ with Gradle, and you bump into the following error: Could not determine java version from '11.0.1' 回答1: If you use IntelliJ Checks: Navigate to: File >> Settings >> Build, Execution, Deployment >> Build Tools >> Gradle .

Error:Could not find property 'assembleDebug' on project ':app'

风流意气都作罢 提交于 2019-11-27 02:11:23
问题 I am using 'com.android.tools.build:gradle:2.2.0-alpha6' and Android Studio 2.2 Preview 6. The build runs perfectly fine on Gradle 2.1.0, but to enable instant run it asks me to update Gradle plugin. On updating Gradle plugin, the build shows "Error:Could not find property 'assembleDebug' on project ':app'" . I already tried cleaning .gradle and .idea and reloading the project, but nothing works. Please help. 回答1: find which task is depending on assembleDebug task changing the following did

How to have two build flavors inherit from a root flavor in Android Studio?

杀马特。学长 韩版系。学妹 提交于 2019-11-27 02:10:42
问题 I used to have the following project flavors: Apple Orange Originally the only difference was the applicationId/packageName . Now there is a single java file that is different. A custom ArrayAdapter to be exact. The solution was to create src/Apple and src/Orange and both inherit from src/main . I removed the java file from src/main and put a copy into src/Apple and src/Orange and modified it appropriately. All was good in the world. Fast forward a few weeks, now there are about 10 java files