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.
Related
I'm trying to upgrade to the latest version of React Native. When I run my Android app (npx react-native run-android) it gives this error:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.version-check'.
> Minimum supported Gradle version is 7.4. Current version is 7.3.1. If using the gradle wrapper, try editing the distributionUrl in /Users/justintoth/Dev/m365-mobile-app/android/gradle/wrapper/gradle-wrapper.properties to gradle-7.4-all.zip
Seems simple enough, that I need to upgrade Gradle from version 7.3.1 to version 7.4. However, when I make the following changes:
android/build.gradle (dependencies section):
classpath("com.android.tools.build:gradle:7.4")
android/gradle/wrapper/gradle-wrapper.properties:
distributionUrl=https://services.gradle.org/distributions/gradle-7.4-all.zip
Then it gives this error:
> Could not find com.android.tools.build:gradle:7.4.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.4/gradle-7.4.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/7.4/gradle-7.4.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.4/gradle-7.4.pom
Required by:
project :
So what gives? It errors if I use version 7.3.1 and insists I use 7.4, and yet when I use 7.4 it says it can't find it. The distributionUrl that I specified in gradle-wrapper.properties is correct, so it's clearly ignoring it and just trying to look in google, jcenter and mavenCentral.
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
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
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.
I'm new to Wikitudea and I'm trying to get it on the last version of Android Studio and I'm stuck… I followed the instructions of wikitude's video “Set-up Guide. Android Javascript API” and I get these error messages:
on Gradle sync:
…//WikitudeSDK_Android_5-1-4_2016-03-14_14-50-48/Examples/SDKExamples/build.gradle
Error:(16, 0)
Gradle DSL method not found: 'android()'
Possible causes:
-The project 'SDKExamples' may be using a version of Gradle that does not contain the method.
-The build file may be missing a Gradle plugin.
on Gradle build:
Error:(16, 1) A problem occurred evaluating root project 'SDKExamples'.
Could not find method android() for arguments [build_9gtn2gg2nuca14amc9jhql4mv$_run_closure2#7fd77467] on root project 'SDKExamples'.
Could you please help me? I don't know what to do...