build.gradle

manifestPlaceholders value is not string

别说谁变了你拦得住时间么 提交于 2019-12-04 15:38:10
In my AndroidManifest.xml file I have the following meta-data tag which should be populated dynamically: <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="${FACEBOOK_APP_ID}"/> My gradle file looks like this: manifestPlaceholders = [ GOOGLE_PROJECT_ID: "A888844613784", FACEBOOK_APP_ID: "888570042741264" ] After "Build & Assemble" the FACEBOOK_APP_ID in the manifest file looks like this: <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="1481023616.000000" /> Unfortunately this is not a String, but a float value. That's not correct or what I want. I

Duplicate Entry for ':app:transformClassesWithJarMergingForDebug'

给你一囗甜甜゛ 提交于 2019-12-04 13:02:50
I am Importing my project from Eclipse , while building an APK i found following Error. Error:Execution failed for task com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/plus/PlusOneButton$OnPlusOneClickListener.class Error:Execution failed for task ':gruhini:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/games/Game.class Error:Execution failed for task ':gruhini:transformClassesWithJarMergingForDebug'. com

Android studio 3.2.1 ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'

末鹿安然 提交于 2019-12-04 12:25:56
问题 After I update Android Studio to 3.2.1 and gradle version in my project I am getting following build error. I have already checked lots of questions related this question but no luck. Project dependency Build.gradle buildscript { repositories { google() mavenCentral() maven { url 'https://maven.google.com' } gradlePluginPortal() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' // NOTE: Do not place your application dependencies here; they belong // in the individual

Unexpected node Android Packaging in Android Gradle build

青春壹個敷衍的年華 提交于 2019-12-04 12:18:43
I am trying to make my project use gradle . The problem is that everytime I try to build, I get the following error: Error:Internal error: (java.lang.AssertionError) Unexpected node Android Packaging; nodes=[Module 'Serengeti' production, Resources for 'Serengeti' production, Resources for 'Serengeti' tests, Artifact 'Serengeti', gradle-resources-production:Serengeti, gradle-resources-test:Serengeti, Android Gradle Build Target] java.lang.AssertionError: Unexpected node Android Packaging; nodes=[Module 'Serengeti' production, Resources for 'Serengeti' production, Resources for 'Serengeti'

Issue with experimental gradle: The android plugin must be applied to the project

纵饮孤独 提交于 2019-12-04 12:10:45
I'm trying to run some native code with the NDK in Android Studio. I have followed the steps shown HERE to use the experimental Gradle, but obviously it's not all going smoothly. I'm getting this error: The android or android-library plugin must be applied to the project Here is my gradle file: apply plugin: 'com.android.model.application' apply plugin: 'com.neenbedankt.android-apt' apply plugin: 'io.fabric' model { android { compileSdkVersion = 22 buildToolsVersion = "22.0.1" android.ndk { moduleName = "test" } defaultConfig.with { applicationId = "com.shaperstudio.dartboard" minSdkVersion

why gradlew :app:dependencyInsight failed?

白昼怎懂夜的黑 提交于 2019-12-04 11:44:57
I try to run this command to list all the dependencies of firebase-messaging library : gradlew :app:dependencyInsight --configuration compile --dependency firebase-messaging but it's return me : :app:dependencyInsight No dependencies matching given input were found in configuration ':app:compile' BUILD SUCCESSFUL in 0s 1 actionable task: 1 executed this is my build.gradle file : apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "com.example.test.myapplication" minSdkVersion 15 targetSdkVersion 27 versionCode 1 versionName "1.0"

How to disable Android NDK build for some build variant

独自空忆成欢 提交于 2019-12-04 11:15:39
I am using Android Studio 2.2 and have setup Gradle to build c/c++ sources with NDK via CMake. Now I would like to disable NDK build for buildType "debug". For buildType "release" I would like to keep it. The goal is to make NDK sources compile on the build server (using "release") but disable it for developers (using "debug"). This is the build.gradle file currently in use: android { externalNativeBuild { cmake { path "CMakeLists.txt" } } defaultConfig { externalNativeBuild { cmake { arguments "-DANDROID_TOOLCHAIN=clang" cppFlags "-std=c++14" } } ndk { abiFilters 'armeabi-v7a', 'x86' } }

Error:(1, 0) plugin: 'com.android.application' not found [duplicate]

冷暖自知 提交于 2019-12-04 10:52:41
This question already has an answer here: Error:(1, 0) Plugin with id 'com.android.application' not found 20 answers I got this error when I was creating new project. I tried to resolve but I couldn't find any solution. First: Add the following code to the top of your build.gradle: buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.1.2' } } allprojects { repositories { jcenter() } } Second: Find the gradle-wrapper.properties. Change the last sentence to this: distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip Hope

Android Studio: How to create build.gradle file for use on Jenkins?

自古美人都是妖i 提交于 2019-12-04 10:45:33
问题 I'm new to gradle and trying to figure out how to set it up on our Jenkins build machine. Our app builds perfectly from within Android Studio, but it doesn't ever generate a build.gradle file, which I believe I need in order to run the gradle build on Jenkins. Any help appreciated! 回答1: I ended up creating these build files from scratch. Here's some guidelines: If you have a project with multiple modules, create a settings.gradle file at the root of your project (at the same level as all the

Why am I getting “could not find com.android.tools.build:gradle” error?

筅森魡賤 提交于 2019-12-04 10:21:09
问题 This is based off my last question as well. Following this tutorial, I cloned the project into my machine and am trying to get the project to build properly. In the process of fixing the error I got in my last question, I encountered a new error. This is the section of the build script I am trying to fix/edit buildscript { repositories { mavenCentral() mavenLocal() maven { url 'https://github.com/steffenschaefer/gwt-gradle-plugin/raw/maven-repo/' } } dependencies { classpath 'de.richsource