Uploading android symbols files to crashlytics not working anymore - android

I am trying to upload symbols files to crashlytics using this command:
firebase crashlytics:symbols:upload --app="ANDROID_APP_ID" /home/user/debuginfo/testApp/1.2.0+85
But i got this error:
i Generating symbols for /home/user/debuginfo/testApp/1.2.0+85
⚠ An unknown error occurred
Error: java command failed with args:
-jar,/home/user/.cache/firebase/crashlytics/buildtools/crashlytics-buildtools-2.9.2.jar,-symbolGenerator,breakpad,-symbolFileCacheDir,/tmp/crashlytics-e00e9d25-558c-410a-b516-03fbb119fd2b/nativeSymbols/ANDROID_APP_ID/breakpad,-verbose,-generateNativeSymbols,-unstrippedLibrary,/home/user/debuginfo/testApp/1.2.0+85,-clientName,firebase-cli;crashlytics-buildtools

The problem is firebase tool did not find java command. so here is how i resolved the problem:
By updating environment variable in .zshrc file with these lines
export JAVA_HOME="/snap/android-studio/current/android-studio/jre"
export PATH="$PATH:/snap/android-studio/current/android-studio/jre/bin"
then i run this command:
source ~/.zshrc
after that firebase crashlytics:symbols:upload run without error.

