android-gradle

How to run android studio first time when i'm offline?

拈花ヽ惹草 提交于 2019-11-29 07:27:33
I have no internet connection. I want to use android studio but it gives me Gradle sync errors every time I try to use it. Is there a way to run android studio without internet? Note that I have SDK and JDK running well. My java codes are not resolved too. Download the latest gradle file from here . Then in your Android Studio goto File->Settings->Build,Execution,...->Build Tools->Gradle. Then In the right side Check the "Use local gradle distribution" and then set the downloaded file as your gradle home. Below, in the Global gradle settings check the Offline Work option.->Click Ok. DONE But

Android Gradle product Flavors with Parse Push Notifications

帅比萌擦擦* 提交于 2019-11-29 07:26:48
I am trying to send Push notifications via Parse and integrating product flavors. When I implement product flavors, i am not able to receive Parse Push Notifications. Does anyone have any advise on correcting this issue Gradle app file: apply plugin: 'com.android.application' android { compileSdkVersion 19 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.example.project" minSdkVersion 16 targetSdkVersion 21 } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } productFlavors{ freeApp{ applicationId "com

getting error while try to generate signed APK android studio 3

Deadly 提交于 2019-11-29 07:21:53
I am getting the following error when try to generate signed APK in android studio 3 Error:trouble processing "javax/xml/namespace/QName.class": Error:Ill-advised or mistaken usage of a core class (java.* or javax.*) Error:when not building a core library. Error:This is often due to inadvertently including a core library file Error:in your application's project, when using an IDE (such as Error:Eclipse). If you are sure you're not intentionally defining a Error:core class, then this is the most likely explanation of what's Error:going on. Error:However, you might actually be trying to define a

Can I exclude regional resources (e.g. values-fr) when building a particular Android Product Flavor with gradle

好久不见. 提交于 2019-11-29 07:03:48
Say I have this directory structure: app --src |--main | |--java | |--res | |--drawable | |--values | |--values-fr | |--values-de | |--flavor1 | |--res | |--drawable | |--flavor2 | |--res | |--drawable | |--flavor3 |--res |--drawable values-fr is common for both flavor1 and flavor2 , and so values , values-fr and values-de should get packaged flavor3 should only package values and values-de . So I need to exclude the values-fr resource folder from the flavor3 only. I've tried loads of combinations such as those below, but cannot figure it out, or even if it's possible. sourceSets { flavor3 {

Different drawable based on build variant in Gradle

非 Y 不嫁゛ 提交于 2019-11-29 06:59:34
I have two flavors in my gradle file: flavor1 and flavor2. Along with the build types, they create the following build variants: flavor1-debug flavor1-release flavor2-debug flavor2-debug Assuming I want to have a different drawable for each variant, where should I put it? My folder structure is src |__ main |__ flavor1 |__ flavor2 |__ debug |__ release I am aware, according to this that All resources (Android res and assets) are used using overlay priority where the Build Type overrides the Product Flavor, which overrides the main sourceSet. This means however that if I put it in the Build

How do I use the latest support library (Getting failed to resolve error with support library 26.0.2 and compileSDKVersion 26)? [duplicate]

痴心易碎 提交于 2019-11-29 06:52:04
This question already has an answer here: Failed to resolve: com.android.support:appcompat-v7:26.0.0 11 answers I have updated my compileSdkVersion to 26. This is how my gradle file looks now. apply plugin: 'com.android.application' android { compileSdkVersion 26 buildToolsVersion "26.0.0" defaultConfig { applicationId ############## minSdkVersion 21 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard

android project: process finished with non-zero exit value 2

狂风中的少年 提交于 2019-11-29 06:44:29
I'm unable to compile my android project. Google and other SO posts tell me it (probably) has something to do with dependencies, but I can't find where. Here's the error: Error:Gradle: Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 2 and my gradle file: apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.example.skate

Android:Which one to use for package name? Manifest's packagename or Gradle applicationId?

a 夏天 提交于 2019-11-29 06:00:55
I am using Android Studio version 2.1.2 , and I am trying to implement Google Cloud Messaging to my app. To be able to do that I have to obtain a Google Services json file(configuration file) to add to my project. For getting this file from Google Api console panel, I am required to provide my app name and my app's package name . And here is where my problem starts. In my app, package name in Manifest file is different than the applicationId in the application level build.gradle file . And On google play store, the applicationId is being used. To Illustrate what I mean, In my Manifest file;

How does the new applicationId in build.gradle work?

早过忘川 提交于 2019-11-29 05:32:52
Google released version 0.11 of the Android Gradle plugin. The release notes contains the following: One of the user visible changes in 0.11 is that we've deprecated the packageName and packageNameSuffix settings, and have renamed them to applicationId and applicationIdSuffix. The purpose of this is to make it clear that this application id is decoupled from package declarations in your manifest, and in particular, the R class and the BuildConfig class, and all the implementation classes inside your app, can be renamed and refactored freely; you just need to keep applicationId the same. If you

Android Studio Suddenly started to display unable to resolve com.android.support…25.0.0 error messages and all of my java files are erroneous now?

纵饮孤独 提交于 2019-11-29 05:32:21
My project was working very fine, but until one day, when I uploaded my project to github. I don't know if this issue is related to that but today when I compiled my android studio project, it started showing me these 4 horrible errors. I have tried most of the google results but no help! Error:Failed to resolve: com.android.support:cardview-v7:25.0.0 Error:Failed to resolve: com.android.support:customtabs:25.0.0 Error:Failed to resolve: com.android.support:appcompat-v7:25.0.0 Error:Failed to resolve: com.android.support:support-v4:25.0.0 This is the screenshot of android studio screen if it