Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing gradle.properties file for generating APK file on Windows React Native

Tags:

react-native

After completing my android application with React Native I wanted to generate an APK file to install on me and my friends phones.

In order to do that i need to edit a certain gradle.properties file (according to React Native documentation). I have tried to find this file for almost a week now an ended up searching my entire C: for the file. I found plenty of files with the right name but none in the right place or with the right content.

I suspect the problem can be that I am using Windows not a linux or mac (which is what the documentation is written for). Is there another file to edit using Windows or am I missing something else?

Using Windows 10 and React native 0.31.0

like image 803
Erik Ivares Avatar asked Nov 14 '16 10:11

Erik Ivares


People also ask

Where is gradle properties in Windows?

The global properties file should be located in your home directory: On Windows: C:\Users\<you>\. gradle\gradle. properties.

Where is gradle properties file in Android Studio?

properties in the project folder or in the C:\Users\Username. gradle. Please make sure that the name of file is "gradle.


1 Answers

gradle.properties file is in the following path:

/your/project/path/android/gradle.properties

It's the same if you are using Windows or Mac.

Here a screenshot of my file system:

Location of gradle.properties

EDIT

You can put the code anywhere, here is my gradle.properties

enter image description here:

like image 163
leo7r Avatar answered Oct 17 '22 12:10

leo7r