Posts

Showing posts with the label gradle

Gradle sets incorrect (unexpected?) classpath on running task

Image
Clash Royale CLAN TAG #URR8PPP Gradle sets incorrect (unexpected?) classpath on running task I have my project structured in this way: projectRoot +-src +-main | +-java | | +-package/java files go here | +-resources | +-config | +-files go here +-test +-java | +-package/java files go here +-resources +-config | +-files go here +-features +-files go here When this project is built, it produces the following output structure: projectRoot +-out +-production | +-classes | | +-package/classes in here | +-resources | +-config | +-files in here +-test +-classes | +-package/classes in here +-resources +-config | +-files in here +-features +-files in here This is all...

How to create two applications for each flavor with different assets folders in Gradle?

Image
Clash Royale CLAN TAG #URR8PPP How to create two applications for each flavor with different assets folders in Gradle? Currently I'm working on an application that has 5 flavors and this is the part of my build.gradle files that matters: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.14.0' } } apply plugin: 'com.android.application' repositories { mavenCentral() } android { compileSdkVersion 20 buildToolsVersion '20.0.0' signingConfigs { release { storeFile file("") storePassword "password" keyAlias "alias" keyPassword "password" } } lintOptions { abortOnError false } defaultConfig { minSdkVersion 14 targetSdkVersion 20 applicationId 'application.package' signingConfig signingConfigs.release ...

Gradle Code having Red Line Under the Code and App not Install On Virtual Or Real Device

Image
Clash Royale CLAN TAG #URR8PPP Gradle Code having Red Line Under the Code and App not Install On Virtual Or Real Device I am working on an Android App Until I face a problem that App is not able to install after the successful built and When I open my gradle file It shows a red line under the appcompat Implementation. I am confused how to resolve It since app I am not able to install app on Real Or Virtual Device. Here is Dependancies in Gradle code dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) **implementation 'com.android.support:appcompat-v7:28.0.0-beta01'** implementation 'com.android.support.constraint:constraint-layout:1.1.2' implementation 'com.google.firebase:firebase-auth:11.8.0' implementation 'com.google.firebase:firebase-database:11.8.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.sup...

Error “Program type already present: android.support.design.widget.CoordinatorLayout$Behavior” when adding new libraries

Image
Clash Royale CLAN TAG #URR8PPP Error “Program type already present: android.support.design.widget.CoordinatorLayout$Behavior” when adding new libraries I am getting this error when I am trying to add new libraries to my project and then run my app: Program type already present: android.support.design.widget.CoordinatorLayout$Behavior Following are the libraries I am trying to add implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0' implementation 'com.github.yalantis:ucrop:2.2.2' Here is my app level gradle file apply plugin: 'com.android.application' android { compileSdkVersion 26 defaultConfig { applicationId "com.techxee.adarsh.chatbeta" minSdkVersion 15 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false ...

Failed to resolve: com.google.firebase:firebase-core:16.0.1

Image
Clash Royale CLAN TAG #URR8PPP Failed to resolve: com.google.firebase:firebase-core:16.0.1 I'm trying to add firebase cloud storage to my app. Below is the app build.gradle. But it says: Failed to resolve: com.google.firebase:firebase-core:16.0.1. Why? There is no firebase-core in the dependencies at all. apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "com.louise.udacity.mydict" minSdkVersion 15 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com....

Class not found, Empty test suite in androidTest using Android Studio 3.0.1, Room, Kotlin

Image
Clash Royale CLAN TAG #URR8PPP Class not found, Empty test suite in androidTest using Android Studio 3.0.1, Room, Kotlin I have a problem with running my androidTest. Here is my setup in gradle: apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' android { compileSdkVersion 26 defaultConfig { applicationId "com.blabla.shoppinglistapp" minSdkVersion 17 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } ext.daggerVersion = '2.11' ext.roomVersion = '1.0.0' ext.mockitoVersion = '2.11.0' dependencies { implementation fileTree(dir: 'libs', in...

Configuration with name 'default' not found gradle sync failed

Image
Clash Royale CLAN TAG #URR8PPP Configuration with name 'default' not found gradle sync failed I downloaded OSMonitor app source code from https://github.com/eolwral/OSMonitor But while syncing gradle it failed with this log 2018-07-29 00:01:40,538 [ thread 19] WARN - ect.sync.idea.ProjectSetUpTask - Configuration with name 'default' not found. 2018-07-29 00:01:40,539 [ thread 19] INFO - e.project.sync.GradleSyncState - Gradle sync failed: Configuration with name 'default' not found. Consult IDE log for more details (Help | Show Log) (586ms) 2018-07-29 00:01:40,545 [e-1024-b02] INFO - idea.project.IndexingSuspender - Consuming IndexingSuspender deactivation event: SYNC_FINISHED 2018-07-29 00:01:40,545 [e-1024-b02] INFO - idea.project.IndexingSuspender - Finishing batch update for project: Project 'C:UsersUserStudioProjectsOSMonitor-master' OSMonitor-master 2018-07-29 00:01:40,647 [ thread 19] INFO - #com.jetbrains.cidr.lang - Clearing sym...

Nativescript conflict between two plugins - Android gradle

Image
Clash Royale CLAN TAG #URR8PPP Nativescript conflict between two plugins - Android gradle I use the plugin Firebase (https://github.com/EddyVerbruggen/nativescript-plugin-firebase) and the plugin Wonderpush : https://github.com/wonderpush/wonderpush-nativescript-sdk . But when I try to compile for Android, I get an error : FAILURE: Build failed with an exception. * What went wrong: Failed to capture snapshot of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check. > The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[11.0.4,11.0.4], [15.0.1,15.0.1]], but resolves to 15.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies. I think it's because Firebase plugin uses version 15.0.1 of the library while Wonderpush uses version 11.0.4. How can I fixed this conflict into my project ? (I can't modify these plugins) Thanks ...

Error when generate signed apk

Image
Clash Royale CLAN TAG #URR8PPP Error when generate signed apk I've tried to upload my apk on google play and encountered an error message: "You uploaded a debuggable APK. For security reasons you need to disable debugging before it can be published in Google Play. Learn more about debuggable APKs." Then I wrote android:debuggable="false" in my manifest and tried again. I've encountered the same error, so I"ve seted the build variant from my module to release and generate an apk again, but this, generated this error: android:debuggable="false" Error:Gradle: Execution failed for task ':app:lintVitalRelease'. Lint found fatal errors while assembling a release target. To proceed, either fix the issues identified by lint, or modify your build script as follows: ... android { lintOptions { checkReleaseBuilds false // Or, if you prefer, you can continue to check for errors in release builds, // but c...