Can't migrate to AndroidX: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed - android-studio-3.0

Android Studio 3.2. Gradle 4.6
In my gradle.properties:
android.useAndroidX=true
android.enableJetifier=true
I want to migrate to AndroidX.
So in menu select
Refactor -> Migrate to AndroidX
Studio replace many of my resources to androidx...
Nice.
But when I build project I get error:
:app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed
Output: D:\dev\MyProject\\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1614: error: duplicate value for resource 'attr/mode' with config ''.
D:\dev\MyProject\\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1614: error: resource previously defined here.
Command: C:\Users\Alexei\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\1140ed5d6b762801720aa38b75493b72\aapt2-3.2.1-4818971-windows\aapt2.exe compile --legacy \
-o \
D:\dev\MyProject\\app\build\intermediates\res\merged\debug \
D:\dev\MyProject\\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Output: C:\Users\Alexei\.gradle\caches\transforms-1\files-1.1\jetified-swipe-reveal-layout-1.4.1.aar\9897ef13e78d1b3a157ca2f1633442ed\res\values\values.xml:3:5-414: AAPT: error: duplicate value for resource 'attr/mode' with config ''.

Related

FAILURE: Build failed with an exception

I'm trying to run my app from inside Visual studio code, but every time I try i get this error:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:validateSigningDebug'.
java.util.concurrent.ExecutionException: com.android.builder.utils.SynchronizedFile$ActionExecutionException: java.io.IOException: com.android.ide.common.signing.KeytoolException: Failed to create keystore.
Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 2s
Exception: Gradle task assembleDebug failed with exit code 1
Although I searched on Google, but I did not get a suitable solution to my problem

My build is failing as jenkins could not download jdk

How to reslove this issue in jenkins.
Installing /root/.jenkins/tools/hudson.model.JDK/java_1.8/jdk.sh
[java_1.8] $ /root/.jenkins/tools/hudson.model.JDK/java_1.8/jdk.sh -noregister
/root/.jenkins/tools/hudson.model.JDK/java_1.8/jdk.sh: 2: Syntax error: newline unexpected
FATAL: command execution failed
hudson.AbortException: Failed to install JDK. Exit code=2

Error while compiling HAProxy from source