I had the same issue. In my case, after I opened firebase CLI as administrator (right click=> "Run as administrator) it fixed the problem.

Related

Can't install React Native app in debug mode after installing production build

I installed in my phone (not using an emulator) the release version of an app I'm building with React Native. After that, I can't install a debug version using yarn android.
This is the error I get:
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Unknown failure: Exception occurred while executing 'install':
java.lang.IllegalArgumentException: Error: Failed to parse APK file: /data/local/tmp/app-debug.apk: Failed to parse /data/local/tmp/app-debug.apk
I've tried deleting the release apk file from the build output. I've also deleted cleared the app's data and cache, and then deleted it from my phone. Still getting the same issue.
This other question also didn't make it work.
Any idea how can I solve this?
Following Pasindu Dilshan's comment and with further debugging I ended up getting to a working state. Thank you very much for pointing me in the right direction 🙌.
The steps I followed were:
Run ./gradlew clean inside the "{project_path}/android". This gave me a new error in the task :app:mergeExtDexDebug, solvable with the instructions in this answer, which I'll reproduce below for completion.
Within Android Studio, select File > Invalid Cache and Restart.
Open your project directory in your terminal.
rm -rf .gradle
rm -rf android/.gradle android/.idea
rm android/app/app.iml android/<PROJECT_NAME>.iml
For reference, I'll note that steps 3. and 6. were not necessary in my particular case because those folders and files didn't exist in my project. However, they should be removed if they exist in yours.
Shout out to David for steps 2-6.

Can't able to run react native application on android device

Im Using MacBook Pro.. Im New To React Native.. After Creating An Project Im Running On iOS Device It's Running.. At The Same Time While I'm Running On Android Device Means Im Getting This Error.. Any One Please Help Me To Resolve This Error.. Im Using Visual Studio Code IDE For React Native Application
Thanks In Advance..
Error Details :
[Info] local.properties file doesn't exist. Using Android SDK location from PATH.
[Info] Starting React Native Packager.
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 864 file(s) to forward-jetify. Using 8 workers...
/bin/sh: adb: command not found
info Launching emulator...
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...
FAILURE: Build failed with an exception.
* Where:
Settings file '/Users/manikandan/AwesomeProject/android/settings.gradle'
* What went wrong:
Could not compile settings file '/Users/manikandan/AwesomeProject/android/settings.gradle'.
startup failed:
General error during semantic analysis: Unsupported class file major version 57
So you have two errors to fix here as your error log
local.properties file doesn't exist.
Failed to launch the emulator
local.properties file issue fixing
Open your react native project android folder using Android Studio.
Wait for gradle sync and clean the project and rebuild it using Android Studio
After that make sure you have local.properties file is been created inside android folder
If not try these steps to make local.properties file manually
Right click top level of project and Create new file 'local.properties' then add: sdk.dir=/Users/<YourUsername>/Library/Android/sdk
Clean and build
Before running your react native project on android make sure you have turn on the Android Emulator by AVD Manager in Android Studio
If you have not create any emulators then try this link - I have posted full answer on how to make Android Emulator -
React native failed to launch emulator
EDIT :
For adb error you need to install adb drivers on you Mac
Follow these steps
First install Homebrew using this command
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
or this command
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
After that install adb using homebrew
brew cask install android-platform-tools
Try to re run

Android Build Tools installed at '/Applications/ADT/sdk/platform-tools'

I a m trying to run Android automation in Robot Framework using Appium but, the following error keeps showing up:
WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not find 'adb' in ["/Applications/ADT/sdk/platform-tools/platform-tools/adb","/Applications/ADT/sdk/platform-tools/emulator/adb","/Applications/ADT/sdk/platform-tools/tools/adb","/Applications/ADT/sdk/platform-tools/tools/bin/adb"]. Do you have Android Build Tools installed at '/Applications/ADT/sdk/platform-tools'?
I have checked the installation in Android as well.
Any idea how to resolve this kind of issue?
Thank you very much.
I suspect your paths may not be set correctly. For reference, I have the following set in my bash profile:
export ANDROID_HOME=~/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=$PATH:$JAVA_HOME/bin

the first time I run 'react-native run-android', I got this error:

This is the error log:
Error: java.util.concurrent.ExecutionException: java.lang.RuntimeException: **AAPT process not ready to receive commands**
:app:mergeDebugResources FAILED
when I run this command : $ aapt it responsed me that:
aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
and then I run : $ locate libz.so, it responsed me that:
/lib/x86_64-linux-gnu/libz.so.1
/lib/x86_64-linux-gnu/libz.so.1.2.8
at this moment, I was so confused that there's nothing wrong, so I run $ aapt --help again, but it also returned me that :
aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
at last, I got it solved at this place, with this $ sudo apt-get install lib32z1 command, installing the lib32z1.so file, and now it works very well!
React-native does not offer full error information. The most straightforward way is to open the Android project under "ProjectFolder\Android" and build the project in AndroidStudio, where much richer info can be found.
For even more details, you can use "--stacktrace --debug" command line options, follow below procedures:
Open AndroidStudio
Preferences > Build, Execution, Deployment > Compiler
Add "--stacktrace --debug" to the commandline as shown in below snapshot
Rebuild in AndroidStudio, more detailed information will be shown
My problem, on Linux, was the path:
I export ANDROID_HOME with .bash_profile but I forgive to reload it in my terminal with . ~/.bash_profile before open android studio.
Step by step:
Close Android Studio.
Reload bash profile . ~/.bash_profile or export path:
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
Open Android Studio.
Run device. I try with a Nexus 4 but it doesn't matters. Use API 23 X86_64 (Google APIs) like tutorial says.
Go to your project in terminal and execute react-native run-android.
It works!!

Building chromium project for Android

I am following the instructions here to build chromium project for android on ubuntu 14.04. I was able to successfully check out the code, now I'm trying to configure the build. I'm using GN to configure, so I run "gn args out/Default", however I get this error: gn.py: Could not find gn executable at: /home/moon/chromium/src/buildtools/linux64/gn
All I have in that above folder is sha1 files, I don't seem to have python files. However, I had not received any errors during checkout process. What am I doing wrong and how can I fix this?
Thanks a lot!
I had the same problem as you but I managed to build Chromium finally.
Most probably, you may not successfully install any necessary dependencies.
Since you are on Linux, run the following command under src:
$ ./build/install-build-deps.sh
After this you can rerun the command:
$ gn gen out/Default
After giving credit to Brett Wilson, run:
gclient runhooks
It worked for me.

Categories

Resources