build.gradle

java.lang.NoClassDefFoundError: android.support.v4.view.LayoutInflaterCompatHC in Android Studio

前提是你 提交于 2019-12-18 04:47:07
问题 i am new to android studio i am doing one sample application in android studio, when i run the application 5.0 it's working fine but 5.0 below it's throw's this Execption can any one tel what i am wrong here... 08-25 18:17:40.354 28953-28953/com.app E/AndroidRuntime﹕ FATAL EXCEPTION: main java.lang.NoClassDefFoundError: android.support.v4.view.LayoutInflaterCompatHC at android.support.v4.view.LayoutInflaterCompat$LayoutInflaterCompatImplV11.setFactory(LayoutInflaterCompat.java:42) at android

Gradle version 2.10 is required. Current version is 2.8 Error

徘徊边缘 提交于 2019-12-18 04:36:07
问题 Following things are using in the project- The android studio version - 2.0 Preview 4. ANDROID_BUILD_MIN_SDK_VERSION=9 ANDROID_BUILD_TARGET_SDK_VERSION=22 ANDROID_BUILD_TOOLS_VERSION=22.0.1 ANDROID_BUILD_SDK_VERSION=22 classpath 'com.android.tools.build:gradle:2.0.0-alpha9' As per the error I changed the distribution url https\://services.gradle.org/distributions/gradle-2.8-all.zip to https\://services.gradle.org/distributions/gradle-2.10-all.zip but still getting the following error Error:(1

Dynamically created task of type Copy is always UP-TO-DATE

梦想与她 提交于 2019-12-18 04:14:36
问题 I've prepared a very simple script, that illustrates the problem I see using Gradle 1.7 (need to stick with it because of some plugins not yet supporting newer versions). I'm trying to dynamically create tasks each of which corresponds to a file in the project directory. This works fine, but the tasks I create never get executed as soon as I assign them type 'Copy'. Here is my problem build.gradle : file('templates').listFiles().each { File f -> // THIS LINE DOES NOT WORK task "myDist-${f

Crashlytics not finding API Key in crashlytics.properties at runtime

依然范特西╮ 提交于 2019-12-18 04:01:47
问题 I'm currently implementing the API Key switching script suggested here, except with build types instead of flavors. My build.gradle looks like this: ... buildTypes { debug { ... set("crashlyticsApiKey", "API_KEY_1") set("crashlyticsApiSecret", "API_SECRET_1") } release { ... set("crashlyticsApiKey", "API_KEY_2") set("crashlyticsApiSecret", "API_SECRET_2") } } ... productFlavors{...} ... File crashlyticsProperties = new File("${project.projectDir.absolutePath}/crashlytics.properties")

Crashlytics not finding API Key in crashlytics.properties at runtime

故事扮演 提交于 2019-12-18 04:01:01
问题 I'm currently implementing the API Key switching script suggested here, except with build types instead of flavors. My build.gradle looks like this: ... buildTypes { debug { ... set("crashlyticsApiKey", "API_KEY_1") set("crashlyticsApiSecret", "API_SECRET_1") } release { ... set("crashlyticsApiKey", "API_KEY_2") set("crashlyticsApiSecret", "API_SECRET_2") } } ... productFlavors{...} ... File crashlyticsProperties = new File("${project.projectDir.absolutePath}/crashlytics.properties")

Getting the error “duplicate entry: com/google/android/gms/internal/zzble.class” when trying to add a package

空扰寡人 提交于 2019-12-18 03:56:18
问题 I'm trying to add the react-native-firestack package to my app. But it keeps giving the following error : :app:mergeDebugResources UP-TO-DATE :app:recordFilesBeforeBundleCommandDebug :app:bundleDebugJsAndAssets SKIPPED :app:generateBundledResourcesHashDebug 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 :app:processDebugManifest UP-TO-DATE :app:processDebugResources UP-TO-DATE :app:generateDebugSources UP-TO-DATE :app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE :app

Could not find property 'xxxx' on com.android.build.gradle.AppExtension_Decorated

寵の児 提交于 2019-12-17 23:13:37
问题 I got this error after I added these lines to my gradle file: buildTypes.each { it.buildConfigField 'String', 'OPEN_WEATHER_MAP_API_KEY', MyOpenWeatherMapApiKey } then the log show: Could not find property 'MyOpenWeatherMapApiKey' on com.android.build.gradle.AppExtension_Decorated@c3b784 The solutions on google that I searched cannot solve my problem. Please show me where I was wrong? 回答1: Since you are using a String you have to use this syntax: buildConfigField "String" , "OPEN_WEATHER_MAP

Android Studio Update 0.4.0 could not find buildConfig()

空扰寡人 提交于 2019-12-17 22:57:24
问题 After upgrading Android Studio to version 0.4.0 I got a new error: I upgraded to gradle 1.9 via the gradle-wrapper.properties distributionUrl=http\://services.gradle.org/distributions/gradle-1.9-all.zip and upgraded the gradle version in build.gradle dependencies { classpath 'com.android.tools.build:gradle:0.7.+' } Now my project is building again. I have some String constants defined for different productFlavors: productFlavors { local { buildConfig "public static final String MY_KEY = \"\";

Extract common methods from Gradle build script

烈酒焚心 提交于 2019-12-17 21:43:03
问题 I have a Gradle build script ( build.gradle ), in which I created some tasks. These tasks consist mostly of method calls. The called methods are also in the build script. Now, here's the situation: I am creating a fair amount of build scripts, which contain different tasks, but utilise the same methods from the original script. Thus, I would like to extract these "common methods" in some way, so I can easily re-use them instead of copying them for each new script I create. If Gradle were PHP,

Gradle: specify appropriate repo for dependency

时光毁灭记忆、已成空白 提交于 2019-12-17 21:28:38
问题 I have several repos and a lot of dependencies. It is looks like this in build.gradle: repositories { maven {url "A"} maven {url "B"} } dependencies { compile 'libA' compile 'libB' compile 'libC' } Is there is a way how can I specify that I will download libA from one repo (A) and libB and libC from another repo (B)? 回答1: There is no way to associate a dependency with a repository. The repositories will always be searched in their declared order. 回答2: As of Jan 2019 this is possible. Say you