Android Studio gives me BuildConfig Error - java

If i tap the Debug Icon, Android Studio sometimes automatically creates new BuildConfig files and then complains that it should be only one named Buildconfig.java...
A Clean Project fixes it but it is so annoying that there must be a reliable solution.
Thanks in advance
EDIT:
My build.gradle file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
My build.gradle(Module: app):
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "de.my.app.id"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
// To inline the bytecode built with JVM target 1.8 into
// bytecode that is being built with JVM target 1.6. (e.g. navArgs)
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.navigation:navigation-fragment:2.2.2'
implementation 'androidx.navigation:navigation-ui:2.2.2'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.2.2'
implementation 'androidx.navigation:navigation-ui-ktx:2.2.2'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.github.siyamed:android-shape-imageview:0.9.3#aar'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.github.RobertApikyan:SegmentedControl:1.2.0'
implementation 'androidx.viewpager2:viewpager2:1.0.0'
implementation 'com.h6ah4i.android.materialshadowninepatch:materialshadowninepatch:1.0.0'
}
EDIT:
I get this error warning in my console when i build & debug:
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings

Try following ways in order of listing:
Select Make Project from Build menu.
Go to File menu and select Invalidate Cache/restart.
Change the distributionUrl in gradle-wrapper.properties to some other versions (higher one preferred).
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
Update Android studio.

Related

Problem Specifying Jetpack Room Schema Location

I'm in the process of converting my android app from using simple file IO to using a proper database, so I've been going through the tutorials for Android Jetpack's Room. I'm having problems trying to specify the room.schemaLocation argument. My build.gradle file looks like this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 31
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.austinweaver.myapp"
minSdkVersion 16
targetSdkVersion 31
multiDexEnabled true
versionCode 13
versionName "2.4.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
* javaCompileOptions {
* annotationProcessorOptions {
* arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
* }
* }
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'com.google.android.gms:play-services-auth:20.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.google.android.gms:play-services-ads:20.5.0'
implementation 'com.android.support:multidex:1.0.3'
implementation ('io.socket:socket.io-client:2.0.0') {
exclude group: 'org.json', module: 'json'
}
implementation "androidx.room:room-runtime:2.4.0"
annotationProcessor "androidx.room:room-compiler:2.4.0"
androidTestImplementation "androidx.room:room-testing:2.4.0"
}
The block marked with the *s is the issue: without it, my app runs fine but tells me to specify the room.schemaLocation. With that block, the gradle sync works but then the app build fails with the following message:
Unable to find method 'java.nio.file.Path.of(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;'
java.nio.file.Path.of(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
I've tried restarting Android Studio and tried some scattered solutions I found by trying to google the error message, but all the relevant things I found were deprecated or didn't work.
Let me know if there's any information I should have included here, because I'm not sure what else in my project even relates to this. Thanks for any help!
Edit: my project-level build.gradle:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.google.gms:google-services:4.3.10'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

Error Installing Google Maps SDK Beta 3.1.0 Could not filnd :places-map-sdk-3.1.0-beta:

I am attempting to install the Google Maps SDK and decided to use the current beta version. I have followed all the installation instructions, but am getting the following error when rebuilding the project.
Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find :places-maps-sdk-3.1.0-beta:.
Required by:
project :app
The installation downloaded file places-maps-sdk-3.1.0-beta.aar has been placed in the projects app\libs folder.
[![enter image description here][1]][1]
Attached is my project level gradle build
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.grgapps.checkingin"
minSdkVersion 26
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
customDebugType {
debuggable true
}
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.navigation:navigation-fragment:2.3.1'
implementation 'androidx.navigation:navigation-ui:2.3.1'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.google.android.gms:play-services-ads:19.5.0'
implementation 'com.google.firebase:firebase-ads:19.5.0'
implementation 'androidx.work:work-runtime:2.5.0-beta01'
implementation 'androidx.preference:preference:1.1.1'
//implementation 'com.google.android.gms:play-services-maps:17.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation "androidx.viewpager2:viewpager2:1.0.0"
implementation 'com.google.firebase:firebase-analytics:18.0.0'
implementation "com.google.firebase:firebase-messaging:21.0.0"
implementation 'com.google.android.libraries.maps:maps:3.1.0-beta'
// If you are using Places, add all of the dependencies below
implementation name:'places-maps-sdk-3.1.0-beta', ext:'aar'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
implementation 'com.google.auto.value:auto-value-annotations:1.6.5'
implementation 'com.google.maps.android:android-maps-utils-v3:2.2.0'
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
implementation('com.mikepenz:materialdrawer:5.9.5#aar') {
transitive = true
exclude group: 'com.android.support'
}
// Room components
implementation "androidx.room:room-runtime:2.2.5"
annotationProcessor "androidx.room:room-compiler:2.2.5"
androidTestImplementation "androidx.room:room-testing:2.2.5"
// Lifecycle components
implementation "androidx.lifecycle:lifecycle-extensions:$rootProject.archLifecycleVersion"
annotationProcessor "androidx.lifecycle:lifecycle-compiler:$rootProject.archLifecycleVersion"
// UI
implementation "com.google.android.material:material:1.2.1"
// Testing
androidTestImplementation "androidx.arch.core:core-testing:$rootProject.coreTestingVersion"
}
The following is my top level build gradle file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
flatDir {
dirs 'libs'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.google.gms:google-services:4.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
roomVersion = '2.2.5'
archLifecycleVersion = '2.2.0-rc03'
coreTestingVersion = '2.1.0'
materialVersion = '1.2.1'
}
I found that instead of using the line they have in their documentation for the build.gradle file:
implementation name:'places-maps-sdk-3.1.0-beta', ext:'aar'
If I use this line, it syncs up fine:
implementation group: 'com.google.android.libraries.maps', name: 'maps', version: '3.1.0-beta'
I am FAR from a Gradle expert, so I am not quite sure what the differences here are - but after changing over imports and all, my app built and seemed to operate fine.

ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version while iintegrating onesignal