I got this error while trying to compile the HAProxy 2.2 with LUA version 5.3. I'm on trying to do it on CentOS7(arm64).
[root#08d17a479616 haproxy-2.2.22]# make TARGET=linux-glibc USE_PCRE=1 USE_PCRE_JIT=1 USE_OPENSSL=1 USE_ZLIB=1 USE_LINUX_TPROXY=1 USE_REGPARM=1 USE_LUA=1 USE_THREAD=1 USE_TFO=1
CC src/version.o
LD haproxy
/usr/bin/ld: cannot find -latomic
collect2: error: ld returned 1 exit status
More logs;
attempt to open //usr/aarch64-redhat-linux/lib64/libatomic.so failed
attempt to open //usr/aarch64-redhat-linux/lib64/libatomic.a failed
attempt to open //usr/lib64/libatomic.so failed
attempt to open //usr/lib64/libatomic.a failed
attempt to open //usr/local/lib64/libatomic.so failed
attempt to open //usr/local/lib64/libatomic.a failed
attempt to open //lib64/libatomic.so failed
attempt to open //lib64/libatomic.a failed
attempt to open //usr/aarch64-redhat-linux/lib/libatomic.so failed
attempt to open //usr/aarch64-redhat-linux/lib/libatomic.a failed
attempt to open //usr/local/lib/libatomic.so failed
attempt to open //usr/local/lib/libatomic.a failed
attempt to open //lib/libatomic.so failed
attempt to open //lib/libatomic.a failed
attempt to open //usr/lib/libatomic.so failed
attempt to open //usr/lib/libatomic.a failed
ld: cannot find -latomic
[root#08d17a479616 haproxy-2.2.22]#
What I've tried until now is to create a symlink to the libatomic.so with this
ln -s /usr/lib64/libatomic.so.1.2.0 /usr/lib/libatomic.so
And installed the missing GNU library from here with the steps outline in the article.
Install CentOS SCLo RH repository:yum install centos-release-scl-rh
Install devtoolset-7-libatomic-devel rpm package:
# yum install devtoolset-7-libatomic-devel
What should I do to resolve it ?
Fixed by installing this package and it goes through to a new error, which I've outlitned in this question.
New question: New questions
To apply the fix for CentOS7 arm, use this link and the instructions on how to install the package.
Package Link
Install systemd-devel rpm package: yum install systemd-devel

AAPT2 aapt2-3.2.1-4818971-windows Daemon #0 - Error Often

I need you help and your support
Now, I'm on procces to build my project mobile apps with android studio
Why the R Layout always error once open the project and if try new project and R Layout can not be generated R layout.
Could help me please to solve this problem
Android resource compilation failed
Output: D:\sreza\AndroidStudioProjects\AttGeo\app\src\main\res\mipmap-anydpi-v26\ic_launcher.xml:1: error: not well-formed (invalid token).
Command: D:\sreza\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\daa36f831bb51fbb5d94ececae2a282c\aapt2-3.2.1-4818971-windows\aapt2.exe compile --legacy \
-o \
D:\sreza\AndroidStudioProjects\AttGeo\app\build\intermediates\res\merged\debug \
D:\sreza\AndroidStudioProjects\AttGeo\app\src\main\res\mipmap-anydpi-v26\ic_launcher.xml
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0

Chef - Recipe package fails to find candidate version

I am installing and configuring a very basic Jenkins installation using Chef. When i attempt to run the following recipe:
include_recipe "apt::default"
apt_repository "jenkins" do
uri "http://pkg.jenkins-ci.org/debian"
key "http://pkg.jenkins-ci.org/debian/jenkins-ci.org"
components ["binary/"]
action :add
end
package "jenkins" do
version '2.62'
end
service "jenkins" do
supports [:stop, :start, :restart]
action [:start, :enable]
end
I receive the following errors (displayed in the terminal):
192.168.9.207 [2017-05-25T10:50:58-04:00] ERROR: Running exception handlers
192.168.9.207 Running handlers complete
192.168.9.207 [2017-05-25T10:50:58-04:00] ERROR: Exception handlers complete
192.168.9.207 Chef Client failed. 2 resources updated in 20 seconds
192.168.9.207 [2017-05-25T10:50:58-04:00] INFO: Sending resource update report (run-id: 2b59b80e-b787-4e93-805b-837b4d3264fb)
192.168.9.207 [2017-05-25T10:50:58-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
192.168.9.207 [2017-05-25T10:50:58-04:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
192.168.9.207 [2017-05-25T10:50:58-04:00] ERROR: apt_package[jenkins] (jenkins-installation::default line 21) had an error: Chef::Exceptions::Package: No candidate version available for jenkins
192.168.9.207 [2017-05-25T10:50:58-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
The error explains that there is no candidate version available for Jenkins. After the run fails, if I run sudo apt-get update on the managed node I receive the following error:
Err http://pkg.jenkins-ci.org trusty/binary/ amd64 Packages
404 Not Found
Err http://pkg.jenkins-ci.org trusty/binary/ i386 Packages
404 Not Found
Ign http://pkg.jenkins-ci.org trusty/binary/ Translation-en_US
Ign http://pkg.jenkins-ci.org trusty/binary/ Translation-en
Fetched 5,976 kB in 3s (1,528 kB/s)
W: Failed to fetch http://pkg.jenkins-ci.org/debian/dists/trusty/binary//binary-amd64/Packages 404 Not Found
W: Failed to fetch http://pkg.jenkins-ci.org/debian/dists/trusty/binary//binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
I am fairly new to Chef. This error appears to be related to retrieving a Jenkins package, however I am not sure how to remedy this error. Please let me know if additional information is required to troubleshoot this issue.
Thank you to everybody in advance for any guidance you are able to provide. I have searched through the Chef documentation but haven't seen much aside from specifying the package version: https://docs.chef.io/resource_package.html.
Specify distribution 'binary/' instead of components 'binary/'. This will fix the 404s that you get because of trusty/binary/.
At least, this is what I see from the "official" Jenkins cookbook, which I btw. suggest to use.
EDIT: So the result would be:
apt_repository "jenkins" do
uri "http://pkg.jenkins-ci.org/debian"
key "http://pkg.jenkins-ci.org/debian/jenkins-ci.org"
distribution "binary/"
end

Resources