React Native, Execution failed for task ':app:mergeDexDebug' - android

I'm trying to run my app in physical device but getting that error. I tried to clean gradlew with cd android and ./gradlew clean. I also tried to clean cache but it's giving that error. I just install the react navigation and stack navigation after that I'm getting that error I also tried to reinstall navigation packages but still getting same error. Can anyone help me please? error and package.json is below
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDexDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
package.json
"dependencies": {
"#react-native-community/google-signin": "^5.0.0",
"#react-native-community/masked-view": "^0.1.10",
"#react-navigation/native": "^5.8.4",
"#react-navigation/stack": "^5.12.1",
"is_js": "^0.9.0",
"react": "16.13.1",
"react-native": "^0.63.1",
"react-native-fbsdk": "^2.0.0",
"react-native-flash-message": "^0.1.16",
"react-native-gesture-handler": "^1.8.0",
"react-native-localization": "^2.1.6",
"react-native-reanimated": "^1.13.1",
"react-native-safe-area-context": "^3.1.8",
"react-native-screens": "^2.12.0",
"react-native-vector-icons": "^7.1.0",
"react-native-webview": "^10.10.0"
},

According to the Docs
When your app and the libraries it references exceed 65,536 methods, you encounter a build error that indicates your app has reached the limit of the Android build architecture
You may try enabling multiDex to resolve this issue
In your android/app/build.gradle
defaultConfig {
/** ... */
multiDexEnabled true
}
Clean your build and any installed instances in your physical-device as a precaution

Related

RL - Eas build apk error: Don't know which android drawable suffix to use for asset

