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

Material Ui - Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function

$
0
0

When I am loading this LoginScreen.js I m getting the above mentioned exception.Before that I had installed

npm install @material-ui/core

import React from 'react';import {Button} from '@material-ui/core/Button';import { View } from 'react-native';export default function LoginScreen() {  return (<View><Button></Button></View>  );}

How to implement a popup/banner in the mobile app that displays a warning if the installed version of the app is outdated?

$
0
0

I am facing a jira ticket that introduces a banner (or a popup, doesn't matter) that displays a warning message if the installed version is outdated.

We keep the app's version in the config file locally. I thought that comparing it to the one in the store would do the job.

I have done a research and found possible solutions:

  • For iOS, there is a handy api https://itunes.apple.com/lookup?bundleId=${bundleId}. It does the job and pretty reliable

  • For Android, the only option I know so far is to scrap the app's web page in the Play Market and extract the current version. This one is not very reliable.

So, I was wondering, what other options do I have?

Thanks in advance!

JDK version in react-native doctor

$
0
0

Today Java woke up to make my life a living hell... I wasn't able to run react-native run android and when I went to check the react-native doctor to see if anything was happening.

Turns out that there's something wrong with the JDK Version of Java, be I've installed the right version and it seems it didn't worked.

Any tips?

the error on terminal

Is it possible to add an icon to top tab navigator in React Native Router Flux?

$
0
0

I want to add an icon to every scene (tab) in the <Tabs></Tabs> component from react-native-router-flux.

I've noticed that the icons do indeed show when tabBarPosition="bottom".

My code looks similar to this:

<Stack><Tabs tabBarPosition="top"><Scene icon={({focused}) => (<Icon name="star" />    )} hideNavBar /><Scene icon={({focused}) => (<Icon name="audiotrack" />    )} initial hideNavBar /><Scene icon={({focused}) => (<Icon name="album" />    )} hideNavBar /></Tabs></Stack>

(Note that I've only included code related to my problem, nothing else)

Icons for Tab navigators with tabBarPosition={true} should be available in the component, as is evident in react-navigation's createMaterialTopTabNavigator as well as the documentation of react-native-router-flux, and I'm not sure if I'm doing something wrong or if this feature is not implemented for a reason.

React Native on Android: Cannot run program "node": error=2, No such file or directory

$
0
0

The iOS version works fine, but running Android Studio on my Mac I get the following Gradle Build error (paraphrased):

:ReactNative:Running ‘[node, -e, console.log(require(‘react-native/cli’).bin);]’ command failed.- Where:Script ‘/Users/…/Desktop/…/node_modules/@react-native-community/cli-platform-android/native_modules.gradle’ line: 154- What went wrong:A problem occurred evaluating script.> Cannot run program “node”: error=2, No such file or directoryCaused by: java.io.IOException: Cannot run program “node”: error=2, No such file or directory

I've tried so many things:

I used to be able to still run yarn android in Terminal, but even that has stopped working.

Execution failed for task ':app:bundleReleaseExpoUpdateAssets'

$
0
0

I did a "./gradlew assembleRelease" and it gave me this error, does anyone know how to fix it?error

It's also an expo ejected project

(React Native/Android) Android getFilesDir() gives me '/data/user/' instead of '/data/data/'

$
0
0

I am building an app which has a feature to crop images using react-native-image-crop-picker. I am trying to implement the logic to store the cropped images locally in my react native app. I could successfully implement the logic for iOS, however, I am having trouble with the Android side.

My problem is that when I store the image using reactContext.getFilesDir(), the image is stored into the /data/user/0/com.myapp/files/ directory. And the images can be accessed via 'Google Photos' app or 'Files' app. I don't want to let the users access these images.

Here is the picture describing my problem.enter image description here

The things I have tried so far:
1. Use getCurrentActivity() instead of reactContext
2. Use getReactApplicationContext() instead of context

Findings:
- After saving the image, it is stored into /data/user/0/com.myapp/files/, /data/data/0/com.myapp/files/ and storage/emulated/0/Pictures/.

FileStreamHandler.java

public class FileStreamHandler extends ReactContextBaseJavaModule {  private Context context;//  private Activity mActivity;  @Nonnull  @Override  public String getName() {    return "FileStreamHandler";  }  public FileStreamHandler(ReactApplicationContext reactContext) {    super(reactContext);//    mActivity = reactContext.getCurrentActivity();    this.context = reactContext;  }  @ReactMethod  private void saveImageData(String base64String, Callback callback) {    // Generate random image name    String fileName = UUID.randomUUID().toString() +".png";//    File fileDirectory = mActivity.getFilesDir();    File fileDirectory = context.getFilesDir();    File imageFile = new File(fileDirectory, fileName);    String imageFilePath = imageFile.getAbsolutePath();    try {      OutputStream stream = new FileOutputStream(imageFile);      //decode base64 string to image      byte[] decodedBytes = Base64.decode(base64String, Base64.DEFAULT);      Bitmap decodedImage = BitmapFactory.decodeByteArray(decodedBytes, 0, decodedBytes.length);      decodedImage.compress(Bitmap.CompressFormat.PNG,100, stream);      stream.flush();      stream.close();    } catch (IOException e) {      e.printStackTrace();    }    callback.invoke(imageFilePath);  }}

The image is stored successfully without any errors. However, it is stored into /data/user/ and can be accessed via other applications such as 'Photos' or 'Files'.

Although I am using exactly the same logic in my pure Android app, I have never had this problem. Therefore, I am suspecting that the react application context is causing the problem.

Any help would be highly appreciated.

Thank you.

Could not find any matches for com.wix:detox:+

$
0
0

Trying to run detox on my android device and running into the following error:

> Configure project :react-native-firebasereact-native-firebase: using React Native prebuilt binary from /Users/m/Desktop/alohapass-business/node_modules/react-native/androidFAILURE: Build failed with an exception.* What went wrong:Could not determine the dependencies of task ':app:compileStagingDebugAndroidTestJavaWithJavac'.> Could not resolve all task dependencies for configuration ':app:stagingDebugAndroidTestCompileClasspath'.> Could not find any matches for com.wix:detox:+ as no versions of com.wix:detox are available.     Required by:         project :app* 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 8s

I have androidTestImplementation('com.wix:detox:+') { transitive = true } in my build.gradle and am running ./gradlew assembleAndroidTest.

Any ideas?


What is the name of bar that contains hardware back button on android emulator and how to show it when it disappeared?

$
0
0

I am making a small app with React-Native.Then when I navigate to the next page, the android bottom bar (contains hardware back button) disappears.What is the name of this bar, and how to show it when it disappears?

This is an inactive state.

enter image description here

This is an active state.

enter image description here

How to show this bar? And how do we call this bar?

The library com.google.firebase:firebase-iid is being requested by various other libraries at [[17.0.0,17.0.0]], but resolves to 16.2.0

$
0
0

I started to get this error today, yesterday everything worked fine, there was no changes in gradle or firebase version

The library com.google.firebase:firebase-iid is being requested by various other libraries at [[17.0.0,17.0.0]], but resolves to 16.2.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

I saw that yesterday was update in google-services plugin, probably that is causing the problem.

How to fix this problem?

React-native google signin gives Developer Error

$
0
0

I am trying Google login using React-native-google-signin plugin but it gives me a Developer_Error.I have done exctly same as mention in its document.here is my code ans steps.

1.Installed react-native-google-signin plugin using npm i react-native-google-signin.2.Then have linked it with react-native link react-native-google-signin3.After that i did setup of build.gradle file as they mention it in the documents.

    ext {        buildToolsVersion = "27.0.3"        minSdkVersion = 16        compileSdkVersion = 27        targetSdkVersion = 26        supportLibVersion = "27.1.1"        googlePlayServicesAuthVersion = "15.0.1"    }    dependencies {        classpath 'com.android.tools.build:gradle:3.1.2'        classpath 'com.google.gms:google-services:3.2.1'    }    allprojects {        repositories {                mavenLocal()                google()                 maven {url "https://maven.google.com"}                jcenter()                maven {                // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm                url "$rootDir/../node_modules/react-native/android"                }                maven {                    url 'https://maven.google.com/'                    name 'Google'                }        }    }

4.Updated android/app/build.gradle,

    dependencies {        implementation 'com.facebook.android:facebook-android-sdk:4.34.0'        implementation project(':react-native-fbsdk')        compile project(':react-native-vector-icons')        compile project(':react-native-fused-location')        compile project(':react-native-fs')        compile project(':react-native-image-resizer')        compile project(':react-native-geocoder')        compile project(':react-native-device-info')        compile project(':react-native-image-picker')        compile fileTree(dir: "libs", include: ["*.jar"])        compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"        compile "com.facebook.react:react-native:+"  // From node_modules        implementation project(":react-native-google-signin")        compile (project(':react-native-maps')){            exclude group: "com.google.android.gms"        }        implementation 'com.google.android.gms:play-services-auth:15.0.1'        implementation 'com.google.android.gms:play-services-maps:15.0.1'        implementation 'com.google.android.gms:play-services-location:15.0.1'        implementation 'com.google.android.gms:play-services-base:15.0.1'    }    task copyDownloadableDepsToLibs(type: Copy) {        from configurations.compile        into 'libs'    }    apply plugin: 'com.google.gms.google-services'

5.Then generate SHA1 key using android studion debug.keystore and generate google-services.json file in firebase.

6.Then setting up login.js page like this.

    async componentDidMount() {        this._configureGoogleSignIn();    }    _configureGoogleSignIn() {        GoogleSignin.configure({            webClientId: '775060548127-5nfj43q15l75va9pfav2jettkha7hm2a.apps.googleusercontent.com',// my clientID            offlineAccess: false        });    }    async GoogleSignin() {    try {        await GoogleSignin.hasPlayServices();        const userInfo = await GoogleSignin.signIn();        // this.setState({ userInfo, error: null });        Alert.alert("success:"+ JSON.stringify(userInfo));    } catch (error) {        if (error.code === statusCodes.SIGN_IN_CANCELLED) {            // sign in was cancelled            Alert.alert('cancelled');        } else if (error.code === statusCodes.IN_PROGRESS) {            // operation in progress already            Alert.alert('in progress');        } else if (error.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) {            Alert.alert('play services not available or outdated');        } else {            Alert.alert('Something went wrong', error.toString());            this.setState({                error,            });        }    }}

These are my details so please someone help me on this i cannot find the appropriate solution online.and yes my SHA1 and clientID is correct i have cheked it already.

Emulator is not working: Execution failed for task ':app:installDebug'

$
0
0

First I'm a newbie in react-native. I start a React-native in Facebook official site react-native tutorial. When I follow the react-native android setup step by step, then I run this project When a show this message please Resolve this Error, and Suggest me. Please help me.

D:\Linux\IDE\All-Workspace\JavaScript-Workspace\React-Workshop\AwesomeProject>react-native run-androidJS server already running.Building and installing the app on the device (cd android && gradlew.bat install debug)...FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:installDebug'.> com.android.builder.testing.api.DeviceException: No connected devices!* 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 6s27 actionable tasks: 1 executed, 26 up-to-dateCould 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.

React Native App Crashes on Launch in Android (API 19)

$
0
0

Description

I have created a project with react-native-cli

When I launch the app using the command "react-native run-android" on Devices and Emulators with Android API level 21+ App is launching.

But for devices less than API 21, the app crashing on launch.

I have specified in android Gradle minSdk version to 16.

I viewed the stack trace using "adb logcat" the crash was due to OkHttp3 that is used internally in Facebook Flipper, which is expecting API 21+.

I haven't used any OkHttp3 Dependency explicitly in my app

React Native version:

6.14.4

Steps To Reproduce

  1. Create a project using react-native CLI not Expo CLI
  2. Navigate to the project folder
  3. Connect a device or an emulator with API less than 21
  4. run command "react-native run-android" to run the app on the connected device

Expected Results

The app should launch without any crash.

Android Logs

E/AndroidRuntime( 3745): java.lang.RuntimeException: Unable to create application com.infifive.MainApplication: java.lang.RuntimeException: Requested enabled DevSupportManager, but DevSupportManagerImpl class was not found or could not be createdE/AndroidRuntime( 3745):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4347)E/AndroidRuntime( 3745):    at android.app.ActivityThread.access$1500(ActivityThread.java:135)E/AndroidRuntime( 3745):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)E/AndroidRuntime( 3745):    at android.os.Handler.dispatchMessage(Handler.java:102)E/AndroidRuntime( 3745):    at android.os.Looper.loop(Looper.java:136)E/AndroidRuntime( 3745):    at android.app.ActivityThread.main(ActivityThread.java:5017)E/AndroidRuntime( 3745):    at java.lang.reflect.Method.invokeNative(Native Method)E/AndroidRuntime( 3745):    at java.lang.reflect.Method.invoke(Method.java:515)E/AndroidRuntime( 3745):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)E/AndroidRuntime( 3745):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)E/AndroidRuntime( 3745):    at dalvik.system.NativeStart.main(Native Method)E/AndroidRuntime( 3745): Caused by: java.lang.RuntimeException: Requested enabled DevSupportManager, but DevSupportManagerImpl class was not found or could not be createdE/AndroidRuntime( 3745):    at com.facebook.react.devsupport.DevSupportManagerFactory.create(DevSupportManagerFactory.java:90)E/AndroidRuntime( 3745):    at com.facebook.react.ReactInstanceManager.<init>(ReactInstanceManager.java:238)E/AndroidRuntime( 3745):    at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:281)E/AndroidRuntime( 3745):    at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:87)E/AndroidRuntime( 3745):    at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:39)E/AndroidRuntime( 3745):    at com.infifive.MainApplication.onCreate(MainApplication.java:47)E/AndroidRuntime( 3745):    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)E/AndroidRuntime( 3745):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4344)E/AndroidRuntime( 3745):    ... 10 moreE/AndroidRuntime( 3745): Caused by: java.lang.reflect.InvocationTargetExceptionE/AndroidRuntime( 3745):    at java.lang.reflect.Constructor.constructNative(Native Method)E/AndroidRuntime( 3745):    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)E/AndroidRuntime( 3745):    at com.facebook.react.devsupport.DevSupportManagerFactory.create(DevSupportManagerFactory.java:80)E/AndroidRuntime( 3745):    ... 17 moreE/AndroidRuntime( 3745): Caused by: java.lang.ExceptionInInitializerErrorE/AndroidRuntime( 3745):    at okhttp3.OkHttpClient.newSslSocketFactory(OkHttpClient.java:263)E/AndroidRuntime( 3745):    at okhttp3.OkHttpClient.<init>(OkHttpClient.java:229)E/AndroidRuntime( 3745):    at okhttp3.OkHttpClient$Builder.build(OkHttpClient.java:1015)E/AndroidRuntime( 3745):    at com.facebook.react.devsupport.DevServerHelper.<init>(DevServerHelper.java:132)E/AndroidRuntime( 3745):    at com.facebook.react.devsupport.DevSupportManagerImpl.<init>(DevSupportManagerImpl.java:183)E/AndroidRuntime( 3745):    ... 20 moreE/AndroidRuntime( 3745): Caused by: java.lang.IllegalStateException: Expected Android API level 21+ but was 19E/AndroidRuntime( 3745):    at okhttp3.internal.platform.AndroidPlatform.buildIfSupported(AndroidPlatform.java:238)E/AndroidRuntime( 3745):    at okhttp3.internal.platform.Platform.findPlatform(Platform.java:202)E/AndroidRuntime( 3745):    at okhttp3.internal.platform.Platform.<clinit>(Platform.java:79)`

react-native run-android Failed

$
0
0
FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:compileDebugJavaWithJavac'.java.lang.reflect.UndeclaredThrowableException* 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 34s    at checkExecSyncError (child_process.js:621:11)    at execFileSync (child_process.js:639:15)    at runOnAllDevices (C:\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)    at buildAndRun (C:\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)    at C:\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12    at processTicksAndRejections (internal/process/task_queues.js:85:5)    at async Command.handleAction (C:\node_modules\react-native\node_modules\@react-native-community\cli\build\cliEntry.js:160:7)error Command failed with exit code 1.info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

React Native offline App using react-native-sqlite-storage

$
0
0

I am new to react native. I want to build an offline react native app for storing user data (Basic user details, user personal documents, images, etc). I already gone through some documents about react-native-sqlite-storage and I would like to integrate it. But not sure,

  1. If I can recover all the user data when user delete application data
  2. What is advantage of using react-native-sqlite-storage than redux-persist for offline app development?

console.error: @firebase/firestore:Firestore (7.8.1): Could not reach Cloud Firestore backend. Backend didn't respond within 10 secounds

$
0
0

I am creating little news app using React-Native then i finished on iOS and works fine. Now i am working on Android but getting some error

Error:console.error: @firebase/firestore:Firestore (7.8.1): Could not reach Cloud Firestore backend. Backend didn't respond within 10 secounds. This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.

config.js

import * as firebase from 'firebase';export default firebaseConfig = {  apiKey: 'AIzaSyBHFTyZT_oTGYSJorgy6CXfqy5HhNLXDpk',  authDomain: 'mandakhapp-21f43.firebaseapp.com',  databaseURL: 'https://mandakhapp-21f43.firebaseio.com',  projectId: 'mandakhapp-21f43',  storageBucket: 'mandakhapp-21f43.appspot.com',  messagingSenderId: '578624772888',  appId: '1:578624772888:web:fb3a2d1dbfef2588bc9c6d',  measurementId: 'G-P0NKBJ76ZS',};  const firebaseApp = firebase.initializeApp(firebaseConfig);  export const firebaseAuth =firebaseApp.auth();

unable to set notification tone for react native push notification (Android)

$
0
0

I'm creating a remainder app, in which I want to use my custom tone mp3 as notification tone, I saw some solutions mentioned here react native push notification sound, copied the mp3 file into res/raw and in js tried the below codes likesoundName: 'name' also soundName: android.resource://com.xyz/raw/my_sound still the default notification tone

react-native app doesn't start after installing ui-kitten

$
0
0

I would like to install ui-kitten in an existing code base. So, I run

npm i @ui-kitten/components @eva-design/eva react-native-svgnpm start -- --reset-cache

When I execute the following command I expect the app to run on my emulator.

npx react-native run-android

Instead, I get the following error

FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:mergeDexDebug'.> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:      The number of method references in a .dex file cannot exceed 64K.     Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html

Cheers

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

how to do chrome cast in JwPlayer for android

$
0
0

I'm trying to cast the videos playing on Jwplayer in near by devices like Tv, Laptop etc.

i followed this tutorial https://developer.jwplayer.com/jwplayer/docs/android-enable-casting-to-chromecast-devices

then on below code

CastOptions castOptions = new CastOptions.Builder()//                .setReceiverApplicationId(context.getString(R.string.app_id))                .setLaunchOptions(launchOptions)                .build();

I didn't get setReceiverApplicationId as i don't have such a id.

So, i went here How do you find your Google Cast App ID (app_id) in the 2017 Google Play Developer Console? and decided not to pay before testing.

Then on Jw docs it is mentioned setReceiverApplicationId() allows you to filter discovery results and to launch the receiver app when a cast session starts

Since i don't need filters i commented that line.

Now i got a cast icon on xml. but when I tap it nothing is happening.

Please someone tell me

  • Is app_id is necessary how to get it ?

  • How to test the chrome casting ?

Viewing all 28460 articles
Browse latest View live


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