scorelab / TrackPal

TrackPal
Apache License 2.0
5 stars 36 forks source link

Unable to build the app environment #52

Closed m1-key closed 4 years ago

m1-key commented 4 years ago

error2

I am getting this error , how to resolve this. Please help

viraj-dhanushka commented 4 years ago

The issue seems to be when configuring the project with androidX. You can try with this PR =>

44 (https://github.com/scorelab/TrackPal/pull/44). But still there are issues. Try to figure them out

shehand commented 4 years ago

@m1-key can you upload the full stacktrace of the error?

m1-key commented 4 years ago

@shehand I fixed the above issue , but now got new error..

erro3

Please help to build the app so that I can start contributing to the project.

m1-key commented 4 years ago

Task :app:transformClassesWithMultidexlistForDebug FAILED D8: Program type already present: android.support.v4.media.MediaBrowserCompat$CallbackHandler

FAILURE: Build failed with an exception.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 7s 105 actionable tasks: 2 executed, 103 up-to-date

viraj-dhanushka commented 4 years ago

erro3

Please help to build the app so that I can start contributing to the project.

Don't wait for someone to fix the issue. Try it.. then all can contribute :blush:

shehand commented 4 years ago

Ok now, this has to be something wrong with Gradle build. Looks like the Gradle you are using is incompatible with the Gradle that is used to build the application.

m1-key commented 4 years ago

@shehand Sir , then what I have to do to run it on my system ? Any suggestions

shehand commented 4 years ago

Try to search a solution in google. Most probably you will get one

m1-key commented 4 years ago

Ok now, this has to be something wrong with Gradle build. Looks like the Gradle you are using is incompatible with the Gradle that is used to build the application.

Which version of gradle was used to build this project ?

m1-key commented 4 years ago

error4

This might be the last error, because it happened at 98% , how to rectify this ? I created the debug.keystore using keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 and then renamed it as my-release-key.keystore . Still got this error. Please help or guide how to rectify this.

viraj-dhanushka commented 4 years ago

Then you have to edit gradle.properties file like bellow

MYAPP_RELEASE_STORE_FILE=my-release-key.keystore MYAPP_RELEASE_KEY_ALIAS=android MYAPP_RELEASE_STORE_PASSWORD=android MYAPP_RELEASE_KEY_PASSWORD=android

or you can use this command and generate the my-release-key.keystore file straightforwardly :blush:

keytool -genkey -v -keystore my-release-key.keystore -storepass 000000 -alias my-key-alias -keypass 000000 -keyalg RSA -keysize 2048 -validity 10000

Hope you got it :100:

m1-key commented 4 years ago

Thanks a lot sir, finally App build was successful. But now I have encountered a new error

WhatsApp Image 2020-01-28 at 21 33 24

Since everything seems right , still this error pops up , how to tackle this ? I searched for this , all solutions eventually stated that we have to update Manifest file by including <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/> which is already present. And strings.xml file is also there with the id value like this `

TrackPal
<string name="facebook_app_id">600285087152743</string>

`

viraj-dhanushka commented 4 years ago

@m1-key Can you post your environment info (run react-native info) and Java version?

m1-key commented 4 years ago

@m1-key Can you post your environment info (run react-native info) and Java version?

envi

viraj-dhanushka commented 4 years ago

@m1-key Hmm requirements seems to be ok but can't figure out without proper googling 😊 Will update if I got sth 👍

m1-key commented 4 years ago

@viradhanus I changed few things in the code , I added two lines ( the highlighted ones in the image) , which removed the error but the app crashes as soon as build is successful. image

viraj-dhanushka commented 4 years ago

@m1-key Did you try to upgrade the react native version of the project ❔

thomas2308 commented 4 years ago

@m1-key Did you try to upgrade the react native version of the project

No

viraj-dhanushka commented 4 years ago

@m1-key Lets try to upgrade the version as well.. Hopefully it will solve all these issues 😊