android failed Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath' - android

can anyone help me how i fix that
android: failed
Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'
Failed to find target with hash string
'1.3.50' in: C:\Users\MB\AppData\Local\Android\Sdk
this from event log
20:29 Gradle sync started
20:29 Gradle sync failed: Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Could not create task ':app:minifyReleaseWithR8'.
Cannot query the value of this provider because it has no value available. (2 s 996 ms)

I think you are missing one or two build tools versions that you project needs. Check your target and compile versions of your project and then install the build tools for that level. If you have time you can just install it one by one to figure out which one is missing.
E.g If your target is 28, install build tools 28.0.3, 28.0.2, 28.0.1 and 28.0.0

Related

Flutter, Android Unable to load Maven meta-data from ~ Build error solution

I am using 'stripe_payment: ^1.0.6' used for integrating stripe in a flutter. I am got this error for Gradle sync.
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'. Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not resolve net.minidev:json-smart:[1.3.1,2.3].
Required by: project :app > project :stripe_payment > com.stripe:stripe-android:10.4.6 > com.stripe:stripe-3ds2-android:1.2.2 > com.nimbusds:nimbus-jose-jwt:7.8
Failed to list versions for net.minidev:json-smart. Unable to load Maven meta-data from https://google.bintray.com/exoplayer/net/minidev/json-smart/maven-metadata.xml.
Could not get resource 'https://google.bintray.com/exoplayer/net/minidev/json-smart/maven-metadata.xml'.
Could not GET 'https://google.bintray.com/exoplayer/net/minidev/json-smart/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
Problem that google.bintray.com is down but version of net.minidev:json-smart is not specified strictly.
This [1.3.1,2.3] mean it has versions range Gradle Declaring Versions and Ranges
Search for versions of net.minidev:json-smart Maven search. We have 2.3 & 2.3.1
Constrain your transitive dependency with maximum possible version 2.3.1
Edit your project app/build.gradle:
dependencies {
...
constraints {
implementation('net.minidev:json-smart') {
version {
strictly '2.3.1'
}
}
}
}
It looks like a known issue: https://github.com/jonasbark/flutter_stripe_payment/issues/338
However this plugin is also deprecated/unmaintained: https://github.com/jonasbark/flutter_stripe_payment/blob/master/migration.md
The author recommends using flutter_stripe instead: https://github.com/flutter-stripe/flutter_stripe#features

Could not find com.android.tools.build:gradle:6.4.1

I faced the problem, more correct in gradle, when I enter the command - npx react-native run-android into the console - it gives me the following error :
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'Da'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find com.android.tools.build:gradle:6.4.1.
Searched in the following locations>
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/6.4.1/gradle-6.4.1.pom -https://jcenter.bintray.com/com/android/tools/build/gradle/6.4.1/gradle-6.4.1.pom
Initially - the problem was incompatibility between gradle and android versions, but after i changed version of gradle and terminal automatically download new version into directory, first error disappeared, but i got another (current problem). I had try some advice before asking question in StackOverFlow, but they didn't work. Here some characteristics :
React-Native Doctor image
Gradle code : gradle.properties ,
gradle-wrapper.properties
Gradle Directory : Here
Path variables :Here
I appreciate all help (I think, that issue is in PATH, but not sure). By the way - does anyone know, how to add pictures without link?
You are confusing gradle with the gradle plugin.
The gradle plugin 6.4.1 doesn't exist.
Use the latest stable version:
classpath 'com.android.tools.build:gradle:4.2.2'
Check also the compatibility with the gradle version:
Plugin version Required Gradle version
4.0.0+ 6.1.1+
4.1.0+ 6.5+
4.2.0+ 6.7.1+

What is navigation.json in Android Studio 4.1?

I just tried out Android Studio 4.1 today. I started the Android Studio and created empty activity and I run it using the android virtual device. Then it was failed and this error is shown:
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':app:processDebugManifest' (type 'ProcessMultiApkApplicationManifest').
> File 'E:\Project\AndroidLayout\app\build\intermediates\merged_manifest\debug\out\AndroidManifest.xml' specified for property 'mainMergedManifest' does not exist.
When I rebuild the project, the error message is shown here:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> com.android.manifmerger.ManifestMerger2$MergeFailureException: java.io.FileNotFoundException: E:\Project\AndroidLayout\app\build\intermediates\navigation_json\debug\navigation.json (The system cannot find the path specified)
Note that this is fresh install and fresh project without any modification in the code.
UPDATE 1:
Youtube: https://www.youtube.com/watch?v=g4w_NOA_UVQ
Bug Report: https://issuetracker.google.com/issues/170720311
UPDATE 2:
After I downgrade the Android Gradle Plugin version from 4.1.0 to 4.0.2 and the Gradle version from 6.5 to 6.4.1 now it is working.
So my conclusion is there is a bug in the Android Gradle Plugin 4.1.+ and Gradle 6.5.+.
I find a temporary solution:
After I downgrade the Android Gradle Plugin version from 4.1.0 to 4.0.2 and the Gradle version from 6.5 to 6.4.1 now it is working. So my conclusion is there is a bug in the Android Gradle Plugin 4.1.+ and Gradle 6.5.+.
In order to downgrade, just go to File -> Project Structure.
Had same issue. Moving project files to ntfs drive fixed it.
Downgrading the Android Gradle Plugin version from 4.1.0 to 4.0.2 and the Gradle version from 6.5 to 6.4.1 now it is working; works for me as well. Now app is no longer experiencing building errors.Thanks.
Error message was :
A problem was found with the configuration of task ':app:processDebugManifest' (type 'ProcessMultiApkApplicationManifest').
File 'F:\NietsPastApp\app\build\intermediates\merged_manifest\debug\out\AndroidManifest.xml' specified for property 'mainMergedManifest' does not exist.
Thanks for help, downgrade it's ok. just for other who search the file :
gradle 4.0.2 change here : /build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
gradle 6.4.1 : gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip
File -> Project Structure. reduce your build tools version to 29
i tried it's work
In my case and for kotlin I have downgraded kotlin version from 1.4.32 to 1.4.31

Gradle 6.5 not building: ANDROID_AAPT_IGNORE error

I'm building android project with:
Android Gradle plugin v. :4.1.0-alpha10
Gradle version: 6.5-rc-1
and getting this error:
Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Could not create task ':app:extractDeepLinksDebug'.
Cannot obtain value from provider of environment variable 'ANDROID_AAPT_IGNORE' at configuration time.
Use a provider returned by 'forUseAtConfigurationTime()' instead.
I started getting this error when i updated Gradle version
Now after I downgrade to last to 6.5-milestone-1 it gives me another error:
Unsupported method: AndroidArtifact.getBuildConfigFields().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
Now i cannot build my project with any version.

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.

Categories

Resources