Android resource linking failed when i try to compile - javascript

this is a demo app with empty activity it shows the error in the android studio when i compile or build the project . even though when i run that in react-native run-android it shows out the same error please to suggest some tips to trouble shoot this issue.
Android resource linking failed
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:136: error: resource android:color/black not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:138: error: resource android:color/black not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:139: error: resource android:color/black not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:143: error: resource android:color/white not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:150: error: resource android:color/white not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:151: error: resource android:color/black not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:163: error: resource android:color/white not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:164: error: resource android:color/black not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:181: error: resource android:color/black not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:772: error: resource android:color/transparent not found.
E:\reactapp\Demo\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:967: error: resource android:color/transparent not found.
error: failed linking references.

Related

Getting error on running mobile application with Appium server using npm test in VSC with Javascript language

terminal
Error -Request failed with status 404 due to unknown command: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource.
Appium error - GET /wd/hub/session/f12edc62-bd9f-45fb-882b-7d624dc33238/timeouts 404

Execution failed for task ':react-native-admob:verifyReleaseResources'

I had a third-party dependency (react-native-admob) which specified in its build.gradle file the following: com.google.android.gms:play-services-ads:+. Taking a look over at the Google Android APIs release notes page, there were breaking updates to the whole com.google.android.gms group of APIs on 17th June 2019.
I run './gradlew assembleDebug' got error:
/Users/yons/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/8cb1ac92f08bb5fb26b003aaf1d22a69/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/yons/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/8cb1ac92f08bb5fb26b003aaf1d22a69/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/ttcIndex not found.
To fix my issue, I added the following to my android/app/build.gradle file:
configurations.all {
resolutionStrategy.force 'com.google.android.gms:play-services-ads:17.2.1'
}
Now, I run './gradlew assembleDebug' works fine.
But I run './gradlew assembleRelease' got an error:
/Users/yons/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/8cb1ac92f08bb5fb26b003aaf1d22a69/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/yons/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/8cb1ac92f08bb5fb26b003aaf1d22a69/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-admob:verifyReleaseResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt
How can I solve it?
The root cause is related migration to Androidx, google play service updated to androidX
This problem belongs to react-native-device-info? best option is to upgrade react-native-device-info using
yarn upgrade react-native-device-info#2.1.2
cd android && gradlew clean
react-native run-android
After which you either change it like explained in the answer above. like so
implementation(project(":react-native-admob"), {
exclude group: "com.google.android.gms"
})
implementation "com.google.android.gms:play-services-ads:16.0.0"

React native Android Generate Signed APK giving Resource error

I have completed my android project on React Native and finding this error while compiling the project for Signed Apk.
> Task :react-native-video:compileReleaseJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
/Users/kedardave/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/e10f37597a16932be24db019d75c890a/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
/Users/kedardave/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/e10f37597a16932be24db019d75c890a/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.
/Users/kedardave/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/e10f37597a16932be24db019d75c890a/res/values-v26/values-v26.xml:17:5-93:AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
/Users/kedardave/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/e10f37597a16932be24db019d75c890a/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontStyle not found.
/Users/kedardave/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/e10f37597a16932be24db019d75c890a/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/font not found.
/Users/kedardave/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/e10f37597a16932be24db019d75c890a/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontWeight not found.
error: failed linking references.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-keep-awake:verifyReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* 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 2m 42s
132 actionable tasks: 100 executed, 32 up-to-date
These are the problems I am getting, these are about resources and I don't know how to resolve it. It seems like Version issue with targetSDK but can't figure out
Change supportLibVersion of build.gradle of your project to 27.1.1
Edit
How about adding below code to build.gradle of project,
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 27
buildToolsVersion "27.1.1"
}
}
}
}

CHILD_PROCESS , DGRAM , DEFAULTABLE.js

can you help me please with this errors :
I want to connect to a locally ip by ssh and i cant because i don't have the libraries , i tried to download them but they're empty .
WARNING in ./node_modules/defaultable/defaultable.js
49:13-31 Critical dependency: the request of a dependency is an
expression
ERROR in ./node_modules/simple-ssh/node_modules/ssh2/lib/agent.js
Module not found: Error: Can't resolve 'child_process' in
'/home/mehdi/Escritorio/Login2/node_modules/simple-ssh/node_modules/ssh2/lib'
ERROR in ./node_modules/native-dns-cache/lookup.js
Module not found: Error: Can't resolve 'dgram' in
'/home/mehdi/Escritorio/Login2/node_modules/native-dns-cache'
ERROR in ./node_modules/native-dns/lib/server.js
Module not found: Error: Can't resolve 'dgram' in
'/home/mehdi/Escritorio/Login2/node_modules/native-dns/lib'
ERROR in ./node_modules/native-dns/lib/utils.js
Module not found: Error: Can't resolve 'dgram' in
'/home/mehdi/Escritorio/Login2/node_modules/native-dns/lib'
Thank you very Much.

Getting error in building project in using bower, nodejs, grunt

I have created project using nodejs,
bower packages are installed but not added the tags in index.html, so I have manually inserted the script tags like ../bower_components
so I am getting this error
http://localhost:9000/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
2016-05-24 18:11:04.419 http://localhost:9000/bower_components/angular-ui-router/release/angular-ui-router.js Failed to load resource: the server responded with a status of 404 (Not Found)
2016-05-24 18:11:04.581 angular.js:4587 Uncaught Error: [$injector:modulerr] Failed to instantiate module bulbulPortal20App due to:
Error: [$injector:modulerr] Failed to instantiate module ui.bootstrap due to:
Error: [$injector:nomod] Module 'ui.bootstrap' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
to avoid these errors in future what I have to do?

Categories