build.gradle

Android build.gradle ERROR: ParseError at [row,col]:[65,9] Message: expected start or end tag Affected Modules: app

左心房为你撑大大i 提交于 2019-11-26 17:14:38
问题 build.gradle: Android build.gradle shows following error ERROR: ParseError at [row,col]:[65,9] Message: expected start or end tag Affected Modules: app 回答1: I got the same error, and the wrong character was found in the [row, col] position of the AndroidManifest.xml, not build.gradle 回答2: I got this same error, and finally I found that there is error in Mainfest.xml file <service android:name=".onboarding.httpserver.HttpService" android:exported="false" > </service>> you see, there are two >>

How to exclude res folder from gradle build flavours?

前提是你 提交于 2019-11-26 17:00:30
问题 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 回答1: I finally

Android Studio - Error:Program type already present

对着背影说爱祢 提交于 2019-11-26 16:59:59
问题 When I try to compile the code, the following error appears on Android Studio 3.0.1 Error:Program type already present: com.squareup.picasso.Action$RequestWeakReference My gradle code: ... compile 'com.android.support:appcompat-v7:26.1.0' compile 'com.android.support:design:26.1.0' compile 'com.android.support:support-v4:26.1.0' compile 'com.android.support:support-vector-drawable:26.1.0' compile 'com.android.support.constraint:constraint-layout:1.1.0-beta4' compile 'com.google.firebase

No cached version of com.google.gms:google-services:1.x.x available for offline mode

核能气质少年 提交于 2019-11-26 16:58:12
问题 Error:No cached version of com.google.gms:google-services:1.4.0-beta3 available for offline mode. Disable Gradle 'offline mode' and sync project I am facing this issue because I am working in offline mode in android studio. Can some body please tell me where is this cached file stored in my windows and from where I'll get this file so that I can separately download it and paste/keep it, and build my android project. 回答1: The Offline mode does not allow you to completely work offline. Its

How to fix google play service error

吃可爱长大的小学妹 提交于 2019-11-26 16:39:09
问题 Today after updating the play services in root folder I'm facing the following problem . I'm confused how to fix this. Can anyone please help me to fix this ? This error is irritating a lot. I don't know where's the conflict. By the way why it's showing conflict while no versions are interrelated. Error : The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.0,15.0.0], [15.0.2,15.0.2]], but resolves to 15.0.2. Disable the

Dex error On Android Studio 3.0 Beta4

99封情书 提交于 2019-11-26 16:35:36
Error:java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex Error:java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex Error:com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex Error:com.android.dex.DexException: Multiple dex files define Lcom/google/zxing/integration/android/IntentResult; I have same problem with Android Studio 3.0 beta 4. I found a solution. 1. From the Build menu, press the Clean Project button. 2. After task completed, press the

java.lang.IllegalAccessError: Method 'void android.support.v4.content

六月ゝ 毕业季﹏ 提交于 2019-11-26 16:25:25
问题 I updated playservice in my sdk and I got this error. And I am not able to access GCM Token. Before update sdk my project work perfectly. I waste my whole day in it but not found any solution. I tried this but gettting error in this dependencies com.google.android.gms:play-services-plus:9.0.0 Here is my logcat Caused by: java.lang.IllegalAccessError: Method 'void android.support.v4.content.ContextCompat.<init>()' is inaccessible to class 'com.google.android.gms.iid.zzd' (declaration of 'com

Error in gradle build after updating Android Studio with log4j

流过昼夜 提交于 2019-11-26 16:13:54
问题 I do get these errors after i updated Android Studio and the SDK: Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(org.apache.log4j.chainsaw.ControlPanel$1) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source, using an up-to-date compiler Error:and without specifying any

How to use JUnit 5 with Gradle?

☆樱花仙子☆ 提交于 2019-11-26 15:44:13
问题 I am trying to use JUnit 5 with Gradle after I succeeded in running a JUnit 4 test. Expected result: Tthe JUnit 4 test gave a nice 'passed' in the output and an html report in build/reports/tests . Actual result: The JUnit 5 test as below does not output anything besides (...) build succesful , while I know the test is not actually run since there is no test log output passed/skipped/failed, and putting a fail in the test keeps the build successful. Running gradle test --info yields Skipping

Build variants in Gradle for a Library Project in Android

不羁的心 提交于 2019-11-26 15:32:35
问题 I am trying to configure with Gradle a project which contains some external libraries. With Gradle I can setup different Environmental Configuration (with a class inside a config file) for the main application using the Build Variants so I can execute code according to this variables. The problem is that how I can do the same for a library project? I created this library for this project and I would like to setup different Build Variants for different scenarios. As an example: In the Library,