Error:(83, 0) Could not find property 'ANDROID_BUILD_SDK_VERSION' on com.android.build.gradle.LibraryExtension_Decorated#103ce86.
What am I missing? I cannot seem to resolve this issue.
**My Build.Gradle **
buildscript {
repositories {
mavenCentral()
mavenLocal()
maven {
name 'maven.aviary.com'
url uri("http://maven.aviary.com/repo/release")
}
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
defaultConfig {
minSdkVersion 10
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), \
'proguard-rules.txt'
}
}
}
allprojects {
repositories {
mavenCentral()
}
}
build.gradle that I am directed to when receiving error
apply plugin: 'android-library'
version aviarySdkVersionName + '.' + aviarySdkVersionCode
repositories {
mavenCentral()
mavenLocal()
maven {
name 'maven.aviary.com'
url uri("http://maven.aviary.com/repo/release")
}
}
ext {
aviarySdkFlavor = "Production"
aviarySdkBuildType = "Release"
aviarySdkVersionCode = "0"
aviarySdkVersionName = "0.0.0"
aviarySdkPackageName = ""
}
task checkVersion << {
if (!VERSION_NAME.equals(aviarySdkVersionName)) {
println "$VERSION_NAME != $aviarySdkVersionName";
throw new InvalidUserDataException("declared field VERSION_NAME must be eq to aviarySdkVersionName");
}
if (!GROUP.equals(aviarySdkPackageName)) {
println "$GROUP != $aviarySdkPackageName";
throw new InvalidUserDataException("field GROUP must be eq to aviarySdkPackageName");
}
}
preBuild.dependsOn(checkVersion)
def all_tasks = gradle.startParameter.getTaskNames()
gradle.startParameter.getTaskNames().each { task ->
println "current task: $task"
for( single_task in all_tasks ) {
if(all_tasks.size() == 1){
println "single_task: $single_task"
if (single_task.contains("Alpha")) {
aviarySdkFlavor = "Alpha"
} else if(single_task.contains("Beta")) {
aviarySdkFlavor = "Beta"
} else if(single_task.contains("Amazon")){
aviarySdkFlavor = "Amazon"
} else {
aviarySdkFlavor = "Production"
}
if(single_task.contains("Debug")){
aviarySdkBuildType = "Debug"
} else {
aviarySdkBuildType = "Release"
}
}
}
Properties props = new Properties()
props.load(new FileInputStream("${rootProject.projectDir}/Aviary-SDK/gradle.properties"))
aviarySdkPackageName = props.aviarySdkPackageName
aviarySdkVersionName = props.aviarySdkVersionName
aviarySdkVersionCode = props.aviarySdkVersionCode
println "****************************************************"
println "* CONFIGURATION"
println "* TASK: $task"
println "* SDK_FLAVOR: $aviarySdkFlavor"
println "* SDK_BUILD TYPE: $aviarySdkBuildType"
println "* aviarySdkPackageName: $aviarySdkPackageName"
println "* aviarySdkVersionName: $aviarySdkVersionName"
println "* aviarySdkVersionCode: $aviarySdkVersionCode"
println "*"
println "****************************************************"
}
android {
compileSdkVersion Integer.parseInt(ANDROID_BUILD_SDK_VERSION)
buildToolsVersion ANDROID_BUILD_TOOLS_VERSION
defaultConfig {
minSdkVersion Integer.parseInt(ANDROID_BUILD_MIN_SDK_VERSION)
targetSdkVersion Integer.parseInt(ANDROID_BUILD_TARGET_SDK_VERSION)
versionCode Integer.parseInt(aviarySdkVersionCode)
versionName VERSION_NAME
applicationId aviarySdkPackageName
buildConfigField "String", "SDK_PACKAGE_NAME", "\"${aviarySdkPackageName}\""
buildConfigField "String", "SDK_VERSION_NAME", "\"${aviarySdkVersionName}\""
buildConfigField "int", "SDK_VERSION_CODE", "${aviarySdkVersionCode}"
buildConfigField "String", "SDK_FLAVOR", "\"${aviarySdkFlavor.toLowerCase()}\""
buildConfigField "String", "SDK_BUILD_TYPE", "\"${aviarySdkBuildType.toLowerCase()}\""
buildConfigField "boolean", "SDK_DEBUG", "${aviarySdkBuildType.toLowerCase().contains('debug')}"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
packagingOptions {
}
}
dependencies {
println "(sdk) finalFlavor: $aviarySdkFlavor - $aviarySdkBuildType"
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.aviary.android.feather.sdk:sdk-library:+'
}
I had the same problem.
What resolved my problem was to define these keys in gradle.properties in the root.
ANDROID_BUILD_TARGET_SDK_VERSION=19
ANDROID_BUILD_TOOLS_VERSION=19.1.0
ANDROID_BUILD_SDK_VERSION=19
ANDROID_BUILD_MIN_SDK_VERSION=10
Related
I got error "java.lang.NullPointerException (no error message)" when build gradle. Here the error detail https://scans.gradle.com/s/elqrorxbkywzy/failure?expanded-stacktrace=WyIwLTEiXQ&focused-exception-line=0-1-0#1. Please help me i got stuck after try this,
I'm already delete .gradle from root project
Already upgrade Grade 6.5.1 to 6.6.1
Already doing gradle clean before gradle build again
capture of error when gradle build
build.gradle
buildscript {
ext.kotlin_plugin_version = '1.4.31'
ext.kotlin_version = '1.7.0'
ext.nav_version = '2.3.3'
repositories {
google()
mavenCentral()
maven {
url "http://developer.huawei.com/repo/"
allowInsecureProtocol = true
}
}
dependencies {
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
// Add the dependency for the Performance Monitoring plugin
classpath 'com.google.firebase:perf-plugin:1.4.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_plugin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
}
}
plugins { id "org.sonarqube" version "3.0" }
allprojects {
repositories {
google()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://jitpack.io" }
maven {
url "http://mobilesdk.useinsider.com/android"
allowInsecureProtocol = true
}
maven {
url "http://developer.huawei.com/repo/"
allowInsecureProtocol = true
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
compileSdkVersion = 31
minSdkVersion = 24
targetSdkVersion = 31
}
app/build.gradle
apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'org.sonarqube'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: "androidx.navigation.safeargs"
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'kotlin-kapt'
sonarqube {
properties {
property "sonar.projectName", "Android Project"
property "sonar.projectKey", "Android-Project"
property "sonar.host.url", "http://localhost:9003"
property "sonar.language", "java"
property "sonar.login", "admin"
property "sonar.password", "12345"
}
}
tasks.withType(Test) {
testLogging {
events "started", "passed", "skipped", "failed"
showStandardStreams = false
}
}
def getProps(path) {
Properties props = new Properties()
props.load(new FileInputStream(file(path)))
return props
}
def version = "6.15.0"
def buildVersion = version
android {
ndkVersion '23.1.7779620'
lintOptions {
checkReleaseBuilds false
abortOnError false
}
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1000000000
versionName buildVersion
multiDexEnabled true
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [auth0Domain:
"#string/com_auth0_domain", auth0Scheme:
"#string/com_auth0_scheme", partner:
"#string/insider_partnerName"]
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
}
resConfigs "en", "in"
println("generating configuration from config allvariant properties")
getProps('./config/allvariant.props').each { p ->
if (p.key.startsWith("buildConfig")) {
buildConfigField 'String', p.key.replace("buildConfig.", ""), p.value
} else if (p.key.startsWith("resValue")) {
resValue 'string', p.key.replace("resValue.", ""), p.value
}
}
buildConfigField("String", "CONSUMER_KEY", "\"DNAIMMSP\"")
}
flavorDimensions "pack"
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
buildTypes {
debug {
buildConfigField "String", "HEADER_ORIGIN_VALUE", '"file://"'
buildConfigField "String", "HEADER_CHANNELID_VALUE", '"UX"'
buildConfigField 'boolean', 'ENABLE_CRASHLYTICS', 'true'
buildConfigField "String", "HEADER_X_REQUESTED_VALUE", '"com.android.native"'
buildConfigField 'String', "APP_VERSION", '"' + version + '"'
resValue 'string', 'appVersion', buildVersion + '-DEBUG'
}
release {
ndk.debugSymbolLevel = 'FULL'
firebaseCrashlytics {
nativeSymbolUploadEnabled true
}
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField "String", "HEADER_ORIGIN_VALUE", '"file://"'
buildConfigField "String", "HEADER_CHANNELID_VALUE", '"UX"'
buildConfigField 'boolean', 'ENABLE_CRASHLYTICS', 'true'
buildConfigField "String", "HEADER_X_REQUESTED_VALUE", '"com.android.native"'
buildConfigField 'String', "APP_VERSION", '"' + version + '"'
resValue 'string', 'appVersion', buildVersion
}
}
externalNativeBuild {
cmake.path = "src/main/c/CMakeLists.txt"
cmake.version = "3.10.2.4988404"
}
testOptions {
unitTests.returnDefaultValues = true
}
buildFeatures {
viewBinding true
dataBinding true
}
bundle.language.enableSplit = false
}
repositories {
maven {
url "https://delivery.v3d.fr/nexus/content/repositories/v3d_releases/"
credentials {
username 'telkomsel'
password 'AGUXSdN43GOxwJbWJ2t9'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
productionReleaseImplementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation "androidx.annotation:annotation:1.2.0"
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test:rules:1.3.0'
androidTestImplementation 'org.mockito:mockito-android:3.5.10'
androidTestImplementation "androidx.arch.core:coretesting:2.1.0"
}
gradle.properties
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xms2048m -Xmx4096m -XX:+UseParallelGC
authToken=jp_8b181o9eakb3ejb6h07eg1isgr
# gradle.properties
systemProp.sonar.host.url=http://localhost:9003
systemProp.sonar.projectKey=android-native
# Token generated from an account with 'publish analysis' permission
systemProp.sonar.login=wefwefwe32425sdgedrgrdgredw342qqdeeq
# Native libs for aab
android.bundle.enableUncompressedNativeLibs=false
#android.useDeprecatedNdk=true
I am trying to debug my error with Proguard. My project is working fine with debug but not with Proguard. Any help will be appreciated.
I have tried with ignore warning in Proguard. However application is crashing with generated APK.
Current Proguard settings is not working. Messages console I have uploaded to Gist
Build.gradle is given below
Prodguard-project.txt in gist
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
}
}
build.gradle
apply plugin: 'com.android.application'
apply from: rootProject.file('gradle/codequality.gradle')
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
versionCode 49
versionName "1.8.8"
minSdkVersion 14
targetSdkVersion 22
buildConfigField 'String', 'BUILD_TAG', '"' + getBuildTag() + '"'
buildConfigField 'String', 'OWM_API_KEY', '"' + getOpenWeatherMapApiKey() + '"'
buildConfigField 'boolean', 'ENABLE_WEATHER', 'true'
def buildSuffix = getBuildSuffix(versionName, versionCode)
applicationVariants.all { variant ->
def file = variant.outputs[0].outputFile
variant.outputs[0].outputFile = new File(file.parent, file.name.replace(".apk", "-" + buildSuffix + ".apk"))
}
}
if (project.hasProperty('signingKeyStoreFile')) {
signingConfigs {
release {
storeFile file(signingKeyStoreFile)
storePassword signingKeyStorePassword
keyAlias signingKeyAlias
keyPassword signingKeyPassword
}
}
}
buildTypes {
release {
minifyEnabled true
proguardFile 'proguard-project.txt'
if (project.hasProperty('signingKeyStoreFile')) {
signingConfig signingConfigs.release
}
}
}
lintOptions {
abortOnError false
checkReleaseBuilds false
disable 'MissingTranslation'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
def getBuildSuffix(versionName, versionCode) {
def suffix = versionName + '-' + versionCode
if (System.getenv()['BUILD_NUMBER'] != null) {
suffix += '-b' + System.getenv()['BUILD_NUMBER']
}
return suffix
}
def getBuildTag() {
def tag = ''
if (System.getenv()['BUILD_NUMBER'] != null) {
tag += 'b' + System.getenv()['BUILD_NUMBER']
} else {
tag += 'l'
}
tag += '#' + new Date().format('yyyyMMdd')
return tag
}
def getOpenWeatherMapApiKey() {
if (project.hasProperty('owmApiKey')) {
return owmApiKey
} else {
def apiKeyFile = file('default_owm_api_key');
if (apiKeyFile.isFile()) {
return apiKeyFile.text.trim()
}
}
return 'NOKEY'
}
///////////////////////////////////////////////////
// Dependencies
repositories {
mavenCentral()
}
dependencies {
//compile 'com.actionbarsherlock:actionbarsherlock:4.4.0#aar'
//compile 'com.android.support:support-v4:19.1.0'
compile 'com.google.code.gson:gson:2.3.1'
compile 'net.danlew:android.joda:2.9.4.1'
compile 'com.google.android.gms:play-services-ads:9.8.0'
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
}
configurations {
all*.exclude group: 'com.google.firebase', module: 'firebase-core'
all*.exclude group: 'com.google.firebase', module: 'firebase-iid'
}
///////////////////////////////////////////////////
// Checkstyle
task checkstyleDebug(type: Checkstyle, dependsOn: 'compileDebugSources') {
source = fileTree('src/main/java/')
classpath = files('build/intermediates/classes/debug')
}
check.dependsOn checkstyleDebug
///////////////////////////////////////////////////
// Findbugs
task findbugsDebug(type: FindBugs, dependsOn: 'compileDebugSources') {
source = fileTree('src/main/java/')
classes = fileTree('build/intermediates/classes/debug')
classpath = files() // empty classpath!
effort = 'max'
excludeFilter = rootProject.file('config/findbugs/androidExcludeFilter.xml')
}
check.dependsOn findbugsDebug
///////////////////////////////////////////////////
// PMD
task pmd(type: Pmd) {
source = fileTree('src/main/java/')
ruleSets = ['java-basic', 'java-braces', 'java-android']
}
check.dependsOn 'pmd'
Try to add getDefaultProguardFile('proguard-android.txt') to the proguardFile 'proguard-project.txt', to get next row:
proguardFile getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
Or start to search the issues from your proguard-project.txt, like:
Add rule -keepattributes SourceFile,LineNumberTable,InnerClasses,Signature,Exceptions
Add rule -dontwarn com.google.**
And so on, by your proguard failed logs
The res/raw and res/xml resources are not included to aar files, the raw folder contains keep.xml and the xml folder contains backup_rules.xml. None of them are included in aar files, the raw and xml folder is empty in extracted aar file.
How should I include them into aar output?
Update 1, add gradle project and library gradle files.
Project gradle file
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'com.google.gms:google-services:4.0.1'
}
}
def versionMajor = 4
def versionMinor = 0
def versionPatch = 1
def versionBuild = 0
allprojects {
repositories {
jcenter()
google()
}
project.version = "${versionMajor}.${versionMinor}.${versionPatch}"
}
ext {
configCompileMinSdkVersion = 14
configCompileSdkVersion = 28
configTargetSdkVersion = 28
configVersionCode = versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Library gradle file
apply plugin: 'com.android.library'
android {
lintOptions {
abortOnError false
}
compileSdkVersion configCompileSdkVersion
defaultConfig {
defaultPublishConfig 'release'
publishNonDefault true
minSdkVersion configCompileMinSdkVersion
targetSdkVersion configTargetSdkVersion
versionCode configVersionCode
versionName project.version
consumerProguardFiles 'proguard-rules.pro'
project.archivesBaseName = "my_sdk"
project.version = android.defaultConfig.versionName
}
buildTypes {
debug {
debuggable true
versionNameSuffix '-debug'
buildConfigField("String", "SDK_TYPE", "\"android\"" )
}
release {
versionNameSuffix 'release'
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
buildConfigField("String", "SDK_TYPE", "\"android\"" )
}
unity {
versionNameSuffix 'unity'
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
buildConfigField("String", "SDK_TYPE", "\"unity\"" )
}
}
libraryVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.aar')) {
def f = outputFile.name.replace(".aar", "")
if(f != null && f.contains("release")) {
f = f.replace("-release", "")
}
def fileName = "${f}-${version}.aar"
fileName = fileName.replace("_", "-")
output.outputFileName = new File("release", fileName)
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation "com.google.android.gms:play-services-gcm:16.0.0"
implementation 'android.arch.work:work-runtime:1.0.0-alpha08'
}
Update 2, add project structure.
This is the full error:
Error:Execution failed for task ':app:transformClassesWithMultidexlistForPrpDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.android.multidex.ClassReferenceListBuilder with arguments {/Users/user/Documents/Repositories/secret/secret/app/build/intermediates/multi-dex/prp/debug/componentClasses.jar /Users/user/Documents/Repositories/secret/secret/app/build/intermediates/transforms/jarMerging/prp/debug/jars/1/1f/combined.jar}
I have added a library to my gradle build (https://github.com/signalr4j/signalr4j). Since that the project compiles and builds but once I press run I receive that error. Please note that the library is implemented and recognized well.
This is the full gradle code:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.25.0'
}
}
apply plugin: 'org.greenrobot.greendao'
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'newrelic'
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://maven.google.com' }
maven { url 'https://jitpack.io' }
}
greendao {
schemaVersion 1
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
//
// Setting the heap size the largest size possible.
dexOptions {
javaMaxHeapSize "4g"
jumboMode true
}
defaultConfig {
applicationId "secret.app.com"
minSdkVersion 19
targetSdkVersion 25
versionCode 665
versionName "1.7.0.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled = true
}
productFlavors {
prp {
buildConfigField 'String', 'ORGANIC_GATEWAY', '""'
}
production {
buildConfigField 'String', 'ORGANIC_GATEWAY', '""'
}
myapp {
buildConfigField 'String', 'ORGANIC_GATEWAY', '"X"'
}
mumayi {
buildConfigField 'String', 'ORGANIC_GATEWAY', '"Y"'
}
zhushou_360 {
buildConfigField 'String', 'ORGANIC_GATEWAY', '"J"'
}
zhushou_sogou {
buildConfigField 'String', 'ORGANIC_GATEWAY', '"Z"'
}
directlink {
buildConfigField 'String', 'ORGANIC_GATEWAY', '"A"'
}
letv {
buildConfigField 'String', 'ORGANIC_GATEWAY', '"B"'
}
xiaomi {
buildConfigField 'String', 'ORGANIC_GATEWAY', '"C"'
}
}
applicationVariants.all { variant ->
//
// Application variable instantiation code
if (variant.productFlavors[0].name == "prp") {
buildConfigField 'boolean', 'isInDebugMode', 'true'
buildConfigField 'boolean', 'shouldShowLoginShortcut', 'true'
} else {
buildConfigField 'boolean', 'isInDebugMode', 'false'
buildConfigField 'boolean', 'shouldShowLoginShortcut', 'false'
}
//
// Application naming code
variant.outputs.each { output ->
def project = "Secret"
def separator = "_"
def flavor = variant.productFlavors[0].name
def version = variant.versionName
def versionBuildNumber = variant.versionCode
def buildName = variant.getBuildType().name
if (flavor == "production" && buildName == "release") {
flavor = "PlayStore"
}
def newApkName =
project +
separator +
version + "(" + versionBuildNumber + ")" +
separator +
flavor + "(" + buildName + ")" +
".apk"
output.outputFile = new File(output.outputFile.parent, newApkName)
}
}
}
ext.googleLibraryVersion = '25.4.0'
ext.firebaseAndPlayServicesLibraryVersion = '11.8.0'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true
}
compile 'com.android.support:multidex:1.0.1'
compile "com.android.support:appcompat-v7:$googleLibraryVersion"
compile "com.android.support:recyclerview-v7:$googleLibraryVersion"
compile "com.android.support:support-v4:$googleLibraryVersion"
compile "com.android.support:design:$googleLibraryVersion"
compile "com.android.support:gridlayout-v7:$googleLibraryVersion"
compile "com.android.support:support-annotations:$googleLibraryVersion"
compile "com.google.firebase:firebase-core:$firebaseAndPlayServicesLibraryVersion"
compile "com.google.firebase:firebase-messaging:$firebaseAndPlayServicesLibraryVersion"
compile 'me.pushy:sdk:1.0.28'
compile "com.google.android.gms:play-services-gcm:$firebaseAndPlayServicesLibraryVersion"
compile "com.google.android.gms:play-services-analytics:$firebaseAndPlayServicesLibraryVersion"
compile 'com.appsflyer:af-android-sdk:4.7.1'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.newrelic.agent.android:android-agent:5.13.0'
compile 'org.greenrobot:greendao:3.2.2'
compile 'at.wirecube:additive_animations:1.5.0'
compile 'com.github.tsurkis:timdicator:1.1.0'
compile 'com.github.signalr4j:signalr4j:2.0.1'
}
apply plugin: 'com.google.gms.google-services'
This is the general gradle file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.0.0'
classpath "com.newrelic.agent.android:agent-gradle-plugin:5.13.0"
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I have browsed the internet for half a day and none of the answers fit. Could the library be flawed?
I'm having trouble with building a debuggable apk. I'm using Android Studio 0.5.4/0.5.5 and Gradle 1.11 Gradle plugin 0.9.+ and somehow the debug apk doesn't show any logcat messages with the package name anymore. I tried many different things uninstall everything Android studio/AndroidSDK. and clean installing it again, also deleted all home folder .gradle .androidstudiopreview and nothing helped. When I created a new project in android studio and follow the wizard for creating an activity everything seems fine the app is debuggable and shows normal logging output in logcat. Also when I want to selected the process for debug, Android Studio can't find it as a debuggable process. Anyone know how to fix this or what is wrong in my build.gradle file
the output from log messages is like this now:
04-15 14:09:11.066 21202-21202/? D/Tag﹕ test tag and debug messages
04-15 14:09:11.066 21202-21202/? I/Tag﹕ test tag and info messages
04-15 14:09:11.066 21202-21202/? W/Tag﹕ test tag and warn messages
04-15 14:09:11.066 21202-21202/? E/Tag﹕ test tag and error messages
04-15 14:09:11.076 21202-21202/? D/Tag﹕ is debuggable: true
build.gradle:
buildscript {
repositories {
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
}
}
apply plugin: 'android'
apply plugin: 'crashlytics'
def gitSha() {
return 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
}
def buildTime() {
return new Date().format("yyyy-MM-dd'T'HH:mm'Z'", TimeZone.getTimeZone("UTC"))
}
def isTravis = "true".equals(System.getenv("TRAVIS"))
def preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))
android {
final GITSHA = "${gitSha()}";
final BUILD_TIME = "${buildTime()}";
final YOUTUBE_DEV_API = "AIzaSyD0kNRnV_Il6bYx5ekWUzPWNt9XDQIPxvg"
compileSdkVersion 19
buildToolsVersion '19.0.3'
dexOptions {
// Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
preDexLibraries = preDexEnabled && !isTravis
}
defaultConfig {
packageName "com.test"
minSdkVersion 9
targetSdkVersion 19
versionCode Integer.parseInt(VERSION_CODE)
versionName VERSION_NAME
buildConfigField "String", "GIT_SHA", "\"${GITSHA}\""
buildConfigField "String", "BUILD_TIME", "\"${BUILD_TIME}\""
testPackageName "com.whosampled.test"
testInstrumentationRunner "android.test.InstrumentationTestRunner"
testFunctionalTest true
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
signingConfigs {
debug {
storeFile file("../test.keystore")
storePassword "#2U3aD+2ASwayEwa"
keyAlias "debug"
keyPassword "gu*W5cUkUM-&5bre"
}
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
debuggable false
jniDebugBuild false
zipAlign true
buildConfigField "String", "YOUTUBE_API", "\"${YOUTUBE_DEV_API}\""
}
debug {
signingConfig signingConfigs.debug
debuggable true
jniDebugBuild true
runProguard false
zipAlign false
packageNameSuffix ".debug"
versionNameSuffix "-" + GITSHA + "-debug"
buildConfigField "String", "YOUTUBE_API", "\"${YOUTUBE_DEV_API}\""
}
android.applicationVariants.all { variant ->
println "*********" + variant.getVariantData().getVariantConfiguration().getBuildType().isDebuggable() + "**********";
}
if (false) {
// change apk off build variant.
android.applicationVariants.all { variant ->
println "*********" + variant.description + "**********";
def variants = variant.baseName.split("-");
variant.buildType
def apkName = "whosampled-";
apkName += variants[0];
apkName += "-v" + android.defaultConfig.versionName;
apkName += "-" + GITSHA;
if (!variant.zipAlign) {
apkName += "-unaligned";
}
// if created by build server or something
if (false && variant.buildType.name == "release") {
apkName += "-RELEASE.apk";
} else if (false && variant.buildType.name == "debug") {
apkName += "-SNAPSHOT.apk";
} else {
apkName += ".apk";
}
println "*********" + "$project.buildDir/apk/" + apkName + "**********";
variant.outputFile = file("$project.buildDir/apk/" + apkName)
}
}
}
}
repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/groups/public/' }
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
compile 'com.android.support:support-v4:19.0.1'
compile 'com.android.support:appcompat-v7:19.0.1'
compile 'com.squareup.retrofit:retrofit:1.5.0'
compile 'com.squareup.picasso:picasso:2.2.0'
compile 'com.squareup.okhttp:okhttp:1.5.3'
compile 'com.pixplicity.easyprefs:library:1.0#aar'
compile 'com.crashlytics.android:crashlytics:1.+'
compile 'se.emilsjolander:stickylistheaders:2.3.0'
compile 'com.squareup:otto:1.3.4'
compile 'com.pixplicity:font.text.utils.library:1.2#aar'
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile 'com.squareup:fest-android:1.0.+'
}