My project crash after implementing admob - android

I am running android 3.5. my project was running smoothly, but crash after i implement admob in the code and it is giving me the error bellow:
C:\Users\HP\.gradle\caches\transforms-2\files-2.1\c304f603f74183b8376179f99c52c5ba\play-services-ads-lite-19.6.0\AndroidManifest.xml:27:5-38:15: AAPT: error: unexpected element <queries> found in <manifest>.
Please how do I solve?

As in this answer: I the error "unexpected element <queries> found in <manifest>", how to fix it?
While you are using the latest Admob SDK you are using old versions of build.gradle and Android Studio! You have to update!

Use newer version of gradle,like so:
project/android
classpath("com.android.tools.build:gradle:3.5.0")
current setting:
classpath("com.android.tools.build:gradle:3.5.4")

Related

AAPT style attribute not found

I am using android studio version 4.1.3 and gradle version 6.8.3 . My target sdk version for the project is API 26.
After clicking on sync the project, the result seems have no problem but after clicking on run app, I have an error which says,
gradle-6.8.3\caches\transforms-3\71de35e86c45a332199eb23f9129d32f\transformed\material-1.4.0\res\values\values.xml:1316:-1327:11: AAPT: error: style attribute 'android:attr/dialogCornerRadius' not found
I don't know what should I do?
Just tell me if you need more details for better diagnosis.
Thanks.

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

In my android app's build file, I have given a wrong version of the library "com.google.firebase:firebase-core:17.0.0" for now the latest version is "com.google.firebase:firebase-core:16.0.4".
Later, I corrected the build file to use the correct version 'com.google.firebase:firebase-core:16.0.4'. Now while building the app, I am still getting the error.
Failed to resolve: com.google.firebase:firebase-core:17.0.0
I even tried to delete the dependency "com.google.firebase:firebase-core****" but still I am getting the error. Please help me to resolve.
Use same dependency for ads as used for the Core in your case (16.0.4).
Or follow this link for Further Instruction.
[https://firebase.google.com/docs/android/setup][1]
Also use implementation instead of api.

Android Studio 3.1 gradle build throws java.util.zip.ZipException

I'm getting this during gradle builds after the upgrade to Android Studio 3.0:
Execution failed for task
':lf-android-myproject:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug'.
java.lang.RuntimeException: java.util.zip.ZipException: duplicate entry: com/my/package/name/SomeCustomView.class
The class in question comes from my code, it's not from a library.
It happens only with my classes that have custom attributes declared:
<declare-styleable name="SomeCustomView">
<attr name="someCustomViewText" format="reference|string" />
</declare-styleable>
I can fix it by cleaning and then building from the console, but it pops up again eventually.
I can fix it also by renaming the class or the styleable, but I really don't want to mess with our code just to go around an AS (or gradle?) bug that can be fixed in the future probably.
Is it an Android Studio bug? Are there any workarounds?
Gradle version is: gradle-4.1-all
Android Gradle plugin version is: 3.0.1
This issue can be found for different reason. However, Here is a way to fix Gradle build error: “java.util.zip.ZipException: duplicate entry”
If you’ve updated some libraries in your android project and then encountered the following error while assembling it (or something similar):
The reason is that some libraries have similar dependencies, therefore the compiler can not choose the appropriate one.
According to the logs, the problem in the duplicated class
org/intellij/lang/annotations/Identifier.class
To find this class usages, you should filter the detailed gradle log:
Fix it!
Remove one of the dependencies:
Follow this for your case and I guess you will find your solution.
I solved this by deleting Android Studio files from the project and re-importing the project.

Failed to resolve: com.android.support:support-v4:26.3.1

In my project, this normally worked, it gives an error now and i do not know why.
Failed to resolve: com.android.support:support-v4:26.3.1
It happens because this version doesn't exist.
Check all the versions here.
It happens because this version doesn't exist.
Check all the versions Recent Support Library and remove some unreleased libraries in your gradle file.

New errors after installation of fabric plugin in eclipse android

I use eclipse LUNA for android development. I installed Fabric plugin to add crashanalytics today and suddenly I am seeing some error which I am not able to identify.
The project shows red mark for errors but none of the files have the same error mark
And when I try to run/build the project I get the following error
An internal error occurred during: "Running GTM diagnose".
com.android.tools.lint.detector.api.XmlContext: method (Lcom/android/tools/lint/client/api/LintDriver;Lcom/android/tools/lint/detector/api/Project;Lcom/android/tools/lint/detector/api/Project;Ljava/io/File;Lcom/android/resources/ResourceFolderType;)V not found
Also i am seeing this error repeatedly in the console
[2014-12-05 08:56:41 - com-crashlytics-sdk-android_answers] Unable to resolve target 'android-21'
[2014-12-05 08:56:41 - com-crashlytics-sdk-android_crashlytics] Unable to resolve target 'android-21'
This is my first android project so sorry if this is a noob question. Any help would be appreciated
After installing SDK version 21, you will have this issue:
You are building your app with a sdkTarget defined in your manifest with a value lower than 21.
Your choices are:
a) upgrade your project to use: android:targetSdkVersion="21"
OR
b) change each crashlytics kit's manifest's targetSdkVersion to match your project

Categories

Resources