I am maintaining the RL app.
After modifying the code, I want to test it by building it with apk.
I'm going to create an apk using eas build -p android --profile preview. (This is my first time using Eas Build).
However, the following error occurs during the build:
> Task :app:bundleReleaseJsAndAssets FAILED
[stderr] error Don't know which android drawable suffix to use for asset: {"__packager_asset":true,"fileSystemLocation":"/home/expo/workingdir/build/assets/images/navigation/service","httpServerLocation":"/assets/assets/images/navigation/service","width":320,"height":130,"scales":[1,2,3,4,5],"files":["/home/expo/workingdir/build/assets/images/navigation/service/reservation_thum_img_1.png","/home/expo/workingdir/build/assets/images/navigation/service/reservation_thum_img_1#2x.png","/home/expo/workingdir/build/assets/images/navigation/service/reservation_thum_img_1#3x.png","/home/expo/workingdir/build/assets/images/navigation/service/reservation_thum_img_1#4x.png","/home/expo/workingdir/build/assets/images/navigation/service/reservation_thum_img_1#5x.png"],"hash":"b74c4d596b7a00b174f1cbbf6373edac","name":"reservation_thum_img_1","type":"png","fileHashes":["f8e111b8eadda7d33612a89b3337968d","08bbb315b8db585383bafaf3bbbb159f","b410e37fc8c275c98f2b07711193b9d2","5bc21bf4e96ae2a26d0f1f41a0bb9dc8","f9883a5447a863dde859d547da0c0fe7"]}.
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
Execution optimizations have been disabled for 3 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
933 actionable tasks: 933 executed
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:bundleReleaseJsAndAssets'.
[stderr] > Process 'command 'node'' finished with non-zero exit value 1
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 12m 49s
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
It's my package.json and eas.json code
// package.json
{
"name": "my-app",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject",
"test": "jest --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"resolutions": {},
"dependencies": {
"#expo/react-native-action-sheet": "^4.0.1",
"#expo/samples": "~3.0.3",
"#expo/vector-icons": "^13.0.0",
"#fortawesome/fontawesome-svg-core": "^6.2.1",
"#fortawesome/free-solid-svg-icons": "^6.2.1",
"#fortawesome/react-native-fontawesome": "^0.3.0",
"#react-native-async-storage/async-storage": "^1.17.11",
"#react-native-community/datetimepicker": "6.1.2",
"axios": "^1.2.6",
"crypto-js": "^4.1.1",
"expo": "^45.0.0",
"expo-app-loading": "~2.0.0",
"expo-asset": "~8.5.0",
"expo-blur": "~11.1.0",
"expo-camera": "~12.2.0",
"expo-cli": "^6.2.1",
"expo-constants": "~13.1.1",
"expo-file-system": "~14.0.0",
"expo-font": "~10.1.0",
"expo-image-manipulator": "~10.3.1",
"expo-image-picker": "~13.1.1",
"expo-linking": "~3.1.0",
"expo-location": "~14.2.2",
"expo-notifications": "~0.15.4",
"expo-splash-screen": "^0.15.1",
"expo-status-bar": "~1.3.0",
"expo-updates": "~0.13.4",
"expo-web-browser": "~10.2.1",
"global": "^4.4.0",
"immutable": "^4.2.2",
"intl": "^1.2.5",
"jwt-decode": "^3.1.2",
"moment": "^2.29.4",
"qs": "^6.11.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-geocode": "^0.2.3",
"react-native": "0.68.2",
"react-native-dash": "^0.0.11",
"react-native-easy-toast": "^2.3.0",
"react-native-elements": "^3.4.3",
"react-native-gesture-handler": "~2.2.1",
"react-native-image-resizer": "^1.0.1",
"react-native-maps": "0.30.2",
"react-native-measureme": "^0.0.2",
"react-native-modal": "^13.0.1",
"react-native-modal-datetime-picker": "^14.0.1",
"react-native-picker-select": "^8.0.4",
"react-native-push-notification-popup": "^1.6.1",
"react-native-qrcode": "^0.2.7",
"react-native-safe-area-context": "4.2.4",
"react-native-screens": "~3.11.1",
"react-native-status-bar-height": "^2.6.0",
"react-native-svg": "12.3.0",
"react-native-svg-transformer": "^1.0.0",
"react-native-web": "0.17.7",
"react-native-webview": "11.18.1",
"react-navigation": "^3.11.0",
"react-redux": "^8.0.5",
"redux": "^4.2.1",
"redux-actions": "^2.6.5",
"redux-devtools-extension": "^2.13.8",
"redux-pender": "^2.0.12",
"underscore": "^1.13.6"
},
"devDependencies": {
"#babel/core": "^7.12.9"
},
"private": true
}
.
// eas.json
{
"cli": {
"version": ">= 3.5.2"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {
"android": {
"buildType": "apk"
}
}
},
"submit": {
"production": {}
}
}
May I know the cause and solution for this problem?
Thank you.
I think this is a duplicate of this question. Please try the solutions provided for this question.
Question link: Detected multiple Kotlin daemon sessions at build\kotlin\sessions - React-Native

Error About React Native Execution (React Native gives unknow error after execution completed)

