android-gradle

AAPT2 compile failed: invalid dimen on Android 3.0 Canary 1

最后都变了- 提交于 2019-11-27 17:09:10
I am playing around with Instant Apps for Android.I installed all the correct packages and tired to create new Application with Instant App support (checked the box for Instant App when crating new application). The problem is that I always run into a problem with compile tools. Does anybody else have this problem and was able to find any workaround. My environment: Android Studio 3.0 Canary 1 Compile SDK: 25 Build Tools: "26.0.0 rc2" Gradle plugin:3.0.0-alpha1 Gradle: tried both gradle-4.0-milestone1 and 2 Java 1.8/1.7 OS: tried both Windows 10 and Linux Ubuntu 16.4 LTS The error: Error: java

Android Studio Gradle Already disposed Module

五迷三道 提交于 2019-11-27 16:40:36
I have installed Android Studio version 1.0.1. I have imported my projects from eclipse and it works fine. Then i deleted a module and reimport it to my Android Studio project. The gradle build says "BUILD SUCCESSFUL" but it pops up a alert window with the message Failed to complete Gradle execution. Cause: Already disposed: Module: 'MYMODULENAME' I cant start my app now. Any idea what i can do? Edit: I solved the problem with the following instructions: Switch project view from Android to Project Remove entry include 'MYMODULENAME' in settings.gradle The blue box in the module symbol dont

Got “unsupported class file version 52.0” after including a module to a project

為{幸葍}努か 提交于 2019-11-27 15:27:05
After creating an empty project within Android Studio and including a pure java module, which compiles and works perfectly on its own, I get the following error on every single class within that module: Error:PARSE ERROR: Error:unsupported class file version 52.0 I tried to run the project using the embedded JDK and the one that I have on my system - JDK 8 (1.8.0_91), the result is the same. Note this, that I don't include the module as .jar library, it is source code which is importing with following instruction: include ':app', ':my-module' project(':my-module').projectDir = new File

gradle dependency error in android

痞子三分冷 提交于 2019-11-27 15:05:48
In the following build.gradle, I added the configuration section to avoid double inclusion of support libraries. Support libraries are used in the main project and in the dependent projects like facebook sdk. Without the configuration section, I get "UNEXPECTED TOP-LEVEL EXCEPTION". Adding that configuration makes the error go away and the app all works fine. Now, I'm trying to add RecyclerView to my app and I get RecyclerView class not found while inflating the recyclerview (although it builds ok). If I remove the facebook SDK and configuration section, the recyclerview works just fine.

How to exclude res folder from gradle build flavours?

可紊 提交于 2019-11-27 15:05:18
I have a requirement to remove a specific res folder from a flavour. sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] res.srcDirs = ['res'] aidl.srcDirs = ['src'] assets.srcDirs = ['assets'] } } productFlavors { flavor1 { sourceSets { flavor1 { resources { exclude 'res/drawable-mdpi/*' } } } } flavorDimensions "flavor" } But still drawable-mdpi folder is coming to the apk. So could anyone please specify what mistake am I making. Thanks Vivek lxknvlk I finally solved this problem! I have found this link . And did this: add an xml file to res/raw folder. I named

java.exe finished with non-zero exit value 2

寵の児 提交于 2019-11-27 14:52:37
My previous play service version is 6.5.87 and I upgraded to 7.0.0 then Got this error com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdkx.x.x_xx\bin\java.exe'' finished with non-zero exit value 2 compile 'com.google.android.gms:play-services:6.5.87' I have upgraded play service Then....Now my gradle is dependencies { compile project(':com_facebook_android') compile project(':pullToRefreshLib') compile project(':smoothProgressbarLib') compile project(':progressMaterial') compile 'com.android.support:support-v4

Faced with `org.gradle.api.ProjectConfigurationException` error on my `gradle build`

孤人 提交于 2019-11-27 14:50:17
Below are the Gradle specs: Gradle 4.6 Android Gradle plugin 3.1.1 Parallel Execution enabled Caching enabled After reading about gradle build optimization from gradle.com, I downloaded the latest stable JVM (9.0.4) and swapped the JVM (Java 8) in Android Studio (default - embedded). After doing this and executing gradle build , I got the java.lang.NullPointerException (no error message) in my terminal. Below is the complete stacktrace. Consequently, I switched back to the embedded JVM that came with Android Studio but the error didn't go away. I am unable to deterministically evaluate the

android.dexOptions.incremental property is deprecated

社会主义新天地 提交于 2019-11-27 14:33:42
When trying to run gradle build, I get following warning in Android Studio 2.2 : Warning:The android.dexOptions.incremental property is deprecated and it has no effect on the build process. In build.gradle file here I have declare dexOptions dexOptions { incremental true jumboMode = true } If it is deprecated then what is the alternate option of this attribute. By default incremental is turned on Java compilation in 2.1.0-rc1 (2016/4/22) or later. So its redundant to declare it in build.gradle file. Changes in Gradle 2.1.0-rc1 (2016/4/22) or later. 1. Remove deprecated dexOptions.incremental .

Android Studio 0.4.3 - Task 'assemble' not found in root project

佐手、 提交于 2019-11-27 14:17:23
Updated to 0.4.3 the other day and trying to start a new project, not even use an existing project, and I get this error: FAILURE: Build failed with an exception. What went wrong: Task 'assemble' not found in root project 'XXX'. Try: Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Here's what I found in the log file: 2014-01-26 09:50:18,186 [ 276355] WARN - nal.AbstractExternalSystemTask - com.android.builder.model.SourceProvider.getAidlDirectories()Ljava/util/Collection; com

Class file for com.google.android.gms.internal.zzaja not found

一笑奈何 提交于 2019-11-27 14:15:36
I am using Fragment for the designing of the Firebase simple login registration. I get error in the OnCreateView() method on initializing auth = FirebaseAuth.getInstance(); error:- Error:(58, 28) error: cannot access zzaja class file for com.google.android.gms.internal.zzaja not found please help source:- http://www.androidhive.info/2016/06/android-getting-started-firebase-simple-login-registration-auth/ I solved this exact problem today and stumbled onto this unanswered question by chance during the process. First, ensure you've properly setup Firebase for Android as documented here: https:/