I tried to implement oneSignal into my apps but I got error that said
ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[10.2.
1, 16.0.99]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.onesignal:OneSignal:3.12.3 -> com.google.android.gms:play-services-location#[10.2.1, 16.0.99], b
ut play-services-location version was 15.0.1.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.android.gms:play-services-location#{strictly 15.0.1}
-- Project 'app' depends onto com.onesignal:OneSignal#{strictly 3.12.3}
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
here is my gradle class
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/'}
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.4, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url 'https://maven.google.com' }
}
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.gerobokgo"
minSdkVersion 26
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.Test.runner.AndroidJUnitRunner"
manifestPlaceholders = [
onesignal_app_id: '560003c8-bceb-4896-bf78-435948f4fc6d',
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: 'REMOTE'
]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-database:16.0.4'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.firebaseui:firebase-ui-database:4.3.2'
implementation 'com.google.firebase:firebase-storage:16.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
//Layout
implementation 'com.google.android.material:material:1.0.0'
//recylervieer
implementation 'androidx.recyclerview:recyclerview:1.0.0'
// image slider
implementation 'com.github.therealshabi:AutoImageFlipper:v1.4.1'
//image Cropper
implementation 'com.theartofdev.edmodo:android-image-cropper:2.1.+'
implementation 'androidx.work:work-runtime:2.2.0'
implementation 'com.braintreepayments:card-form:3.1.1'
//onesignal
implementation 'com.onesignal:OneSignal:[3.11.2, 3.99.99]'
}
I had the same problem in a Kotlin project here, the solution was to add implementation 'androidx.fragment:fragment-ktx:1.2.2' dependency to my module's build.gradle file.
I have solved the problems.
repositories {
maven { url 'https://plugins.gradle.org/m2/'}
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.4, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url 'https://maven.google.com' }
}
just put these code on the top and sync it
For those who are using react-native version 0.60 or above one signal and intervase firebase module makes same problem. As #last gg post above,
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.1, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
copy this very top of your android/app/build.gradle file. Then rebuild your android app.
This Worked For Me
//Add One Signal Plugin At the TOP before Google GSM Plugin
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
//Add this after Plugin
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.1, 0.99.99]'
}
}
android {
compileSdkVersion 29
buildToolsVersion "29.0.1"
defaultConfig {
applicationId "com.example.example"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
android {
defaultConfig {
manifestPlaceholders = [onesignal_app_id : "******************",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "**************"]
}
}
}
repositories {
mavenCentral()
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
lintOptions{
checkReleaseBuilds false
abortOnError false
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
//Firebase Dependancy
implementation 'com.google.firebase:firebase-analytics:17.4.1'
//Onesignal Dependancy
implementation 'com.onesignal:OneSignal:[3.6.5, 3.99.99]'
}

how to solve gradle faild sync:SSL handshake connection when trying to download recycleview?

I've tried to download RecycleView in order to use in my project but this error keeps occurring and download fails.
Gradle sync failed: Could not resolve all dependencies for
configuration ':app:debugRuntimeClasspath'. Could not determine
artifacts for androidx.recyclerview:recyclerview:1.0.0 Could not
get resource
'https://dl.google.com/dl/android/maven2/androidx/recyclerview/recyclerview/1.0.0/recyclerview-1.0.0.aar'.
Could not HEAD
'https://dl.google.com/dl/android/maven2/androidx/recyclerview/recyclerview/1.0.0/recyclerview-1.0.0.aar'.
Remote host closed connection during handshake SSL peer shut
down incorrectly Consult IDE log for more details (Help | Show Log)
(12 s 965 ms)
This is the Project Build Gradle:
buildscript {
repositories {
jcenter()
mavenCentral()
google()
maven { url 'http://repo.maven.apache.org/maven2' }
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and this is the Module:App build Gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "com.aden.adenmarket"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-core:17.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.firebase:firebase-auth:18.0.0'
implementation 'com.google.firebase:firebase-firestore:20.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
}
apply plugin: 'com.google.gms.google-services'
Since no one answered my question, I'll post this answer. Maybe it'll help someone who may face an issue like this. I solved this problem by updating Firebase libraries and
updating these two dependencies to the last version and it worked successfully .
//module:app
implementation 'com.google.firebase:firebase-auth:18.1.0'
implementation 'com.google.firebase:firebase-firestore:20.1.0'
implementation 'com.google.firebase:firebase-core:17.0.1'
//project Build Graddle
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.0'

Getting an error "could not find method implementation()" in Android Studio

I'm getting this ERROR message.
Could not find method implementation() for arguments [project ':app']
on object of type
org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Here's my project level's gradle file :
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven { url "https://maven.google.com" }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:3.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url "https://maven.google.com" }
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
dependencies {
implementation project(':app')
}
Here's my app's gradle file :
apply plugin: 'com.android.application'
apply plugin: 'java-library'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.therationalbloke.myapplication"
minSdkVersion 15
targetSdkVersion 28
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.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation project(':app')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
NOTE : I'm already aware of the following.
The "compile" has been replaced by "implementation" in Gradle 3.0 or
higher.
Yes, I'm using Android Studio's latest version and according to Rob, I should prefer the old one. But the thing is that I was haunted
by a lot of technical issues in that version (a lot of them included
stuff which is now outdated).
I've read almost every solution to this problem on Stack Overflow, Github. All of them are either asking to use implementation() instead
of compile (which I'm already using), or they're asking to check if
the Gradle version is 3.0+.
I've tried changing all the "implementation" to "compile" on suggestion of one user on Stackoverflow.
I've tried importing a lot of libraries as suggested by a lot of people in different communities.
Some info about my Android Studio
Android Studio - 3.1.3
Android Plugin Version - 3.1.3
Gradle Version - 4.4
Screenshot of the situation
I've never seen something like implementation project(':app') on a gradle file.
Here you have an example of a working gradle file, try deleting implementation project(':app') and resync.
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.amvt_notebook4.codigoqrtest"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies
{
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.android.gms:play-services:10.0.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation files('build/libs/mail.jar')
implementation files('build/libs/additionnal.jar')
implementation files('build/libs/activation.jar')
implementation files('build/libs/jtds-1.3.1.jar')
implementation 'com.android.support:multidex:1.0.3'
}

Categories

Resources