few days ago i deleted the whole gradle file and installed it again manually introduced its path to android studio 4.1.1 and created a project to test
fortunately gradle worked fine but when i tried to run app on emulator a red goddamn error appears that doesn't let me sleep for 3 days
Execution failed for task ':app:mergeDebugResources'.
> Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
> Could not find aapt2-4.1.1-6503028-linux.jar (com.android.tools.build:aapt2:4.1.1-6503028).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/4.1.1-6503028/aapt2-4.1.1-6503028-linux.jar
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
i read the documentation and i guess that was outdated or just couldn't solve my problem cause i declared repository and nothing made a difference.
every solution i found belongs to 2 or 3 years ago and most of em say the same
add google() to your repositories in build.gradle
and they were right
that should made the problem solved but in 3 years ago.
now by default android studio has google() in repositories
and still i see the goddamn red error on my screen
in error obviously points to missing a file named aapt2-4.1.1-6503028-linux.jar and thanks to google ,it gives me the download link
i downloaded the file but i don't know where to put it.
as the error says ,
Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
so anybody knows a path for this file or what ever it is ?!
make an old noob programmer HAPPY ;(