android-gradle

uses-sdk element cannot have a “tools:node” attribute

谁都会走 提交于 2019-11-30 03:08:13
I've updated Android Studio last night to 0.9.0, buildToolsVersion to 21.1.0 and gradle to 0.14.0, after that I'm receiving this error Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed : uses-sdk element cannot have a "tools:node" attribute I've spent the last night looking for a solution, I found this: <uses-sdk tools:node="replace" /> But unfortunately, added one more error! Error:(10, 5) uses-sdk element cannot have a "tools:node" attribute Error:(10, 5) Execution failed for task ':app:processDebugManifest'. Manifest merger failed : uses-sdk element cannot

Robolectric says “AndroidManifest.xml not found”

*爱你&永不变心* 提交于 2019-11-30 03:07:31
While trying to get Robolectric RC3 to work in Android Studio, I get Caused by: java.lang.RuntimeException: build/intermediates/bundles/debug/AndroidManifest.xml not found or not a file; it should point to your project's AndroidManifest.xml at org.robolectric.manifest.AndroidManifest.validate(AndroidManifest.java:120) at org.robolectric.manifest.AndroidManifest.getResourcePath(AndroidManifest.java:469) at org.robolectric.manifest.AndroidManifest.getIncludedResourcePaths(AndroidManifest.java:475) at org.robolectric.RobolectricTestRunner.createAppResourceLoader(RobolectricTestRunner.java:479) at

Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated

时光总嘲笑我的痴心妄想 提交于 2019-11-30 03:06:34
I was using the following code in my gradle script to rename the apks generated with AndroidStudio: applicationVariants.all { variant -> variant.outputs.each { output -> output.outputFile = new File(output.outputFile.parent, defaultConfig.versionCode + "_" + output.outputFile.name) } } So it was generating apks with names like: 345-app-release.apk , where 345 is the versionCode. But after updating to AndroidStudio 3.0 it returns the following error: Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated{apkData=Main{type=MAIN, fullName=debug, filters=[]}} of

Gradle build-info.xml not found for module app in Android Studio

笑着哭i 提交于 2019-11-30 02:57:52
Gradle build-info.xml not found for module app. Please make sure that you are using gradle plugin gradle:2.0.0-alpha or greater I'm using the gradle plug in gradle:2.0.0-beta2. I randomly get this warning and after this very often either the app is not updated or it crashes. It is enough to clean and rebuild to fix the issue. Is there any better way to fix it? Balki For me it happens on the Mac, but on Windows it works fine all the time. Ever since I updated Android Studio to version 2.0 beta, the issue was still present until official 2.0 Android Studio version. What helped was disabling

Define buildconfigfield for an specific flavor AND buildType

牧云@^-^@ 提交于 2019-11-30 02:41:21
I have 2 flavors, lets say Vanilla and Chocolate. I also have Debug and Release build types, and I need Vanilla Release to have a field true, while the other 3 combinations should be false. def BOOLEAN = "boolean" def VARIABLE = "VARIABLE" def TRUE = "true" def FALSE = "false" VANILLA { debug { buildConfigField BOOLEAN, VARIABLE, FALSE } release { buildConfigField BOOLEAN, VARIABLE, TRUE } } CHOCOLATE { buildConfigField BOOLEAN, VARIABLE, FALSE } I'm having an error, so I guess the debug and release trick doesnt work. It is possible to do this? Loop the variants and check their names:

How do I know the properties in applicationVariants of android gradle plugin?

。_饼干妹妹 提交于 2019-11-30 01:59:24
I'm using Android Studio with gradle plugin to develop applications. I learn some usage of android gradle plugin on DSL Reference . But one thing I found is that the applicationVariants part on doc is hard to understand. It only gives such a description: DomainObjectSet<ApplicationVariant> applicationVariants The list of Application variants. Since the collections is built after evaluation, it should be used with Gradle's all iterator to process future items. But what's the properties in the ApplicationVariant? I don't know. And I found nothing reference link to describe the ApplicationVariant

Generating unsigned, release apk with Android Studio

﹥>﹥吖頭↗ 提交于 2019-11-30 01:53:18
I need to generate an unsigned, release APK (where someone else will then sign it and release it to the store- with the someone else handling the keys and everything else). My problem is that Android Studio throws an error whenever I try to build: app-flavorUnsigned-release-unsigned.apk is not signed. Please configure the signing information for the selected flavor using the Project Structure dialog. I've tried several, previous methods: Failed at creating an Artifact (can't find any menus with "Artifacts" anywhere, although for editing configurations I found the option to choose a custom

Using APK Splits for Release but not Debug build type

两盒软妹~` 提交于 2019-11-30 01:35:02
I've successfully implemented APK Splits so that separate APKs are generated for different ABIs. However, for efficiency (and since I have no need for non-armeabi-v7a APKs in Debug), I would like to limit Debug builds to only generate armeabi-v7a APKs. How can this be done? One idea is with this: abi { enable true reset() include 'x86', 'armeabi-v7a', 'mips' universalApk false } Maybe there is some way to set enable based on the Build type? Jeff P You can try a variation on @Geralt_Encore's answer, which avoids the separate gradlew command. In my case, I only cared to use APK splitting to

Android Studio update -Error:Could not run build action using Gradle distribution

倖福魔咒の 提交于 2019-11-30 01:26:42
I have recently updated android studio to the latest version,but then comes the problem. Gradle 'MyApplication' project refresh failed. Error:Could not run build action using Gradle distribution ' https://services.gradle.org/distributions/gradle-2.2.1-all.zip '. Found this in StackOverflow However trying everything nothing works - cannot create new project of import anything at the moment.Please kindly advice. apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.sclick.myapplication" minSdkVersion 14

Gradle use certificate authentication for repository

一笑奈何 提交于 2019-11-30 00:44:10
The Problem I have a Android Gradle project which should pull a lib from my companys sonatype nexus server. The nexus server uses a certificate authentication. That means the client has a private certificate which authenticates and authorizes him against the nexus server. The problem is how to configure gradle to use my certificate (which is in the osx keystore). /app/build.gradle repositories { // some other repositorys... ... maven { credentials { username = NEXUS_USERNAME password = NEXUS_PASSWORD } url 'https://prefix.server.com/nexus/content/repositories/artifactid' } } Without giving a