I was implementing Video Call module on my Project before getting this error. When I run react native project using npx react-native run-android. It gives me unknown errors. I have followed many articles to solve it but my problem is still there.
Error Which I got while execution. When 99% execution successfully completes then it gives me the error.
info JS server already running.
info Installing the app...
> Configure project :app
WARNING:The option setting 'android.enableDexingArtifactTransform.desugaring=false' is experimental.
The current default is 'true'.
> Configure project :react-native-firebase_app
:react-native-firebase_app package.json found at C:\Users\ZAIIIN\ChatApp\node_modules\#react-native-firebase\app\package.json
:react-native-firebase_app:firebase.bom using default value: 30.5.0
:react-native-firebase_app:play.play-services-auth using default value: 20.3.0
:react-native-firebase_app package.json found at C:\Users\ZAIIIN\ChatApp\node_modules\#react-native-firebase\app\package.json
:react-native-firebase_app:version set from package.json: 15.7.0 (15,7,0 - 15007000)
:react-native-firebase_app:android.compileSdk using custom value: 31
:react-native-firebase_app:android.targetSdk using custom value: 31
:react-native-firebase_app:android.minSdk using custom value: 21
:react-native-firebase_app:reactNativeAndroidDir C:\Users\ZAIIIN\ChatApp\node_modules\react-native\android
> Configure project :react-native-firebase_auth
:react-native-firebase_auth package.json found at C:\Users\ZAIIIN\ChatApp\node_modules\#react-native-firebase\auth\package.json
:react-native-firebase_app package.json found at C:\Users\ZAIIIN\ChatApp\node_modules\#react-native-firebase\app\package.json
:react-native-firebase_auth:firebase.bom using default value: 30.5.0
:react-native-firebase_auth package.json found at C:\Users\ZAIIIN\ChatApp\node_modules\#react-native-firebase\auth\package.json
:react-native-firebase_auth:version set from package.json: 15.7.0 (15,7,0 - 15007000)
:react-native-firebase_auth:android.compileSdk using custom value: 31
:react-native-firebase_auth:android.targetSdk using custom value: 31
:react-native-firebase_auth:android.minSdk using custom value: 21
:react-native-firebase_auth:reactNativeAndroidDir C:\Users\ZAIIIN\ChatApp\node_modules\react-native\android
> Configure project :react-native-firebase_firestore
:react-native-firebase_firestore package.json found at C:\Users\ZAIIIN\ChatApp\node_modules\#react-native-firebase\firestore\package.json
:react-native-firebase_app package.json found at C:\Users\ZAIIIN\ChatApp\node_modules\#react-native-firebase\app\package.json
:react-native-firebase_firestore:firebase.bom using default value: 30.5.0
:react-native-firebase_firestore package.json found at C:\Users\ZAIIIN\ChatApp\node_modules\#react-native-firebase\firestore\package.json
:react-native-firebase_firestore:version set from package.json: 15.7.0 (15,7,0 - 15007000)
:react-native-firebase_firestore:android.compileSdk using custom value: 31
:react-native-firebase_firestore:android.targetSdk using custom value: 31
:react-native-firebase_firestore:android.minSdk using custom value: 21
:react-native-firebase_firestore:reactNativeAndroidDir C:\Users\ZAIIIN\ChatApp\node_modules\react-native\android
> Configure project :react-native-firebase_storage
:react-native-firebase_storage package.json found at C:\Users\ZAIIIN\ChatApp\node_modules\#react-native-firebase\storage\package.json
:react-native-firebase_app package.json found at C:\Users\ZAIIIN\ChatApp\node_modules\#react-native-firebase\app\package.json
:react-native-firebase_storage:firebase.bom using default value: 30.5.0
:react-native-firebase_storage package.json found at C:\Users\ZAIIIN\ChatApp\node_modules\#react-native-firebase\storage\package.json
:react-native-firebase_storage:version set from package.json: 15.7.0 (15,7,0 - 15007000)
:react-native-firebase_storage:android.compileSdk using custom value: 31
:react-native-firebase_storage:android.targetSdk using custom value: 31
:react-native-firebase_storage:android.minSdk using custom value: 21
:react-native-firebase_storage:reactNativeAndroidDir C:\Users\ZAIIIN\ChatApp\node_modules\react-native\android
> Configure project :react-native-reanimated
AAR for react-native-reanimated has been found
C:\Users\ZAIIIN\ChatApp\node_modules\react-native-reanimated\android\react-native-reanimated-70-hermes.aar
WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33
This Android Gradle plugin (7.2.1) was tested up to compileSdk = 32
This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=33
to this project's gradle.properties
The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 33
> Task :app:mergeDebugNativeLibs FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
347 actionable tasks: 3 executed, 344 up-to-date
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
> 2 files found with path 'lib/arm64-v8a/New folder/libjingle_peerconnection_so.so' from inputs:
- C:\Users\ZAIIIN\.gradle\caches\transforms-3\b259cd2cc3b41e1063fc5003f03931e5\transformed\jetified-libjingle_peerconnection.so\arm64-v8a\New folder\libjingle_peerconnection_so.so
- C:\Users\ZAIIIN\.gradle\caches\transforms-3\a88d183cc228d5f56d1c5c48beedc372\transformed\jetified-libjingle_peerconnection.so\arm64-v8a\New folder\libjingle_peerconnection_so.so
If you are using jniLibs and CMake IMPORTED targets, see
https://developer.android.com/r/tools/jniLibs-vs-imported-targets
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* 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 1m 3s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
> 2 files found with path 'lib/arm64-v8a/New folder/libjingle_peerconnection_so.so' from inputs:
- C:\Users\ZAIIIN\.gradle\caches\transforms-3\b259cd2cc3b41e1063fc5003f03931e5\transformed\jetified-libjingle_peerconnection.so\arm64-v8a\New folder\libjingle_peerconnection_so.so
- C:\Users\ZAIIIN\.gradle\caches\transforms-3\a88d183cc228d5f56d1c5c48beedc372\transformed\jetified-libjingle_peerconnection.so\arm64-v8a\New folder\libjingle_peerconnection_so.so
If you are using jniLibs and CMake IMPORTED targets, see
https://developer.android.com/r/tools/jniLibs-vs-imported-targets
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* 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 1m 3s
at makeError (C:\Users\ZAIIIN\ChatApp\node_modules\#react-native-community\cli-platform-android\node_modules\execa\in at C:\Users\ZAIIIN\ChatApp\node_modules\#react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\Users\ZAIIIN\ChatApp\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\ZAIIIN\ChatApp\node_modules\#react-native-community\cli\build\index.js:142:9)info Run CLI with --verbose flag for more details.
Packags
{
"name": "ChatApp",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"#react-native-community/masked-view": "^0.1.11",
"#react-native-community/netinfo": "^9.3.7",
"#react-native-firebase/app": "^15.7.0",
"#react-native-firebase/auth": "^15.7.0",
"#react-native-firebase/firestore": "^15.7.0",
"#react-native-firebase/storage": "^15.7.0",
"#react-navigation/bottom-tabs": "^6.4.3",
"#react-navigation/native": "^6.0.16",
"#react-navigation/native-stack": "^6.9.4",
"#reduxjs/toolkit": "^1.9.1",
"#videosdk.live/react-native-sdk": "^0.0.41",
"radio-buttons-react-native": "^1.0.4",
"react": "18.1.0",
"react-native": "^0.70.6",
"react-native-flash-message": "^0.3.1",
"react-native-gesture-handler": "^2.8.0",
"react-native-gifted-chat": "^1.0.4",
"react-native-image-picker": "^4.10.2",
"react-native-incall-manager": "^4.0.1",
"react-native-popup-menu": "^0.16.1",
"react-native-push-notification": "^8.1.1",
"react-native-reanimated": "^2.13.0",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "^3.18.2",
"react-native-vector-icons": "^9.2.0",
"react-native-video": "^5.2.1",
"react-native-webrtc": "^106.0.1",
"react-navigation": "^4.4.4",
"react-redux": "^8.0.5"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#babel/runtime": "^7.12.5",
"#react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^29.3.1",
"eslint": "^7.32.0",
"jest": "^29.3.1",
"metro-react-native-babel-preset": "0.72.3",
"react-test-renderer": "18.1.0"
},
"jest": {
"preset": "react-native"
}
}
Android/App/build.gradle
buildToolsVersion = "31.0.0"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
I faced this problem after applying Video Call Module. Please help me to solve this problem. Thank You!!!

