I'm trying to implement mercadopago px, but at run time it returns an error
AAPT2 aapt2-4.1.3-6503028-linux Daemon # 2: Unexpected error during compile
I looked for some solutions Link , some say it is Gradle's mistake and others say it is related to the hardware. One of these solutions was to see the structure of the project and change the version of Gradle to a lower one, the version that did not give this error was (image), but there was an error in the main activity
Actual gradle
Changed Gradle
If you have an older computer/laptop, it's likely the missing SSSE3 instructions. The bug was fixed in newer versions of AS/AGP so if you update your android gradle version to the newest 4.2 beta it should fix the issue.
Related
I am facing a problem when I open my android project. It has been since a while I haven't deal with my project. But I face different error when I change android studio version or gradle version. Sometimes I face Aapt2 error other time I face android resource complication in values folder. How do I get the exactly android studio and gradle version to open my project so as I can make some modification
Regarding Aapt2
Aapt2 is enabled by default when you use android plugin for gradle 3.0.
This is to
improve incremental resource processing
as stated here.
But if you are facing issues with it, you can switch back to previous version by adding this in gradle.properties
android.enableAapt2=false
Non-ascii characters issues have been fixed in AAPT2 and android gradle plugin now (yay!). Instead of disabling AAPT2 now you can just use android gradle plugin version 3.2.0-alpha11 or newer and you should not encounter this error anymore.
Regarding Android resource compilation
Make sure you have no error in your ids.xml file.
I am experiencing a very frustrating behaviour on Android Studio, updated to the latest version (3.1.3, buld number #AI-173.4819257), gradle plugin version 3.1.3.
What it happening is that after running my Robolectric based unit tests, clicking on "rerun failed tests", I always get this message:
0 test classes found in package 'my-package-name'
Process finished with exit code 254
Empty test suite.
I tried to Invalidate Cache / Restart, update to the latest version of every dependency. Actually I couldn't find any helpful information about this problem, so I am here to ask if someone has experienced a similar behaviour
Here you can find my configuration for the test
It seem it was an Android Studio bug fixed in 3.1.4, as stated here https://developer.android.com/studio/releases/#3-1-0
installing the version 3.1.4 actually fixed the issue
Today, multiple developers on my team started seeing this error when they attempt to run any Gradle task.
* Where:
Build file 'C:\dev\src\my_app_name\app\build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
> Minimum supported Gradle version is 4.4. Current version is 4.1. If using the gradle wrapper, try editing the distributionUrl in C:\dev\src\my_app_name\gradle\wrapper\gradle-wrapper.properties to gradle-4.4-all.zip
Absolutely no code or config changes were made; Gradle builds just suddenly started to fail. Anyone know why this would happen? My best guess is that a plugin with a dependency on a specific version of Gradle auto-updated itself, but I'm not sure how to figure out which one it is. The line number would suggest that it was the com.application.plugin plugin itself.
I am aware that Android Studio updates often require a corresponding upgrade to Gradle, but nobody on my team updated Android Studio. And, according to the Android-Studio-Gradle version compatibility table, Gradle 4.1 should still work fine with Android Studio 3.0.1, which is what I have been running for some time.
We recently started using Kotlin, and I thought that might be part of the problem, but completely removing everything related to Kotlin didn't help.
I have tried deleting the Gradle caches/ directory, running ./gradlew cleanBuildCache, deleting our project's build/ directories, killing Gradle daemons via ./gradlew --stop, and rebooting -- all to no avail.
I also tried upgrading to Gradle 4.4, but that resulted in a "CIRCULAR REFERENCE" NullPointerException error during DexMergerTransform (separate issue), for reasons that are entirely unclear to me. I'd like to be able to force my environment to NOT take on a Gradle 4.4 dependency right now... but I don't know what suddenly triggered this dependency.
The problem turned out to be that we were using a non-specific version of a plugin. When a change was made to the plugin, the new version was downloaded to our dev environments, and it introduced a dependency on a version of Gradle higher than the one we were using.
In our case, this was the culprit:
classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-SNAPSHOT'
Downgrading to version 8.5.1 of the Butterknife plugin eliminated the dependency on Gradle 4.4.
You also have the option of linking to a specific pre-release "nightly" version. However, this is less than ideal, since these bits don't remain available for long, and you might want to download a build and keep it in your local lib. For example:
classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-20180727.012508-40'
instead of down-grading, one could provide the plugin in version 9.0.0 with the expect version of Gradle, by editing the file gradle/wrapper/gradle-wrapper.properties; for example:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip
version 4.5 works stable and might not create the circular reference, alike 4.4 does. and when looking at the issues tracker on GitHub, this Gradle plugin might add more problems, than it would serve any real purpose - because the Android SDK already supports two-way data-binding.
currently the artifacts still list 8.8.1 as the latest version; while a SNAPSHOT is barely stable... that nothing happend there since over a year, hints for that this project might have been abandoned... most likely because of Architecture Components data-binding.
I have updated SDK and I am using Android studio 2.0(preview). So I think all things are enough updated. For me and for my newly created projects all things work fine. But When Ever I download the code from github I always gets error of gradle versions.
So It is kind of annoying. Well I admire a lot of things are already fixed by gradle while importing that github project . But once the gradle version error occur its some times gets hard to know the exact reason. And honestly I know things about gradle quite enough , but I always get it solved by hit and trial method. So I have many confusions which I am posting below as a questions
How to know what is new gradle version is going on.
How to know which things are now forbidden in the new version of gradle
How to know which support dependencies will work with new gradle version
How to know which version of build tools will perfectly match to gradle.
I think there are many stupid things in these question and I google these questions, but end up with deciding to ask you guys as you guys can clear me formally and casually.
please answer my question if you know this thing deeply.
Android Gradle Build systems are software tools designed to automate
the process of program compilation .
How to know what is new gradle version is going on.
The Android build system uses the Android Plugin for Gradle to support
building Android applications with the Gradle build toolkit. The
plugin runs independent of Android Studio so the plugin and the Gradle
build system can be updated independently of Android Studio.
You can Mouse Hover On classpath for checking latest Version .
How to know which things are now forbidden in the new version of gradle
You should check Android Plugin for Gradle Release Notes
For classpath 'com.android.tools.build:gradle:1.3.1'
Fixed the ZipAlign task to properly consume the output of the
previous task when using a customized filename.
Fixed Renderscript packaging with the NDK.
Maintained support for the createDebugCoverageReport build task.
Fixed support for customized use of the archiveBaseName property in
the build.gradle build> file.
Fixed the Invalid ResourceType lint warning caused by parameter
method annotation lookup when running lint outside of Android
Studio.
Now For your 3rd and 4th questions you should check manual testing .
I tried numerous links, many answers like this. It just doesn't work. I have the android sdk build tools installed for the 22.0.1 but it still gives me the same error. Where have I gone wrong?
I seem to be getting this error as well in the gradle settings,
Any kind of advice is appreciated.
Make sure you have the android repositories up to date
Make sure you have the SDK platform installed for API level 22.
I couldn't see any API's for 22 version on your pictures.But Error says you should download and reload your project with 22 API.
Buildtools is working correctly, your problem is about compileSdkVersion
Just what you have to do is, downloading 22 SDK Platform.
That's all.
for other questions, Please Search about them and fix your first problem and then look for solutions for others.
This is a gradle sync error - not a "gradle" error. Gradle sync is an Android Studio feature where it attempts to run gradle, and in your case it cannot find gradle, so when the sync attempts to process your build files, it fails with this weird error.
You are not pointing to a valid local gradle installation. You should download and install gradle locally, then update the section with an error to reflect the installed location. I have used gradle 2.2.1 and 2.7 (and some others, but they have caused problems). So be aware that the version of gradle you get may not be compatible with other features of your project, so you may need to try more than one.