Getting this error while running ionic code in Android studio - AGPBI: {"kind":"error","text":"No resource identifier found for attribute - android-studio

I am working with Ionic project and I need to run this project with my android studio. I have resolved all the issues which are coming in the gradle file but when I am trying to run the code getting below error
error - No resource identifier found for attribute 'appComponentFactory' in package 'android'
enter image description here
above image is when I have fixed all the issue
but getting below error on runtime
**AGPBI: {"kind":"error","text":"No resource identifier found for attribute \u0027appComponentFactory\u0027 in package \u0027android\u0027","sources":[{"file":"/Users/naya-pc/Documents/Ionic/xyz/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml","position":{"startLine":57}}],"original":"","tool":"AAPT"}
/Users/naya-pc/Documents/Ionic/xyz/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:58: error: No resource identifier found for attribute 'appComponentFactory' in package 'android'
:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt**
Also, I have tried the basic technique to resolve this type of issue
1. clean project
2. rebuild project
3. invalidate the cache and restart
but still getting the same issue.
I have changed almost every gradle file with the new one and old one but getting the same issue below are my gradle and they are working gradle.
compile "com.android.support:support-v4:22.0.0"
compile "com.android.support:appcompat-v7:22.0.0"
compile "com.facebook.android:facebook-android-sdk:4.+"
compile "com.google.gms:google-services:+"
compile "com.google.android.gms:play-services-tagmanager:+"
compile "com.google.firebase:firebase-core:+"
compile "com.google.firebase:firebase-messaging:+"
compile "com.google.firebase:firebase-crash:+"
compile "com.google.firebase:firebase-config:+"
compile "com.google.android.gms:play-services-base:15.0.1"
compile "com.google.android.gms:play-services-ads:15.0.1"
compile "com.google.android.gms:play-services-auth:15.0.1"
compile "com.google.android.gms:play-services-identity:15.0.1"
Please help me if you have any solution for this issue.

Related

app:compileDebugJavaWithJavac task failing, erroring out on its own code

I'm getting this error after running npx react-native run-android, and I'm new to react and node in general so I'm not sure what could be going on.
gradle build --warning-mode all runs successfully with no issue. Not sure what could be going on. Running react-native upgrade doesn't help as suggested in similar questions, but it does give the error "Accessing non-existent property 'padLevels' of module exports inside circular dependency", though I think it's unrelated.
I'm on npm 6.14.10, node v14.15.4, Gradle 6.4, react-native-cli 2.0.1, react-native 0.63.4, openjdk 14.0.2
> Task :app:compileDebugJavaWithJavac FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.4/userguide/command_line_interface.html#sec:command_line_warnings
106 actionable tasks: 2 executed, 104 up-to-date
/android/app/src/main/java/com/test/MainApplication.java:20: error: cannot find symbol
return BuildConfig.DEBUG;
^
symbol: variable BuildConfig
/android/app/src/main/java/com/test/MainApplication.java:59: error: cannot find symbol
if (BuildConfig.DEBUG) {
^
symbol: variable BuildConfig
location: class MainApplication
/android/app/src/main/java/com/test/MainApplication.java:59: error: illegal parenthesized expression
if (BuildConfig.DEBUG) {
^
Note: /android/app/src/debug/java/com/test/ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Yocto error: Building libreoffice package fails in do_package task

I would like to integrate libreoffice on my tx6s-8035 KARO Board using yocto. I use Ka-ro NXP/Freescale Yocto Project Community BSP recipe layers for yocto distro krogoth. I add too the meta-office layer from open-embedded. I have been facing many issues about packages and libraries dependency to build the libreoffice package. The do_compile task work well but the do_package task fails with the following error:
ERROR: libreoffice-5.0.6.3-r0 do_package: QA Issue: File
'/usr/lib/libreoffice/share/extensions/mysql-connector-
ooo/libmysqlclient_r.so' from libreoffice was already stripped, this will
prevent future debugging! [already-stripped]
WARNING: libreoffice-5.0.6.3-r0 do_package: libreoffice language file
pattern not found: /usr/lib/libreoffice/share/template/%{1}
ERROR: libreoffice-5.0.6.3-r0 do_package: Fatal QA errors found, failing
task.
ERROR: libreoffice-5.0.6.3-r0 do_package: Function failed: do_package
ERROR: Logfile of failure stored in: /home/sconte/fsl-community-
bsp/build_8135_cim/tmp/work/cortexa9hf-neon-poky-linux-
gnueabi/libreoffice/5.0.6.3-r0/temp/log.do_package.8211
ERROR: Task 11 (/home/sconte/fsl-community-bsp/sources/meta-office/recipes-
libreoffice/libreoffice/libreoffice.bb, do_package) failed with exit code
'1'
Here is the log.do_package file output: log.do_package
I view in this file that there is runstrip function which is executed on the same library it cound not find. What does runstrip means? How can i work around this issue?
You can add INSANE_SKIP_${PN}_append = "already-stripped" to libreoffice_%.bbappend recipe to fix this QA error. You can also send a patch upstream by following README.

Alljoyn android Events and Actions sample not working

Trying to run Android sample 'Events and Actions' downloaded from https://allseenalliance.org/framework/download
Downloaded 'Core SDK - debug' which has sample eventaction and .apk in bin folder.
Installed it, but doesn't work. Is anyone able to run it?
Edit: Exception in the Logcat:
08-29 09:06:16.978 29314 29328 E AndroidRuntime: Process: org.allseen.sample.eventaction, PID: 29314
08-29 09:06:16.978 29314 29328 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__exidx_end" referenced by "/data/app/org.allseen.sample.eventaction-1/lib/arm/libMyAllJoynCode.so"...
I have tried building the library MyAllJoynCode.so using Android ndk, but I couldn't able to build it. I get below exception
root#jay-dev:~/alljoyn/core/alljoyn/alljoyn_core/samples/eventaction/Android# ndk-build
[arm64-v8a] Compile++ : MyAllJoynCode <= AndroidJNIBridge.cc
In file included from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/qcc/atomic.h:30:0,
from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/qcc/ManagedObj.h:38,
from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/alljoyn/Message.h:30,
from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/alljoyn/AuthListener.h:32,
from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/alljoyn/BusAttachment.h:34,
from jni/event/AndroidJNIBridge.cc:19:
/root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/qcc/posix/atomic.h:30:25: fatal error: sys/atomics.h: No such file or directory
#include
^
compilation terminated.
/root/android-ndk-r12b/android-ndk-r12b/build/core/build-binary.mk:474: recipe for target 'obj/local/arm64-v8a/objs/MyAllJoynCode/event/AndroidJNIBridge.o' failed
make: *** [obj/local/arm64-v8a/objs/MyAllJoynCode/event/AndroidJNIBridge.o] Error 1
It looks like you were using Android NDK level 20 (or later).
The NDK's android-20 platform directory no longer contains the atomics.h file (they removed it), which caused the AllJoyn build failure you saw:
dist/cpp/inc/qcc/posix/atomic.h:30:25: fatal error: sys/atomics.h: No such file or directory
Prior to AllJoyn release 16.10, a workaround is simply to copying the NDK's android-19 atomics.h file to its android-20 (or later) platform directory.
However, the AllJoyn-related issue has been fixed as of September 2016 (i.e. no longer dependent on atomics.h), and the fix is included in AllJoyn release 16.10.
More information is provided in JIRA https://jira.allseenalliance.org/browse/ASACORE-3216

Android studio - package com.google.android.gms.authn does not exist

Using android-studio 1.5 and getting error when run in device
Error:(26, 36) error: package com.google.android.gms.authn does not exist
Added in gradle setting
dependencies {
compile 'com.google.android.gms:play-services-gcm:+'
compile 'com.google.android.gms:play-services-location:+'
}. Help to fix

Cant run an Android Studio project with Apache POI libraries

For the second time I decided to give a try to Android Studio.
So I imported a project that uses Apache POI libraries, and others.
This is my dependencies:
compile 'com.google.http-client:google-http-client-gson:1.19.0'
compile 'com.google.code.gson:gson:2.1'
compile 'com.android.support:appcompat-v7:19.1.0'
compile 'com.google.android.gms:play-services:+'
compile files('libs/commons-codec-1.9.jar')
compile files('libs/commons-logging-1.1.3.jar')
compile files('libs/google-api-client-1.16.0-rc.jar')
compile files('libs/google-api-client-android-1.16.0-rc.jar')
compile files('libs/google-api-services-drive-v2-rev111-1.16.0-rc.jar')
compile files('libs/google-http-client-1.16.0-rc.jar')
compile files('libs/google-http-client-android-1.16.0-rc.jar')
compile files('libs/google-http-client-jackson-1.16.0-rc.jar')
compile files('libs/google-http-client-jackson2-1.16.0-rc.jar')
compile files('libs/google-oauth-client-1.16.0-rc.jar')
compile files('libs/jackson-core-2.1.3.jar')
compile files('libs/jsr305-1.3.9.jar')
compile files('libs/log4j-1.2.17.jar')
compile files('libs/poi-3.11-20141221.jar')
When I try to run, I have this error:
04:27:59.765 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
04:27:59.766 [ERROR] [org.gradle.BuildExceptionReporter]
04:27:59.767 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
04:27:59.768 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':app:dexDebug'.
04:27:59.769 [ERROR] [org.gradle.BuildExceptionReporter] > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_75\bin\java.exe'' finished with non-zero exit value 2
When compiling with --stacktrace --info --debug, I get this:
04:27:59.754 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"SIMPLE","text":"UNEXPECTED TOP-LEVEL EXCEPTION:","position":{},"original":"UNEXPECTED TOP-LEVEL EXCEPTION:"}
AGPBI: {"kind":"SIMPLE","text":"com.android.dex.DexException: Multiple dex files define Lcom/google/api/client/util/StreamingContent;","position":{},"original":"com.android.dex.DexException: Multiple dex files define Lcom/google/api/client/util/StreamingContent;"}
I noticed that when I remove the poi-3.11-20141221.jar everything works fine.
I searched for a long time this issue but I'm starting to get sick of it and considering seriously to return to eclipse for good.
So my question is:
What I am suppose to do to get my project works in Android Studio with POI libaries?
Thank you
I get it!!!
I realize the problem was using Apache POI, google drive and Google Play service libraries in the same project. All these libs introduce too many methods in my project.
To avoid the compile error, I just enable the multiDex in the build gradle:
defaultConfig {
multiDexEnabled = true
}
And it works! So happy now :)
I found this solution here:
Unable to execute dex: method ID not in [0, 0xffff]: 65536

Resources