Having issues running react-native run-android

Since I've installed react-native-vector-icons, I've been fancing trouble trying to run the app on my android.
This is what it shows when I try the react-native run-android command:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':react-native-vector-icons'.
Could not resolve all dependencies for configuration ':react-native-vector-icons:classpath'.
Could not load module metadata from C:\Users\Pichau.gradle\caches\modules-2\metadata-2.71\descriptors\org.jetbrains.kotlin\kotlin-stdlib-common\1.3.20\475b59a03ea03e6388c8f34eee6a9d08\descriptor.bin
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 10s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run
CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':react-native-vector-icons'.
Could not resolve all dependencies for configuration ':react-native-vector-icons:classpath'.
Could not load module metadata from C:\Users\Pichau.gradle\caches\modules-2\metadata-2.71\descriptors\org.jetbrains.kotlin\kotlin-stdlib-common\1.3.20\475b59a03ea03e6388c8f34eee6a9d08\descriptor.bin
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 10s
at checkExecSyncError (child_process.js:621:11)
at execFileSync (child_process.js:639:15)
at runOnAllDevices (C:\Users\Pichau\Desktop\PetCare-RN\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
at buildAndRun (C:\Users\Pichau\Desktop\PetCare-RN\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\Users\Pichau\Desktop\PetCare-RN\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async Command.handleAction (C:\Users\Pichau\Desktop\PetCare-RN\node_modules\#react-native-community\cli\build\cliEntry.js:160:7)
Here's my package.json file
{
"name": "petcare",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"react": "16.8.6",
"react-native": "0.60.5",
"react-native-gesture-handler": "^1.3.0",
"react-native-vector-icons": "^6.6.0",
"react-navigation": "^3.11.1"
},
"devDependencies": {
"#babel/core": "^7.5.0",
"#babel/runtime": "^7.5.0",
"#react-native-community/eslint-config": "^0.0.3",
"babel-jest": "^24.1.0",
"jest": "^24.1.0",
"metro-react-native-babel-preset": "0.54.1",
"react-test-renderer": "16.8.6"
},
"jest": {
"preset": "react-native"
}
}

React Native signed apk fails after upgrading the gradle build tool version to 3.2.1

After upgrading the following line in the build.gradle file
classpath 'com.android.tools.build:gradle:3.2.1'
and below line in gradle-wrapper.properties file
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
the signed release apk of my app is not working at all. Though when I am running the app in development mode everything is working fine.
Below is the error i am getting in the android studio logcat -
2018-11-23 17:49:24.552 3506-3570/? E/AndroidRuntime: FATAL EXCEPTION:
Thread-2
Process: com.simplydatanow.driverapp, PID: 3506
java.lang.RuntimeException: Unable to load script from assets 'index.android.bundle'. Make sure your bundle is packaged correctly or
you're running a packager server.
at com.facebook.react.bridge.CatalystInstanceImpl.jniLoadScriptFromAssets(Native
Method)
at com.facebook.react.bridge.CatalystInstanceImpl.loadScriptFromAssets(CatalystInstanceImpl.java:216)
at com.facebook.react.bridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:33)
at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:234)
at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1137)
at com.facebook.react.ReactInstanceManager.access$900(ReactInstanceManager.java:113)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:944)
at java.lang.Thread.run(Thread.java:764)
This is the signed release apk, so index.android.bundle should be already present inside the apk. But somehow it is not able to find that. Any help is appreciated.
All dependecies in package.json -
"dependencies": {
"moment": "^2.22.2",
"polished": "^1.9.2",
"react": "16.2.0",
"react-native": "0.52.0",
"react-native-auth0": "^1.2.2",
"react-native-background-fetch": "^2.4.3",
"react-native-background-task": "^0.2.1",
"react-native-compress-image": "^2.0.1",
"react-native-datepicker": "^1.7.2",
"react-native-document-picker": "^2.1.0",
"react-native-elements": "^0.19.0",
"react-native-fab": "^1.0.8",
"react-native-fetch-blob": "^0.10.8",
"react-native-floating-action": "^1.13.0",
"react-native-fs": "^2.10.14",
"react-native-image-cache-hoc": "^2.0.0",
"react-native-image-picker": "^0.26.10",
"react-native-image-progress": "^1.1.0",
"react-native-image-to-pdf": "^1.0.0",
"react-native-image-zoom-viewer": "^2.2.24",
"react-native-keyboard-aware-scroll-view": "^0.5.0",
"react-native-keyboard-aware-view": "^0.0.14",
"react-native-pdf": "^5.0.9",
"react-native-progress": "^3.4.0",
"react-native-scrollable-tab-view": "^0.8.0",
"react-native-simple-dialogs": "^0.4.1",
"react-native-star-rating": "^1.0.8",
"react-native-timer-component": "^1.0.2",
"react-native-uuid-generator": "^4.0.1",
"react-native-vector-icons": "^4.6.0",
"react-navigation": "^2.14.2",
"react-redux": "^5.0.7",
"redux": "^3.7.2"
},
change version code and version name in build.gradle(Module:app)
Go to Build-->Generate Signed Bundle or Apk--> choose APK--> click on 'Next'--> Enter keystore credentials or if you don't have create it--> check both V1 and V2 in signature versions--> click on finish to generate signed APK.
Upload this APK to playstore

