Skip to content

Latest commit

 

History

History
153 lines (100 loc) · 7.32 KB

troubleshooting.md

File metadata and controls

153 lines (100 loc) · 7.32 KB

Troubleshooting

Contents

Could not initialize class org.codehouse.groovy.runtime.InvokeHelper

The current gradle version may not work with Java 14 or 16. Switch to a lower java version (e.g. v11) and make sure it is actually used:

cd android
./gradlew --version

and check that the version specified under JVM is correct. To uninstall a Java version on MacOS you can follow these instructions.

java.io.IOException: Unable to delete the directory on Windows 10

Possible solutions:

  • Switch to Linux :)
  • Windows Security > Virus & threat protection settings >
    • Controlled folder access > Manage Controlled folder access > Set to Off
    • Exclusions > Add or Remove exclusions >
      • Add the workspace folder
      • Maybe also add user specific configuration locations and appdata folder if required
  • Run the IDE as administrator
  • For first time android developer open IntelliJ with the Android Support plugin installed, create an Android project and start the app.

ERROR watch... ENOSPC when running yarn start on Linux

Increase the number of inotify watches by running
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

adb not found

There are 2 ways to fix this:

  1. Link /usr/bin/adb to the adb client you installed (usually the one at ~/Android/sdk/platform-tools/adb)
  2. Add ~/Android/sdk/platform-tools/adb to your $PATH

'adb server version (x) doesn't match this client (y)'

Make sure you only have one version of adb installed. Probably your system has adb installed and another version is available in the Android SDK. There are 2 ways to fix this:

  1. Link /usr/bin/adb to the adb client you installed (usually the one at ~/Android/sdk/platform-tools/adb)
  2. Add ~/Android/sdk/platform-tools/adb to your $PATH

adb shows no-permission

Setup udev rules to allow user accounts to access your phone.

Build failed with an exception

  • What went wrong:

Execution failed for task ':app:installDebug': > com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_VERSION_DOWNGRADE

  • Fix

Uninstall already existing application from target device

App hangs on loading screen

  • What went wrong:

The app starts, but remains in the loading screen for long time

  • Fix

Close the app on the device complete and re-open it on the device

bundle exec fastlane certificates hangs on Cloning remote git repo...

Copy the last command printed to the console (git clone ...) and execute it manually for more information, errors or password prompts. _ Make sure to have read and write access to the app-credentials repo. _ Make sure to have git properly set up on the machine (using ssh protocol instead of https). * The ssh key has to be added permanently in order for the command to work: cd ~/.ssh/; ssh-add.

Failed to get language code from native side! in the simulator

  • Go to (Device) Settings > General > Language and Region.
  • Change iPhone Language and Region.
  • Reload the app.

Gradle resource string/BUILD_CONFIG_APP_NAME not found

Environment variable BUILD_CONFIG_NAME not set before building the app via gradle. More information on how to set the environment variable can be found here.

No BUILD_CONFIG_NAME supplied

Environment variable BUILD_CONFIG_NAME not set before running the packager. More information on how to set the environment variable can be found here.

Invalid BUILD_CONFIG_NAME supplied

Invalid environment variable BUILD_CONFIG_NAME set before running the packager. All available build configs can be found here.

App crashing with java.lang.UnsatisfiedLinkError

The following error occurs: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libflipper.so caused by: dlopen failed: library "libevent_extra-2.1.so" not found result: 0

  • Delete the folder android/app/build
  • Delete the app
  • Reinstall the app (yarn android)

App crashing without any error

The app is installed correctly on the android emulator but crashes without any error message on start up. To solve this issue delete /android/app/build and android/.gradle folder.

XCode can't find 'your/directory/native/ios/Integreat/de.lproj/InfoPlist.strings'

These translations should usually be generated during the build, if they aren't, generate them manually with yarn workspace translations manage write-plist Integreat --translations "../translations/translations.json" --destination ../native/ios/Integreat

Then run bundle exec pod install in /ios, clean the Build folder in XCode(Shift + Cmd + K), restart XCode, and try again.

XCode can't find $BUILD_CONFIG_APP_ICON

Should also be generated during the build, manual command here: yarn workspace build-configs manage write-xcconfig integreat ios --directory ../native/ios

Then run bundle exec pod install in /ios, clean the Build folder in XCode(Shift + Cmd + K), restart XCode, and try again.

Other assorted XCode problems

It often helps to rerun yarn install in /native and bundle exec pod install in /ios, then clean the build folder in XCode (Shift + Cmd + K), and then restart XCode.

If working on an M1, some of the pods might not be working correctly yet. Go into the Build Settings of the project, to Architecture > Excluded Architectures. The Debug and Release area both should have arm64 under Any iOS Simulator SDK.