I have updated my gradle to latest version and now I am having this error.
org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':app:processDebugManifest'.
I have seen other questions about this, but it didn't help. I have tried removing all the dependencies but the same error is shown, so it is not a compatibility issue?
My gradle file
Here's the full error: link
I am not sure which version API you are using.
Solution 1: File => Invalidate Caches / Restart
Solution 2: Check the AndroidManifest.xml and build.gradle using same targetSdkVersion, minimum and maximum sdk version.
solution 3: Check dependencies in build.gradle file. Then comment out one by one and sync. For an example:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:28.0.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'
}
Related
I recently just started with android development using kotlin so a total noob at android studio too.
I am trying to build a super simple HelloWorld app but I got this error:
Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor configuration.
- jetified-kotlin-compiler-embeddable-1.3.72.jar (kotlin-compiler-embeddable-1.3.72.jar)
Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior. Note that this option is deprecated and will be removed in the future.
See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.
but when I added the annotationprocessor at the end of my dependencies like:
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.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
annotationProcessor "org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlin_version"
}
I encountered a new error instead when I tried to build:
https://del.dog/pyfunestin
Class duplicate error can be solved by cleaning the project. First clean the project and rebuild it.
I am trying to add Kommunicate services to my Android app.
But when I add the dependencies of kommunicate, I get an error stating that it crashes with the google-services-auth implementation
The dependencies section is as follows:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
implementation 'androidx.recyclerview:recyclerview:1.0.0-alpha1'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.android.material:material:1.1.0-alpha02'
implementation 'com.google.apis:google-api-services-blogger:v3-rev61-1.25.0'
implementation 'com.github.bumptech.glide:glide:4.8.0'
implementation 'io.kommunicate:kommunicate:1.6.3'
implementation 'com.github.GrenderG:Toasty:1.3.1'
implementation 'com.rom4ek:arcnavigationview:1.0.3'
implementation 'com.github.Commit451:ModalBottomSheetDialogFragment:1.1.0'
implementation 'com.android.volley:volley:1.1.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
The full log is as follows:
In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0.1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.android.gms:play-services-stats:15.0.1 -> com.google.android.gms:play-services-basement#[15.0.1], but play-services-basement version was 16.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 io.kommunicate:kommunicate#1.6.3
-- Project 'app' depends onto com.google.android.gms:play-services-auth#16.0.1
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 build.gradle file.
So silly of me!
The play-services-auth is version 15.0.1:
implementation 'com.google.android.gms:play-services-auth:15.0.1'
But not 16.0.1:
implementation 'com.google.android.gms:play-services-auth:16.0.1'
I updated my Android Studio to 3.1.2, my app gradle looks as follows:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'org.tensorflow:tensorflow-android:1.8.0-rc0'
}
Trying to build gives me following error:
AGPBI: {"kind":"error","text":"Program type already present: org.tensorflow.Graph$Reference","sources":[{}],"tool":"D8"}
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:...
If someone could give me a hint where to search or how to fix would be really appreciated. I tried updating tensorflow to 1.8.0-rc1, didn't change a thing.
Check if there is a libandroid_tensorflow_inference_java.jar or other similar name in your project, which would conflict with your setting, "implementation 'org.tensorflow:tensorflow-android:1.x.x'"
Just delete the jar file, and works for me.
I have a strange issue when integrate firebase:
if you integrate firebase automatically from tools,
The new version of android studio have strange bug, the software inserts
implementation 'com.google.firebase:firebase-database:16.0.1:15.0.0'
instead of
implementation 'com.google.firebase:firebase-database:16.0.1'
fix this line (remove numbers after last ':')
Remove the
implementation 'com.google.firebase:firebase-database:16.0.1:15.0.0'
and add only
implementation 'com.google.firebase:firebase-database:16.0.1'
Because 16.0.1 is added by our self and while after that we connect firebase using the plugin in the studio, it adds a new lib file with 15.0.0.
So that's not required.
Step 1 :
In your root build.gradle file add the repo:
allprojects {
repositories {
google()
maven { url "https://maven.google.com" }
}
}
Now Sync Gradle. This is the directory that contains the repos of Firebase.
Step 2 :(if step 1 doesn't works)
If the Step 1 doesn't works, then it should be because you are using the Gradle in offline mode. If your gradle is set to offline, android studio searches for the cached copies of the dependencies that you want to update and throws an error since it hasn't downloaded the file before.
Go to Settings >> Build, Execution, Deployment >> Gradle.
In the Global Gradle Settings section, disable Offline mode.
Now Sync Gradle again.
Use implementation com.google.firebase:firebase-database:16.0.1 as many wrote before. But also add the line: kapt com.google.firebase:firebase-database:16.0.1:15.0.0
this way firebase keep "Dependencies set up correctly".
after
implementation com.google.firebase:firebase-database:16.0.1
kapt 'com.google.firebase:firebase-database:16.0.1:15.0.0'
add the kapt, it fixed for me
Updated all the dependencies to
dependencies {
implementation "com.google.android.gms:play-services-base:16.0.1"
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.5'
}
then build -> clean project, build -> rebuild project and is working
I am trying to connect my app with firebase analytics.
I have problem when Gradle tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar].
I have already put implement 'com.google.firebase:firebase-core:11.6.0' in build.gradle as following guide.
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-core:11.6.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.android.gms:play-services-ads:11.4.2'
}
apply plugin: 'com.google.gms.google-services'
gradle build finished with 1 error
Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.6.0.
Is anyone able to help me? Thank you in advance.
To solve this, this you need to add this line of code:
classpath 'com.google.gms:google-services:3.1.1'
In your dependencies from your build.gradle (Project) file.
Change also this line of code:
implementation 'com.google.android.gms:play-services-ads:11.4.2'
with
implementation 'com.google.android.gms:play-services-ads:11.6.0'
You have to use the same version of firebase libraries and google play service libraries:
implementation 'com.google.firebase:firebase-core:11.6.0'
implementation 'com.google.android.gms:play-services-ads:11.6.0'