Issue
I am running React-Native 0.63.4 and encountering the following error:
Execution failed for task ':app:generateDebugBuildConfig'.
> Failed to calculate the value of task ':app:generateDebugBuildConfig' property 'buildConfigPackageName'.
> Failed to query the value of property 'packageName'.
> java.lang.NumberFormatException: For input string: "1.0.0"
This occurs when running npm run android
, shortly after Gradle is done configuring the app and tries to execute it.
This error occurs both when I run the command from the root folder of the project as well as from the /android/ subfolder.
I did a gradlew clean
but it is not helping.
Edit:
If I go in my /android/ folder and run gradlew android
, the build will complete without error.
It is only when I run npm run android
that this error shows up.
Solution
I finally figured it out.
on the file: android/app/src/main/AndroidManifest.xml
The content began by:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.MyBusiness.MyApp"
android:versionCode="1.0.0"
android:versionName="1.0.0">
The versionCode has to be an integer: Only digits allowed. Apparently it does not matter what it is as it will increment whatever number we put.
Changing this to a number solved my problem:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.MyBusiness.MyApp"
android:versionCode="1000"
android:versionName="1.0.0">
Answered By - FMaz008
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.