Build failed with message “processF0F1DebugResources FAILED”

I'm trying to build this template for android, which I haven't modified yet. But the build fails with this message:
Searching for devices...
Executing before-liveSync hook from C:\repos\rolagroup-frontend\hooks\before-liveSync\nativescript-angular-sync.js
Skipping prepare.
Building project...
> Configuring > 0/3 projects > root project
:config phase: createDefaultIncludeFiles
+found plugins: nativescript-social-login
+found plugins: tns-core-modules-widgets
:config phase: createPluginsConfigFile
Creating product flavors include.gradle file in C:\repos\rolagroup-frontend\platforms\android/configurations folder...
:config phase: pluginExtend
+applying configuration from: C:\repos\rolagroup-frontend\platforms\android\configurations\include.gradle
+applying configuration from: C:\repos\rolagroup-frontend\platforms\android\configurations\nativescript-social-login\include.gradle
+applying configuration from: C:\repos\rolagroup-frontend\platforms\android\configurations\tns-core-modules-widgets\include.gradle
> Configuring > 0/3 projects > root project
:config phase: addAarDependencies
+adding dependency: C:\repos\rolagroup-frontend\platforms\android\libs\aar\widgets-release.aar
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
Incremental java compilation is an incubating feature.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_cogdyo42bssvgewop3zivk6w6.run(C:\repos\rolagroup-frontend\platforms\android\build-tools\android-static-binding-generator\build.gradle:126)
:preBuild UP-TO-DATE
:preF0F1DebugBuild UP-TO-DATE
:checkF0F1DebugManifest
:preF0F1ReleaseBuild UP-TO-DATE
:prepareComAndroidSupportAnimatedVectorDrawable2531Library UP-TO-DATE
:prepareComAndroidSupportAppcompatV72531Library UP-TO-DATE
:prepareComAndroidSupportDesign2531Library UP-TO-DATE
:prepareComAndroidSupportRecyclerviewV72531Library UP-TO-DATE
:prepareComAndroidSupportSupportCompat2531Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUi2531Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUtils2531Library UP-TO-DATE
:prepareComAndroidSupportSupportFragment2531Library UP-TO-DATE
:prepareComAndroidSupportSupportMediaCompat2531Library UP-TO-DATE
:prepareComAndroidSupportSupportV42531Library UP-TO-DATE
:prepareComAndroidSupportSupportVectorDrawable2531Library UP-TO-DATE
:prepareComAndroidSupportTransition2531Library UP-TO-DATE
:prepareComDigitsSdkAndroidDigits1103Library UP-TO-DATE
:prepareComFacebookAndroidFacebookAndroidSdk460Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesAuth840Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:prepareComTwitterSdkAndroidTweetComposer104Library UP-TO-DATE
:prepareComTwitterSdkAndroidTweetUi1102Library UP-TO-DATE
:prepareComTwitterSdkAndroidTwitter1132Library UP-TO-DATE
:prepareComTwitterSdkAndroidTwitterCore167Library UP-TO-DATE
:prepareIoFabricSdkAndroidFabric1311Library UP-TO-DATE
:prepareRolagroupfrontendRuntimeUnspecifiedLibrary UP-TO-DATE
:prepareWidgetsReleaseLibrary UP-TO-DATE
:prepareF0F1DebugDependencies
:compileF0F1DebugAidl UP-TO-DATE
:compileF0F1DebugRenderscript UP-TO-DATE
:generateF0F1DebugBuildConfig UP-TO-DATE
:cleanLocalAarFiles
:ensureMetadataOutDir
:collectAllJars
:setProperties
:generateTypescriptDefinitions SKIPPED
:copyTypings SKIPPED
:asbg:generateInterfaceNamesList
:asbg:traverseJsFiles
:asbg:runAstParser
Running full build
finished with reading lines with js files
:asbg:generateBindings
:generateF0F1DebugResValues UP-TO-DATE
:generateF0F1DebugResources UP-TO-DATE
:mergeF0F1DebugResources UP-TO-DATE
:processF0F1DebugManifest UP-TO-DATE
:processF0F1DebugResources
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:17:24-47: AAPT: No resource found that matches the given name (at 'value' with value '#string/facebook_app_id').
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:22:24-40: AAPT: No resource found that matches the given name (at 'label' with value '#string/app_name').
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:42:24-40: AAPT: No resource found that matches the given name (at 'label' with value '#string/app_name').
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:47:28-57: AAPT: No resource found that matches the given name (at 'label' with value '#string/title_activity_kimera').
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:15: error: Error: No resource found that matches the given name (at 'value' with value '#string/facebook_app_id').
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:19: error: Error: No resource found that matches the given name (at 'label' with value '#string/app_name').
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:38: error: Error: No resource found that matches the given name (at 'label' with value '#string/app_name').
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:44: error: Error: No resource found that matches the given name (at 'label' with value '#string/title_activity_kimera').
:processF0F1DebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processF0F1DebugResources'.
> 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.
BUILD FAILED
Total time: 15.17 secs
Unable to apply changes on device: 192.168.1.5:5555. Error is: Command gradlew.bat failed with exit code 1.
Executing after-watch hook from C:\repos\rolagroup-frontend\hooks\after-watch\nativescript-dev-typescript.js
This is my packages.json:
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.rolagroupfrontend",
"tns-android": {
"version": "3.1.1"
}
},
"scripts": {
"lint": "tslint \"app/**/*.ts\""
},
"dependencies": {
"#angular/animations": "4.2.5",
"#angular/common": "4.2.5",
"#angular/compiler": "4.2.5",
"#angular/core": "4.2.5",
"#angular/forms": "4.2.5",
"#angular/http": "4.2.5",
"#angular/platform-browser": "4.2.5",
"#angular/router": "4.2.5",
"nativescript-angular": "4.2.0",
"nativescript-gradient": "^2.0.1",
"nativescript-localize": "^2.0.1",
"nativescript-social-login": "^1.6.0",
"nativescript-theme-core": "1.0.4",
"reflect-metadata": "0.1.10",
"rxjs": "5.4.3",
"tns-core-modules": "3.1.1",
"validator": "^8.1.0",
"zone.js": "0.8.16"
},
"devDependencies": {
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"codelyzer": "3.1.2",
"lazy": "1.0.11",
"nativescript-dev-sass": "1.3.0",
"nativescript-dev-typescript": "0.5.0",
"node-sass": "4.5.3",
"tslint": "5.6.0",
"typescript": "2.4.2"
}
}
Tried removing and then adding again tns platform android, also reinstalling the npm packages; but no luck.
I have SDK Build Tools and SDK Platform 23 and 25 installed. I'm running NativeScript 3.1.3, tns-core-modules 3.1.1 and tns-android 3.1.1 on Windows 10 x64. Any ideas?
UPDATE: Also tried adding those values manually to strings.xml, but that file just gets regenerated in every tns run.
Solved the app_id and title_activity_kimera by addind app.name to the NativeScript-localize json (yes, I should really read the docs).
Had to remove the social login plugin since it requires the facebook_app_id string added manually to strings.xml and this file its generated by the localization plugin.

Categories

Resources