Expo MediaLibrary.getAssetsAsync() crashes the app on android - javascript

I'm using expo managed flow to develop my app and I'm trying to use camera roll in order to show some images.
I'm using expo's MediaLibrary and once I grant access to the camera roll via MediaLibrary.getPermissionsAsync() then, I try to call MediaLibrary.getAssetsAsync() but my android crashes. Everything works on IOS.
Note: when I add MediaLibrary.getAssetsAsync({ after: "" }) it does not crash but I've got an error where it says that "after key should be valid ID"...
Anyone knows what's the issue here?

I had the same inssue, I solved by doing this:
=>Run expo upgrade in your project directory (requires the latest version of expo-cli, you can update with npm i -g expo-cli).
They corrected in Expo SDK 39~40, mine was 38

Related

react native can't connect to android device

I'm just start learning react native and I'm trying to use expo,
after I created my app using expo and try to connect it to expo app on android device
I got this error
Uncaught Error:java.net.socketTimeoutException: failed to connect to /172.28.118.45 (port 19000) from /192.168.1.3 (port 38238) after 10000ms
I'm using wsl2 on windows and I think the problem could be, there's no bridge between wsl2 ip and windows ip but I couldn't find solution for this issue
This happend me before, but using only react native in WSL (not with expo) and you're right, the WSL cannot reach your android device.
I find some solutions but none of this work for me, you can try it maybe with expo is different.
Check https://localcoder.org/running-react-native-in-wsl-with-the-emulator-running-directly-in-windows

Unable to solve Android target error in Meteor add-platform android

I using a Macbook Pro M1 and decided to do start developing mobile app using Meteorjs framework, since I've used the framework for web development. I've followed a tutorial online on how to get that going but currently facing a problem:
Status of the individual requirements:
✓ Java JDK
✓ Android SDK
✗ Android target: Command failed with exit code 1: avdmanager list target
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 5 more
✓ Gradle
It seems that there's only one requirement that failed, and I've searched for the solution but couldn't find anything that resembles a similar problem that I'm facing. Hoping for you to help point me to the right direction.
I have installed the Android Studio, uninstalled and reinstalled the Android SDK Build-Tools 32, Android SDK Command-line Tools, Android SDK Platform-Tools, and Android Emulator.
Currently, my ~/.bashrc file setup is like this:
export ANDROID_HOME=$HOME/Android/Sdk
export ANDROID_SDK_ROOT=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin
...and my ~/.bash_profile:
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=$JAVA_HOME/bin:$PATH
export CLASS_PATH=$JAVA_HOME/lib
and I've got Gradle working just fine. Tested building a generic Android app using one of the samples in Android Studio. The build was successful.
But I can't get the meteor add-platform android to pass the checks. Anyone?
This problem was solved by installing JDK8.
Source for Macbook Pro M1: https://www.azul.com/downloads/?version=java-8-lts&os=macos&architecture=arm-64-bit&package=jdk

32.0.0 not a valid SDK version

I am trying to test out an app I'm developing on Node.js and I am utilizing expo to test the app. I've tried to update the versions to see if it will fix anything. When I scan the tunnel QR code from my Ubuntu virtual machine I still get the same errors. Any help or clarifications would be greatly appreciated! I have attached screenshots to show which versions of Node.js and Expo I'm on as well as the error message I'm retrieving.
Node and Expo Versions
Expo Error
You should update Expo to SDK 34 or higher. Because the Expo client doesn't support the version lower SDK 34.

React native application release build install on Simulator but not on device

I have done all provisioning profile setup on excode with manual Provisiong profile and my build is succeeded on xcode also running on simulator with release build but when I create ipa file and its not installing on device almost on 75% its stops and nothing happen.
My Xcode version is 9.2 with iOS 11.2 I'm installing on iOS 12.1.2 iphone device. Is anything I'm doing wrong?
https://www.raywenderlich.com/120-how-to-submit-an-app-to-apple-from-no-account-to-app-store-part-1
For provisioning profile and generate certificates + add App ID with UDID I have done exact procedure.
If you're signing your ipa file using an AppStore certificate, you can't install it directly on your iPhone without passing through Apple's review or AppStore first. So, maybe there's two solutions for your problem:
Build your app as Release and sign with a Development certificate; or
Sign your release app with an Ad-Hoc certificate;
Furthermore, Ad-Hoc certificates enable you to install your live app directly into a limited number of devices without passing through AppStore. I think that's what you want.
See more on Apple's site.
And there's also this link.

Can't upload React Native app to iTunes Connect with Xcode 7.3

I made an app using React-Native for iOS and I can't publish it to the App Store. When I go to the Xcode Organizer and follow the steps to upload the Archive, it throws the following error when Sending API usage to iTunes Connect.
Yesterday, I tried validating and uploading other apps made with Swift and it worked.
Solution found setting the minimum required version of iOS to 8.1.
It supposed to be a launch-screen-related error.
NOTE: This solution also applies for Xcode 8.

Categories