build.gradle

Cannot resolve com.google.android.gcm.GCMBaseIntentService; Android studio

拟墨画扇 提交于 2020-01-01 16:38:13
问题 Edit: I solved this problem:) Cause of this error : In the tutorial Implementing GCM Client , there was link to download full source code for demo. Downloaded for reference , added google_play_service library in build.gradle. Did some recommended changes like SENDER_ID,SERVER_URL,.. etc Synch the project with gradle and got this error. How I solved! After lot of google I found that this class is not in google_play_service library but it is in gcm.jar which is deprecated now. I dont know why

gradle: Could not find com.android.support:multidex:1.0.1

狂风中的少年 提交于 2020-01-01 09:31:59
问题 when I use gradle(version 2.1 or 2.4) building Android Project, get the error below. I can not find com.android.support:multidex:1.0.1 in my files. ERRORS: config is set to BF688C717A5C3A69FE8CA522643C0A68 config is set to PRODUCT vcode is set to 151 vname is set to 1.5.1 FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':XXXX'. Could not resolve all dependencies for configuration ':yizhangtong:_rendepeng_lmDebugCompile'. Could not find com

gradle fails on using flutter in Android Studio

此生再无相见时 提交于 2020-01-01 09:20:12
问题 I'm a newbie to both Android Studio and Flutter. I recently wanted to try Flutter and hence installed the plugin in Android Studio. My Flutter code has no bugs, but the gradle fails. app level build gradle: def localProperties = new Properties() //here, Properties gets highlighted as error def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } } def flutterRoot =

Gradle badass-runtime-plugin and ProGuard Gradle Plugin

守給你的承諾、 提交于 2020-01-01 09:11:19
问题 How to run proguard before jPackage? Introduction Im developing an app in JavaFx using gradle plugins and packaging it with jPackager, also using the gradle plugins. The main plugins im using are: id 'org.openjfx.javafxplugin' version '0.0.8' id 'org.beryx.runtime' version '1.7.0' id "com.github.johnrengelman.shadow" version "5.1.0" My current gradle version is: gradle-5.6.2-all Problem description How do I use proguard so the code gets obfuscated and optimized before jPackage do its job? I

Gradle badass-runtime-plugin and ProGuard Gradle Plugin

帅比萌擦擦* 提交于 2020-01-01 09:11:10
问题 How to run proguard before jPackage? Introduction Im developing an app in JavaFx using gradle plugins and packaging it with jPackager, also using the gradle plugins. The main plugins im using are: id 'org.openjfx.javafxplugin' version '0.0.8' id 'org.beryx.runtime' version '1.7.0' id "com.github.johnrengelman.shadow" version "5.1.0" My current gradle version is: gradle-5.6.2-all Problem description How do I use proguard so the code gets obfuscated and optimized before jPackage do its job? I

Cannot resolve method “checkSelfPermission”

房东的猫 提交于 2020-01-01 05:50:14
问题 I am getting the error in the below code: if (ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) { } The "checkSelfPermission" is always red indicating some kind of error. I have imported "import android.support.v4.content.ContextCompat;" already. The below is my build.gradle content: apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { applicationId "com.xyz.user

Android Studio 2.3.1 - editing build.gradle file causes IDE to freeze for 20 seconds (or more)

倖福魔咒の 提交于 2020-01-01 04:59:05
问题 The past few days, I've experienced some unusual problems in Android Studio 2.3.1; the IDE freezes whenever I edit the build.gradle (module) file. My Project-level gradle settings are Use default gradle wrapper (recommended) gradle-wrapper.properties is as follows: distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip My local Gradle version

Downloading Dependences From Private Amazon S3 Repository with Gradle

♀尐吖头ヾ 提交于 2020-01-01 04:55:09
问题 I am looking to add Groovy support to an existing java project so that I can seemlessly compile mixed Java and Groovy code using invokedynamic so that I can get Java-like execution speed without needing to waste excessive amounts of time with verbose Java syntax After reading that the gmaven plugin no longer supports compilation -and that the groovy eclipse compiler plugin doesn't yet support invokedynamic, I asked myself, why would I want to continue using Maven if it compiles Groovy code

How to read a json file into build.gradle and use the values the strings in build.gradle file

痴心易碎 提交于 2020-01-01 04:50:42
问题 for example, read the json file in build.gradle and use the json values as strings in the file { "type":"xyz", "properties": { "foo": { "type": "pqr" }, "bar": { "type": "abc" }, "baz": { "type": "lmo" } } } I need to call properties.bar.type and abc should be replaced there. I need to convert these values to string and use in build.gradle file 回答1: From Gradle you can execute any Groovy code and Groovy already has build-in JSON parsers. E.g. you can use a task that will print your value into

Android gradle: Sharing dependencies between product flavors

陌路散爱 提交于 2019-12-31 04:01:10
问题 I have 3 product flavors (flavor1, flavor2, flavor3) in my app. flavor1 and flavor2 share some of the dependencies related to ads. Is there a way to bundle the ad related dependencies to a gradle dimension or configuration and add that to flavor1 and flavor2 without duplicating the compileFlavor1 and compileFlavor2 lines in my build.gradle? This is part of my current gradle. This works. But, I'm wondering if there is a better way to do this? So, I don't have to repeat the ad dependencies for