Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all 28463 articles
Browse latest View live

Web Audio API equivalent for iOS, Android, React Native?

$
0
0

Web Audio API allows us to play synthesized sound. What if you're working with React Native? For example, consider a mobile app that is a piano. How do I make the sound?

I am not looking for a library that helps to play or record audio files.

Ideally, I want https://tonejs.github.io/ for iOS/Android


WrappingUtils: Don't know how to round that drawable: com.facebook.drawee.drawable.RoundedColorDrawable?

$
0
0

enter image description here

error msg:

05-16 23:05:45.317 17513-17513/***.***.*** W/unknown:WrappingUtils: Don't know how to round that drawable: com.facebook.drawee.drawable.RoundedColorDrawable@1d3c24a105-16 23:05:45.320 17513-17513/***.***.*** W/unknown:WrappingUtils: Don't know how to round that drawable: com.facebook.drawee.drawable.RoundedColorDrawable@3b4ad6c605-16 23:05:45.321 17513-17513/***.***.*** W/unknown:WrappingUtils: Don't know how to round that drawable: com.facebook.drawee.drawable.RoundedColorDrawable@2f71f687

It keeps throwing errors message, May I ask why?

ReactNativeJS: TypeError: undefined is not an object (evaluating 't.default')

$
0
0

App is running properly without any error in debug mode.but its crashing in release mode after splash screen. and also when i'm trying to archive it,its getting successful archive but im not getting anything under window.

package.json

"dependencies": {"@react-native-community/async-storage": "^1.9.0","@react-native-community/masked-view": "^0.1.6","@react-navigation/drawer": "^5.0.0","@react-navigation/material-bottom-tabs": "^5.0.0","@react-navigation/native": "^5.0.0","@react-navigation/stack": "^5.0.0","babel-preset-react-app": "^9.1.2","mobx": "^5.15.4","mobx-react": "^6.2.2","react": "16.9.0","react-native": "0.61.5","react-native-admob": "^2.0.0-beta.6","react-native-animatable": "^1.3.3","react-native-device-info": "^5.5.6","react-native-gesture-handler": "^1.6.0","react-native-i18n": "^2.0.15","react-native-image-gallery": "^2.1.4","react-native-image-view": "^2.1.2","react-native-linear-gradient": "^2.5.6","react-native-material-ripple": "^0.9.1","react-native-onesignal": "^3.7.3","react-native-paper": "^3.6.0","react-native-reanimated": "^1.7.0","react-native-responsive-dimensions": "^3.1.1","react-native-responsive-screen": "^1.4.0","react-native-safe-area-context": "^0.7.3","react-native-screens": "^2.0.0-beta.8","react-native-share": "^3.3.0","react-native-slideshow": "^1.0.1","react-native-snap-carousel": "^3.8.4","react-native-svg": "^12.0.3","react-native-unity-ads": "^1.0.3","react-native-vector-icons": "^6.6.0","rn-fetch-blob": "^0.12.0"},"devDependencies": {"@babel/plugin-proposal-decorators": "^7.8.3","@babel/core": "^7.6.2","@babel/runtime": "^7.6.2","@react-native-community/eslint-config": "^0.0.5","babel-jest": "^24.9.0","eslint": "^6.5.1","jest": "^24.9.0","metro-react-native-babel-preset": "^0.56.0","react-test-renderer": "16.9.0"},

enter image description here

enter image description here

fetch is sending the request success but responsing an error and feeze the screen React Native

$
0
0

Right now i'm working on the chat Application which sends the post Request to the server and the updates the messages Json data but its now sending the post data successfully and also responding an anonymous error without tracking

packages I'm using

fetch from native-JsReact-Native-Gifted-Chat  onSend(messages= []) {          console.log('message Send button clicked');          const newSendMessage = messages[0]['text'];          var data = new FormData();          data.append('groupId', this.state.groupIdNew);          data.append('memberId[]', this.state.members);          data.append('message', newSendMessage);          data.append('userId', ApiUserId);          fetch(API_HOST +'imApi/sendMessage', {            method: 'POST',            headers: {              Accept : 'Application/json','content-type': 'multipart/form-data',            },            body: data,          }).then((json) => json.text()).then(text => {            this.setState((previousState) => ({              messages: GiftedChat.append(previousState.messages, messages),            }));          }).catch((e) => console.error(JSON.stringify(e)));

the return render of the following is

<GiftedChat            onInputTextChanged={(text) => changeText(text)}            messages={_.orderBy(ml, ['createdAt'], ['desc'])}            scrollToBottom={true}            renderMessageVideo={() => console.log(ml)}            onSend={(messages) => this.onSend(messages)}            renderSend={(props) => (<View                style={{                  flexDirection: 'row',                  alignItems: 'center',                  height: 50,                }}><Icon                  raised                  name="attachment"                  reverse={this.state.modalVisible == false ? false : true}                  color="#08CAF9"                  onPress={() => {                    this.setModalVisible(true);                  }}                /><Send {...props}><View style={styles.btnSend}><Icon raised name="send" size={24} color="#08CAF9" /></View></Send></View>            )}            multiline={true}            alwaysShowSend={true}            user={{              _id: ApiUserId,            }}          />

After running the above code i've got the following error

{ "line": 27764, column:31, sourceUrl: "https://localhost:8081/index.bundle?platform=androud&dev=true&minify }

this error cause screen freeze and many for couple minutes

can someOne help me what is this about and how to solve this issue

Sendbird push notification when app is in background

$
0
0

Here is my query. I have implemented sendbird sdk in one of my react-native app for chat implementation. I am trying to implement push notifications. I have used react-native-firebase for firebase push notifications as described in sendbird's documentation. Now the issue is my android app is getting push notification when the app is in foreground. OnMessageReceived() listener is triggered for this. But when my app is in background I am not receiving any push notification from sendbird.. None of the firebase notification listeners are triggered.

Also, when I am trying to send notification from firebase console I am receiving foreground as well as background notification.

Hoping for a response from you guys, as this can help me implement this feature successfully.

React-Native after AndroidX Task :@react-native-community_viewpager:compileDebugJavaWithJavac FAILED

$
0
0

After AndroidX update in modules for RN(in current example @react-native-async-storage/viewpager) compilation fails.Cannot find symbols and methods.

I've added, but didn't help:

android.useAndroidX = trueandroid.enableJetifier = true

I've tried to downgrade modules and reinstall. Project didn't compile.

Gradle version - 4.10.1
"react-native": "^0.59.9"
"@react-native-community/viewpager": "^1.1.7"

Task :@react-native-community_viewpager:compileDebugJavaWithJavac FAILED/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:10: error: package android.support.v4.view does not existimport android.support.v4.view.PagerAdapter;                              ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:11: error: package android.support.v4.view does not existimport android.support.v4.view.ViewPager;                              ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:29: error: cannot find symbolpublic class ReactViewPager extends ViewPager {                                    ^  symbol: class ViewPager/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:31: error: cannot find symbol  private class Adapter extends PagerAdapter {                                ^  symbol:   class PagerAdapter  location: class ReactViewPager/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:64: error: cannot find symbol    void removeAllViewsFromAdapter(ViewPager pager) {                                   ^  symbol:   class ViewPager  location: class ReactViewPager.Adapter/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:107: error: package ViewPager does not exist  private class PageChangeListener implements ViewPager.OnPageChangeListener {                                                       ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPagerManager.java:27: error: type argument ReactViewPager is not within bounds of type-variable Tpublic class ReactViewPagerManager extends ViewGroupManager<ReactViewPager> {                                                            ^  where T is a type-variable:    T extends ViewGroup declared in class ViewGroupManager/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPagerManager.java:117: error: cannot find symbol    pager.setPageMargin((int) PixelUtil.toPixelFromDIP(margin));         ^  symbol:   method setPageMargin(int)  location: variable pager of type ReactViewPager/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPagerManager.java:122: error: cannot find symbol    pager.setClipToPadding(!peekEnabled);         ^  symbol:   method setClipToPadding(boolean)  location: variable pager of type ReactViewPager/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:38: error: cannot find symbol      notifyDataSetChanged();      ^  symbol:   method notifyDataSetChanged()  location: class ReactViewPager.Adapter/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:43: error: cannot find symbol      notifyDataSetChanged();      ^  symbol:   method notifyDataSetChanged()  location: class ReactViewPager.Adapter/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:52: error: cannot find symbol      notifyDataSetChanged();      ^  symbol:   method notifyDataSetChanged()  location: class ReactViewPager.Adapter/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:76: error: method does not override or implement a method from a supertype    @Override    ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:81: error: method does not override or implement a method from a supertype    @Override    ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:85: error: cannot find symbol        POSITION_NONE : mViews.indexOf(object);        ^  symbol:   variable POSITION_NONE  location: class ReactViewPager.Adapter/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:88: error: method does not override or implement a method from a supertype    @Override    ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:91: error: cannot find symbol      container.addView(view, 0, generateDefaultLayoutParams());                                 ^  symbol:   method generateDefaultLayoutParams()  location: class ReactViewPager.Adapter/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:92: error: cannot find symbol      post(measureAndLayout);      ^  symbol:   method post(Runnable)  location: class ReactViewPager.Adapter/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:96: error: method does not override or implement a method from a supertype    @Override    ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:101: error: method does not override or implement a method from a supertype    @Override    ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:109: error: method does not override or implement a method from a supertype    @Override    ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:112: error: cannot find symbol          new PageScrollEvent(getId(), position, positionOffset));                              ^  symbol:   method getId()  location: class ReactViewPager.PageChangeListener/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:115: error: method does not override or implement a method from a supertype    @Override    ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:119: error: cannot find symbol            new PageSelectedEvent(getId(), position));                                  ^  symbol:   method getId()  location: class ReactViewPager.PageChangeListener/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:123: error: method does not override or implement a method from a supertype    @Override    ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:127: error: cannot find symbol        case SCROLL_STATE_IDLE:             ^  symbol:   variable SCROLL_STATE_IDLE  location: class ReactViewPager.PageChangeListener/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:130: error: cannot find symbol        case SCROLL_STATE_DRAGGING:             ^  symbol:   variable SCROLL_STATE_DRAGGING  location: class ReactViewPager.PageChangeListener/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:133: error: cannot find symbol        case SCROLL_STATE_SETTLING:             ^  symbol:   variable SCROLL_STATE_SETTLING  location: class ReactViewPager.PageChangeListener/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:140: error: cannot find symbol        new PageScrollStateChangedEvent(getId(), pageScrollState));                                        ^  symbol:   method getId()  location: class ReactViewPager.PageChangeListener/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:152: error: cannot find symbol    setOnPageChangeListener(new PageChangeListener());    ^  symbol:   method setOnPageChangeListener(ReactViewPager.PageChangeListener)  location: class ReactViewPager/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:153: error: cannot find symbol    setAdapter(new Adapter());    ^  symbol:   method setAdapter(ReactViewPager.Adapter)  location: class ReactViewPager/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:156: error: method does not override or implement a method from a supertype  @Override  ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:158: error: cannot find symbol    return (Adapter) super.getAdapter();                     ^  symbol:   variable super  location: class ReactViewPager/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:161: error: method does not override or implement a method from a supertype  @Override  ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:168: error: cannot find symbol      if (super.onInterceptTouchEvent(ev)) {          ^  symbol:   variable super  location: class ReactViewPager/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:169: error: incompatible types: ReactViewPager cannot be converted to View        NativeGestureUtil.notifyNativeGestureStarted(this, ev);                                                     ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:182: error: method does not override or implement a method from a supertype  @Override  ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:189: error: cannot find symbol      return super.onTouchEvent(ev);             ^  symbol:   variable super  location: class ReactViewPager/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:202: error: cannot find symbol    setCurrentItem(item, animated);    ^  symbol:   method setCurrentItem(int,boolean)  location: class ReactViewPager/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:211: error: method does not override or implement a method from a supertype  @Override  ^/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:213: error: cannot find symbol    super.onAttachedToWindow();    ^  symbol:   variable super  location: class ReactViewPager/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:216: error: cannot find symbol    this.requestLayout();        ^  symbol: method requestLayout()/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:217: error: cannot find symbol    post(measureAndLayout);    ^  symbol:   method post(Runnable)  location: class ReactViewPager/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:224: error: cannot find symbol              MeasureSpec.makeMeasureSpec(getWidth(), MeasureSpec.EXACTLY),                                          ^  symbol: method getWidth()/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:224: error: cannot find symbol              MeasureSpec.makeMeasureSpec(getWidth(), MeasureSpec.EXACTLY),                                                      ^  symbol: variable MeasureSpec/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:224: error: cannot find symbol              MeasureSpec.makeMeasureSpec(getWidth(), MeasureSpec.EXACTLY),              ^  symbol: variable MeasureSpec/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:225: error: cannot find symbol              MeasureSpec.makeMeasureSpec(getHeight(), MeasureSpec.EXACTLY));                                          ^  symbol: method getHeight()/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:225: error: cannot find symbol              MeasureSpec.makeMeasureSpec(getHeight(), MeasureSpec.EXACTLY));                                                       ^  symbol: variable MeasureSpec/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:225: error: cannot find symbol              MeasureSpec.makeMeasureSpec(getHeight(), MeasureSpec.EXACTLY));              ^  symbol: variable MeasureSpec/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:226: error: cannot find symbol      layout(getLeft(), getTop(), getRight(), getBottom());             ^  symbol: method getLeft()/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:226: error: cannot find symbol      layout(getLeft(), getTop(), getRight(), getBottom());                        ^  symbol: method getTop()/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:226: error: cannot find symbol      layout(getLeft(), getTop(), getRight(), getBottom());                                  ^  symbol: method getRight()/Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPager.java:226: error: cannot find symbol      layout(getLeft(), getTop(), getRight(), getBottom());                                              ^  symbol: method getBottom()Note: /Users/mama/mobile/node_modules/@react-native-community/viewpager/android/src/main/java/com/reactnativecommunity/viewpager/ReactViewPagerManager.java uses unchecked or unsafe operations.Note: Recompile with -Xlint:unchecked for details.Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output53 errorsFAILURE: Build failed with an exception.* What went wrong: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.>**Execution failed for task ':@react-native-community_viewpager:compileDebugJavaWithJavac'.**See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warnings21 actionable tasks: 1 executed, 20 up-to-date> Compilation failed; see the compiler error output for details.* Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.* Get more help at https://help.gradle.orgBUILD FAILED in 15serror Could not install the app on the device, read the error above for details.Make sure you have an Android emulator running or a device connected and haveset up your Android development environment:https://facebook.github.io/react-native/docs/getting-started.htmlerror Command failed: ./gradlew app:installDebug. Run CLI with --verbose flag for more details.error Command failed with exit code 1.info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Task :react-native-camera:compileGeneralDebugJavaWithJavac FAILED

$
0
0

My APP was running fine but while I tried a new installation it shows the error - Task :react-native-camera:compileGeneralDebugJavaWithJavac FAILED. Below code might help you to address the issue. My package.json is given below:

{"name": "app name","version": "0.0.1","private": true,"scripts": {"start": "node node_modules/react-native/local-cli/cli.js start","test": "jest"  },"dependencies": {"@react-native-community/async-storage": "^1.7.1","axios": "^0.18.1","native-base": "^2.13.12","react": "16.8.3","react-native": "^0.62.2","react-native-animatable": "^1.3.2","react-native-camera": "^2.11.0","react-native-modalbox": "^1.7.1","react-native-qrcode-scanner": "^1.2.1","react-native-search-filter": "^0.1.4","react-native-vector-icons": "^6.5.0","react-native-webview": "5.8.1","react-navigation": "^2.18.3","url": "^0.11.0"  },"devDependencies": {"@babel/core": "7.4.5","@babel/runtime": "7.4.5","babel-jest": "^26.0.1","jest": "^26.0.1","metro-react-native-babel-preset": "^0.54.1","react-native-dotenv": "^0.2.0","react-test-renderer": "16.8.3"  },"jest": {"preset": "react-native"  },"rnpm": {"assets": ["./assets/fonts/"    ]  }}

android/build.gradle

buildscript {    ext {        buildToolsVersion = "28.0.3"        minSdkVersion = 16        compileSdkVersion = 28        targetSdkVersion = 28        supportLibVersion = "28.0.0"    }    repositories {        google()        jcenter()    }    dependencies {        classpath("com.android.tools.build:gradle:3.4.0")    }}allprojects {    repositories {        mavenLocal()        google()        jcenter()        maven {            url "$rootDir/../node_modules/react-native/android"        }    }}

I have no clue on this error. Any help???

Expo app not appearing on Android emulator

$
0
0

I'm a beginner trying to learn how to develop mobile apps and was following this tutorial. I downloaded the "basic-chat" package, made a new folder, did expo init, then copied over the files from the "basic-chat" package to the new expo directory. Then, I did npm start and chose "run on android/emulator". The app then popped up on my Android Studio Emulator. However, the screen is blank, even after I added all the code in the tutorial. I saved my code, closed the server, then restarted but the screen remained blank. Did I configure wrong?


Crashing on loading Home page component react native

$
0
0

I have created an app using react native cli, when ever trying to access the home page component the app get crashes. Other pages like splash, login, register components are loading perfectly. But after login the Home doesnot loading.

The app is perfectly working in debug mode, but when I create an release APK it is crashing, I have tried both in emulator and android phone.

I have tried to check the error log using adb logcat *:E. You can check the error log attached below.

ADb Logcat Error

Please check the code below,

package.json

{"name": "DoctorsBox","version": "0.0.1","private": true,"scripts": {"android": "react-native run-android","ios": "react-native run-ios","start": "react-native start","test": "jest","lint": "eslint ."    },"dependencies": {"@fortawesome/fontawesome-svg-core": "^1.2.28","@fortawesome/free-solid-svg-icons": "^5.13.0","@fortawesome/react-native-fontawesome": "^0.2.3","@react-native-community/async-storage": "^1.9.0","@react-native-community/masked-view": "^0.1.7","@react-navigation/drawer": "^5.4.0","@react-navigation/material-top-tabs": "^5.1.7","@react-navigation/native": "^5.1.4","@react-navigation/stack": "^5.2.9","axios": "^0.19.2","firebase": "^7.13.2","lodash": "^4.17.15","moment": "^2.24.0","react": "16.11.0","react-native": "0.62.1","react-native-gesture-handler": "^1.6.1","react-native-gifted-chat": "^0.13.0","react-native-reanimated": "^1.7.1","react-native-safe-area-context": "^0.7.3","react-native-screens": "^2.4.0","react-native-svg": "^12.0.3","react-native-tab-view": "^2.13.0","react-redux": "^7.2.0","redux": "^4.0.5","redux-thunk": "^2.3.0"    },"devDependencies": {"@babel/core": "7.9.0","@babel/runtime": "7.9.2","@react-native-community/eslint-config": "0.0.5","babel-jest": "24.9.0","eslint": "6.8.0","jest": "24.9.0","metro-react-native-babel-preset": "0.58.0","react-test-renderer": "16.11.0"    },"jest": {"preset": "react-native"    }}

Home.js

import React, { Component } from 'react';import {StyleSheet,View,Text,AsyncStorage} from 'react-native';import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';import ChatScreen from './ChatTab';const Tab = createMaterialTopTabNavigator();function HomeScreen() {    return (<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}><Text>Home!</Text></View>    );}function CallsScreen() {    return (<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}><Text>Calls!</Text></View>    );}export default class Home extends Component {    constructor(props) {        super(props);        this.state = {            refreshing: false,            category: null        };    }    async componentDidMount() {        let loginCategory = await AsyncStorage.getItem('SESS_CATEGORY');        await this.setState({category: loginCategory});    }    render() {        return (<View style={styles.container}><Tab.Navigator><Tab.Screen name="Home" component={HomeScreen} /><Tab.Screen name="Chats" component={ChatScreen} /><Tab.Screen name="Calls" component={CallsScreen} /></Tab.Navigator></View>        );    }}

ChatTab.js

import React, { Component } from 'react';import {StyleSheet,View,Text,AsyncStorage,FlatList,TouchableOpacity} from 'react-native';import firebase from 'firebase';import moment from 'moment';let colors = ["#0d2c4f", "#76ac42", "#2a55a5", "#1975a9"];export default class ChatTab extends Component {    constructor(props) {        super(props);        this.state = {            id: null,            loading: true        };    }    async componentDidMount() {        let loginId = await AsyncStorage.getItem('SESS_ID');        this.setState({id: loginId});        this.fetchConversations();    }    fetchConversations = () => {        let messagesTemp = [];        var ref = firebase.database().ref("Conversation");        ref.child(this.state.id).on("value", function(snapshot) {            // console.log(snapshot.val());            snapshot.forEach(function(childSnapshot) {                var key = childSnapshot.key;                var name = snapshot.child(key +'/name').val();                var title = snapshot.child(key +'/title').val();                var to_id = snapshot.child(key +'/to_id').val();                var sender = snapshot.child(key +'/sender').val();                var receiver = snapshot.child(key +'/receiver').val();                var msg_text = snapshot.child(key +'/text').val();                var timestamp = snapshot.child(key +'/timeStamp').val();                messagesTemp.push({_key: key, _name: name, _title: title, _to_id: to_id, _sender: sender, _receiver: receiver, _msg: msg_text, _timestamp: timestamp});            })        });        this.setState({ messages: messagesTemp });        if (this.state.messages !== null)            this.setState({ loading: false });    }    startChat = (uid, id, name, title) => {        this.props.navigation.navigate('Chat', {'to_uid': uid, 'to_id': id, 'chat_name': name, 'chat_title': title});    }    render() {        return (<View style={styles.container}><FlatList                    data={this.state.messages}                    showsVerticalScrollIndicator={false}                    renderItem={({ item, index }) => (<TouchableOpacity onPress={() => this.startChat(item._sender, item._to_id, item._name, item._title)}><View style={styles.singleList} key={item._key}><View style={[styles.viewCircle, [{backgroundColor: colors[index % colors.length]}]]}><Text style={styles.textCircle}>{item._name.charAt(0)}</Text></View><View style={{flex: 1, marginLeft: 10}}><Text style={styles.name}>{item._name}</Text><Text style={styles.title}>{item._msg}</Text></View><Text>{moment(item._timestamp).format('ddd hh:MM a')}</Text></View></TouchableOpacity>                    )}                    keyExtractor={item => item._key}                    ref={ref => this.flatList = ref}                    onContentSizeChange={() => this.flatList.scrollToEnd({animated: true})}                /></View>        );    }}

I am really stuck here. If someone got the idea it will be very helpfull.

Unable to resolve "react-native-paper/lib/typescript/src/components/MaterialCommunityIcon" from "screens\SignUpScreen.js"

$
0
0

I run npm start or expo start -c to start with an empty cache and so far so good, but then when I tried to run the android simulator I get the error below

Unable to resolve "react-native-paper/lib/typescript/src/components/MaterialCommunityIcon" from "screens\SignUpScreen.js"Failed building JavaScript bundle.

I've tried deleting the node_modules, updating Expo SDK as several others tried too but nothing so far...

Here's my package.json

{

"main": "node_modules/expo/AppEntry.js",

"scripts": {

"start": "expo start",

"android": "expo start --android",

"ios": "expo start --ios",

"web": "expo start --web",

"eject": "expo eject"

},

"dependencies": {

"@react-native-community/masked-view": "0.1.6",

"@react-navigation/material-bottom-tabs": "^5.2.2",

"expo": "^37.0.0",

"react": "16.9.0",

"react-dom": "16.9.0",

"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",

"react-native-elements": "^2.0.0",

"react-native-gesture-handler": "~1.6.0",

"react-native-paper": "^3.10.1",

"react-native-reanimated": "~1.7.0",

"react-native-safe-area-context": "0.7.3",

"react-native-screens": "~2.2.0",

"react-native-vector-icons": "^6.6.0",

"react-native-web": "^0.11.7",

"react-navigation": "^4.3.9",

"react-navigation-stack": "^2.5.1"

},

"devDependencies": {

"babel-preset-expo": "^8.1.0",

"@babel/core": "^7.8.6"

},

"private": true

}

Any ideas?

Thank you in advance!

Understanding res folder in Android-Java (react-native prospective)

$
0
0

I was reading about JAVA from Google Developer Training

The Google Developer training says

the res folder holds resources, such as layouts, strings, and images

In case of RN, images aren't stored in Res (when I go to android folder in RN) so in typical android project it is not necessary to have images in Res?

2nd

values: Instead of hardcoding values like strings, dimensions, and colors in your XML and Java files, it is best practice to define them in their respective values files. This practice makes it easier to change the values and keep the values consistent across your app.

is it like environment file?

Gradle allprojects in React-native

$
0
0

I know a thing or two about JS and react-native. I was trying to comprehend the JAVA config of RN (by going through the Android docs in google developer training)

In this Section, The author have written following line

If a dependency is something other than a local library or file tree, Gradle looks for the files in whichever online repositories are specified in the repositories block of this file

I am Unable to comprhend the above line.

Also, In my current react-native project, it looks something like this (build.gradle)

allprojects {    repositories {        mavenLocal()        maven {            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm            url("$rootDir/../node_modules/react-native/android")        }        maven {            // Android JSC is installed from npm            url("$rootDir/../node_modules/jsc-android/dist")        }        google()        jcenter()        maven { url 'https://maven.google.com' }        maven { url 'https://jitpack.io' }    }}

Where as in project created by android it looks like this

allprojects {    repositories {        google()        jcenter()    }}

Can someone explain the difference? what is

        maven { url 'https://maven.google.com' }        maven { url 'https://jitpack.io' }

And

        mavenLocal()        maven {            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm            url("$rootDir/../node_modules/react-native/android")        }        maven {            // Android JSC is installed from npm            url("$rootDir/../node_modules/jsc-android/dist")        }

Why does RN people have them like this when compared to Android project created by android studio

I need header sticky without using library in react native [closed]

$
0
0

I need a header sticky without using any plugin in react native. it's possible I am using this way

<SafeAreaView style={styles.container}>        <ScrollView style={styles.scrollView} stickyHeaderIndices={[1]}      showsVerticalScrollIndicator={false}><Text style={styles.text2}>          0000000dd</Text><Text style={styles.text}>          Lorem ipsum dolor sit amet              </Text></ScrollView></SafeAreaView>// css hereconst styles = StyleSheet.create({  text: {    fontSize: 42,  },  text2:{    position:"absolute",    top:0,    width:"100%"  }});

React-Native, Android, Genymotion: ADB server didn't ACK

$
0
0

I am working with React-Native, Android, and Genymotion on Mac. When I run react-native run-android I get this lines at the end of the launch operation:

...04:54:40 E/adb: error: could not install *smartsocket* listener: Address already in use04:54:40 E/adb: ADB server didn't ACK04:54:40 E/ddms: '/Users/paulbrie/Library/Android/sdk/platform-tools/adb,start-server' failed -- run manually if necessary04:54:40 E/adb: * failed to start daemon *04:54:40 E/adb: error: cannot connect to daemon:app:installDebug FAILEDFAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:installDebug'.> com.android.builder.testing.api.DeviceException: Timeout getting device list....

However, adb devices returns this:

List of devices attached192.168.59.101:5555 device

So far I've found no solution to run my app on the emulator. Has anyone encountered the same issue?

Thanks,Paul

Ignore SSL Certificate Check on Android React Native

$
0
0

I'm currently working w/ react native on Android. I am making api requests using fetch() but the requests give me a network request failure, which is due to the endpoint having no ssl certificate. I was able to remove this check on iOS by modifying some xcode files. Is there a way to ignore ssl certificate checks on Android?


react-native run-android command failed, but gradlew installDebug work

$
0
0

I'm using react-native 0.43.3 on OSX.I tried to running app on Android and get message

react-native run-androidScanning 568 folders for symlinks in /Users/ruci.k/project/mayacrew/supermembers/supermembers/node_modules (5ms)JS server already running.Building and installing the app on the device (cd android && ./gradlew installDebug)...Could not install the app on the device, read the error above for details.Make sure you have an Android emulator running or a device connected and haveset up your Android development environment:https://facebook.github.io/react-native/docs/android-setup.html

./gradlew installDebug gave me some errors and fixed it all.Finally build get successed and app is working on Android device.

But react-native run-android command still not work.Only ./gradlew installDebug command work.

Is there anything can I check to use react-native run-android command?

I can't understand how could it happened.

'installDebug' not found in root project 'android' React Native

$
0
0

I am trying to run my project on the android simulator. When I run react-native run-android I am getting the following:

FAILURE: Build failed with an exception.* What went wrong: Task 'installDebug' not found in root project 'android'.* Try: Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.BUILD FAILED

If I run ./gradlew tasks I get:

Build Setup tasks-----------------init - Initializes a new Gradle build. [incubating]wrapper - Generates Gradle wrapper files. [incubating]Help tasks----------buildEnvironment - Displays all buildscript dependencies declared in root project 'android'.components - Displays the components produced by root project 'android'. [incubating]dependencies - Displays all dependencies declared in root project 'android'.dependencyInsight - Displays the insight into a specific dependency in root project 'android'.help - Displays a help message.model - Displays the configuration model of root project 'android'. [incubating]projects - Displays the sub-projects of root project 'android'.properties - Displays the properties of root project 'android'.tasks - Displays the tasks runnable from root project 'android'.

Any idea why I don't have a installDebug task in my project? How do I get it back?

How to develop an email client app using react native

$
0
0

I want to build an email client app using react-native. I found some posts related to this Developing an email client app on android. Hontvári Levente posted answer here to use PopMailImporter.java. I found a similar solution in react native. It is to use Linker, but it is not a 'client app'. I have two questions: Are there any solutions to build email client apps using react native? What is the best (popular) solution to build email client apps using android studio?

React Native - Process 'command 'cmd'' finished with non-zero exit value 1

$
0
0

I am getting this below error while executing command: gradlew assembleRelease. I have tried updating expo-cli, still not worked. installed and configured jdk, gralde, groovy. Still no result. Please suggest.

Configure project :app

Installing unimodules: unimodules-core@5.1.2 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules@unimodules\core unimodules-react-native-adapter@5.2.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules@unimodules\react-native-adapter expo-av@8.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\expo-av expo-constants@9.0.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\expo-constants expo-error-recovery@1.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\expo-error-recovery expo-file-system@8.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\expo-file-system expo-font@8.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\expo-font expo-image-loader@1.0.1 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\expo-image-loader expo-keep-awake@8.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\expo-keep-awake expo-linear-gradient@8.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\expo-linear-gradient expo-location@8.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\expo-location expo-permissions@8.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\expo-permissions expo-sqlite@8.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\expo-sqlite expo-updates@0.1.3 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\expo-updates expo-web-browser@8.2.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\expo-web-browser unimodules-app-loader@1.0.2 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\unimodules-app-loader unimodules-barcode-scanner-interface@5.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\unimodules-barcode-scanner-interface unimodules-camera-interface@5.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\unimodules-camera-interface unimodules-constants-interface@5.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\unimodules-constants-interface unimodules-face-detector-interface@5.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\unimodules-face-detector-interface unimodules-file-system-interface@5.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\unimodules-file-system-interface unimodules-font-interface@5.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\unimodules-font-interface unimodules-image-loader-interface@5.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\unimodules-image-loader-interface unimodules-permissions-interface@5.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\unimodules-permissions-interface unimodules-sensors-interface@5.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\unimodules-sensors-interface unimodules-task-manager-interface@5.1.0 from C:\Users\Srini\Workspace\React\newApp\MyReactNative\node_modules\unimodules-task-manager-interface

Configure project :react-native-tensorflow WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed soon. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html WARNING: The specified Android SDK Build Tools version (26.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.5.3. Android SDK Build Tools 28.0.3 will be used. To suppress this warning, remove "buildToolsVersion '26.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.This might happen in subprojects that apply the Kotlin plugins with the Gradle 'plugins { ... }' DSL if they specify explicit versions, even if the versions are equal.Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects.If the parent project does not need the plugin, add 'apply false' to the plugin line.See: https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dslThe Kotlin plugin was loaded in the following projects: ':expo-error-recovery', ':react-native-webview'

Task :app:bundleReleaseExpoUpdatesAssets

C:\Users\Srini\Workspace\React\newApp\MyReactNative>SET /P STOREDPATH= 0<"C:\Users\Srini.expo\PATH"

C:\Users\Srini\Workspace\React\newApp\MyReactNative>SET PATH="\"C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\iis express\PHP\v5.6;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Java\jdk-14.0.1;C:\Program Files\nodejs\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Git\cmd;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\syswow64;C:\Users\srini\AppData\Local\Android\Sdk\platform-tools\adb.exe;C:\Program Files\Java\jdk-14.0.1;C:\Program Files\groovy-2.5.9\bin;C:\Gradle\gradle-6.4.1\bin;C:\Users\Srini.windows-build-tools\python27\;C:\Users\Srini\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\Srini\AppData\Local\Programs\Python\Python38\;JAVA_HOME; $HADOOP_HOME; $HADOOP_BIN; $HADOOP_HOME/bin; $JAVA_HOME/bin;C:\Users\Srini\AppData\Roaming\npm;C:\Users\Srini.dotnet\tools;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\iis express\PHP\v5.6;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQLServer\150\DTS\Binn\;C:\Program Files\Java\jdk-14.0.1;C:\Program Files\nodejs\;C:\""

C:\Users\Srini\Workspace\React\newApp\MyReactNative>expo bundle-assets C:\Users\Srini\Workspace\React\newApp\MyReactNative --platform android --dest C:\Users\Srini\Workspace\React\newApp\MyReactNative\android\app\build\intermediates\merged_assets\release\out[19:39:31] Error: The manifest at 'C:\Users\Srini\Workspace\React\newApp\MyReactNative\android\app\src\main\assets\app.manifest' was empty or invalid.[19:39:31] Before making a release build, make sure you have run 'expo publish' at least once. Learn more. (ΓÇïhttps://expo.fyi/release-builds-with-expo-updatesΓÇï)

Task :app:bundleReleaseExpoUpdatesAssets FAILED

FAILURE: Build failed with an exception.

  • What went wrong:Execution failed for task ':app:bundleReleaseExpoUpdatesAssets'.

    Process 'command 'cmd'' finished with non-zero exit value 1

  • Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

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

BUILD FAILED in 1m 34s432 actionable tasks: 2 executed, 430 up-to-date

Unable to dismiss notification from notification bar in react native push notification (Android)

$
0
0

I'm creating a remainder application in which I couldn't able to dismiss the notification from the notification area, I've tried many methods to resolve this but still, nothing helps, PushNotification.clearLocalNotification(parseInt(notification.id, 10)); tried this to dismiss notification (not removing/cancelling). also tried similar solution like PushNotification.cancelLocalNotifications({ id: `${parseInt(notification.id, 10)}` });. but still, nothing helps. I tried logging the node package, I could see the logging inside the clear notification java function/cancel function, still not dismissing from the notification area

Viewing all 28463 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>