error in buiding with newer sdk - android

with previous versions sdk it worked completely fine . then I updated sdk using sdk manager .
Error:A problem occurred configuring project ':app'.
Failed to find target with hash string 'android-270' in: C:\Android\sdk
Console

This caused due to a small mistake in build.gradle .
set the
compileSdkVersion to right way .

Related

A problem occurred evaluating project ':#mauron85_react-native-background-geolocation-common'

I try to clone my teammate project, i did yarn install and run android but when the process is done, i found an error said:
A problem occurred evaluating project ':#mauron85_react-native-background-geolocation-common'
Other explanation are:
Failed to apply plugin [id 'com.android.internal.library']
The option 'android.enableUnitTestBinaryResources' is deprecated.
The current default is 'false'.
It has been removed from the current version of the Android Gradle plugin.
The raw resource for unit test functionality is removed.
We still want to use this dependecy because it requires on our project, my React Native version is 0.61.5
is there any solution regarding this problem?
Add the following line in gradle.properties in android folder.
android.enableUnitTestBinaryResources=false

Android Studio 3.1.2 Gradle Error : Could not resolve all files for configuration ':lintClassPath'

I am on mac, using android studio 3.1.2 . I have changed the gradle version to 4.4 and Android plugin to 3.1.2
I have already changed the compile keyword to implementation in the build.gradle
I am getting this error :
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':lint'.
> Could not resolve all files for configuration ':lintClassPath'.
> Could not find com.android.tools:sdk-common:26.1.2.
Searched in the following locations:
file:/Users/rp/Library/Android/sdk/extras/m2repository/com/android/tools/sdk-common/26.1.2/sdk-common-26.1.2.pom
file:/Users/rp/Library/Android/sdk/extras/m2repository/com/android/tools/sdk-common/26.1.2/sdk-common-26.1.2.jar
how can this be fixed?
The cause of this issue is that Gradle can't find the Android SDK. There are several ways to fix it:
Define the ANDROID_HOME environment variable
ANDROID_HOME=your/path/to/android/sdk; export ANDROID_HOME
or Add sdk.dir to the file local.properties, for example on my Linux computer
sdk.dir=/home/sdeng/Android/Sdk
if you already defined ANDROID_HOME or sdk.dir, it still happens. It probably something is wrong with the specific version of your Android SDK or Gradle daemon. Try to kill all Gradle processes, re-download the specific version of Android SDK.
Or you can check the SDK at $ANDROID_HOME/platforms/android-28, where 28 is the compileSdkVersion defined in build.gradle
Like other comment says, change to a good SDK version works in this case.

Android Studio gradle error during generateDebugSource step

I'm having some trouble with Android Studio. During the gradle build I get an error such as:
Error:A problem occurred configuring project ':app'.
> Artifact 'support-annotations.jar (com.android.support:support-annotations:23.0.0)' not found.
Searched in the following locations:
file:/C:/Users/MyPc/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/23.0.0/support-annotations-23.0.0.jar
I developed my project in compliance with API 22. I have installed API 23 and my project gave some errors. Thus to solve this issue I deleted all things related to API 23. During deletion this file must have deleted. How can this problem be solved?

Android Studio - transformClassesWithMultidexlistForDebug error

After updating from com.android.tools.build:gradle:2.0.0-alpha3 to com.android.tools.build:gradle:2.0.0-alpha6 I got this error:
Error:Execution failed for task ':MyApp:transformClassesWithMultidexlistForDebug'.
> java.util.NoSuchElementException (no error message)
I have multiDexEnabled true, which worked so far (up to alpha3); if I remove it I get another error:
Error:A problem was found with the configuration of task ':MyApp:zipalignDebug'.
> File '/Users/myuser/dev/projects/my-app/MyApp/build/outputs/apk/MyApp-debug-unaligned.apk' specified for property 'inputFile' does not exist.
Any clue?
Note: after updating to alpha6 I also updated distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip in gradle-wrapper.properties and did a project clean + rebuild.
I'll add the answer, since it seems to work for some people.
I discovered that my Android Studio 2.0 Preview was outdated (I was in stable channel). I updated it to the latest version (canary channel). At the moment is the Preview 6.
I also had to disable "instant run" due to other problem I had after updating Android Studio.
Hope it helps!

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