- What went wrong:
Execution failed for task ':app:installDebug'.
com.android.builder.testing.api.DeviceException: No connected devices!
Cause
ADB driver is not ready
com.android.builder.testing.api.DeviceException: No connected devices!
ADB driver is not ready
我—耶和华是鉴察人心、试验人肺腑的,要照各人所行的和他作事的结果报应他。 (耶利米书 17:10 和合本)
"I the Lord search the heart and examine the mind, to reward each person according to their conduct, according to what their deeds deserve." (Jeremiah 17:10 NIV)
Photo by Max Bender / Unsplash
Task :app:compileReleaseJavaWithJavac
C:\Users\lenger\Desktop\webrowser\android\app\src\main\java\com\wx\react\WeChatModule.java:9: error: package com.tencent.mm.sdk.openapi does not exist
import com.tencent.mm.sdk.openapi.IWXAPIEventHandler;
^
C:\Users\lenger\Desktop\webrowser\android\app\src\main\java\com\wx\react\WeChatModule.java:11: error: cannot find symbol
public class WeChatModule extends ReactContextBaseJavaModule implements IWXAPIEventHandler {
^
symbol: class IWXAPIEventHandler
2 errors
FAILURE: Build failed with an exception.
com.tencent.mm.sdk ==> com.tencent.mm.opensdk
In build.gradle file add one of the following:
dependencies {
compile 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+'
}
Could not find method compile() for arguments [com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
edit wrong android/build.gradle
edit correct android/app/build.gradle.
https://chocolatey.org/install
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install -y gnuwin32-coreutils.install choco install gnuwin32-grep.install -y choco install which -y choco install git -y choco install vim -y
C:\Users\lenger>which rm
C:\Program Files (x86)\GnuWin32\bin\rm.exe
C:\Users\lenger>which which
C:\ProgramData\chocolatey\bin\which.exe
C:\Users\lenger>which ls
C:\Program Files (x86)\GnuWin32\bin\ls.exe
C:\Users\lenger>which grep
C:\Program Files (x86)\GnuWin32\bin\grep.exe
C:\Users\lenger>which mv
C:\Program Files (x86)\GnuWin32\bin\mv.exe
C:\Users\lenger>which mkdir
C:\Program Files (x86)\GnuWin32\bin\mkdir.exe
import React, { Component } from 'react'; import { Button, Platform, StyleSheet, Text, View, WebView, } from 'react-native'; var WEBVIEW_REF = 'webview'; export default class App extends Component<{}> { constructor(props) { super(props); this.onWebViewMessage = this.onWebViewMessage.bind(this); this.onShare = this.onShare.bind(this); } onWebViewMessage(event) { console.warn(event.nativeEvent.data); let msg; try { msg = JSON.parse(event.nativeEvent.data); } catch (err) { console.warn(err); return; } console.log(msg); } onShare() { var fetchAbstractJS = "(" + this.fetchAbstract.toString() + "());"; console.log(fetchAbstractJS); this.refs[WEBVIEW_REF].injectJavaScript(fetchAbstractJS); } // function called in WebView via injectJavaScript fetchAbstract() { try { var title = document.querySelector('head title').innerText; var desc = document.querySelector('p').innerText; var imgurl = document.querySelector('p img').src; // post Message to react-native JS window.postMessage(JSON.stringify({'id' : 'ABSTRACT_FETCHED', 'url' : window.location.href, 'title' : title, 'desc' : desc, 'imgurl' : imgurl}), "*"); } catch (err) { console.warn(err); return; } } render() { return ( <View style={{flex:1}}> <WebView ref={WEBVIEW_REF} style={{flex:1}} onMessage={this.onWebViewMessage} source={{uri: 'https://manna.errong.win/let-s-growing-up-in-jesus/'}} /> <Button onPress={this.onShare} title="Share" color="#841584" accessibilityLabel="Social Share" /> </View> ); } }
Issue you might see below error while trying to run embedded-redis for your testing on your macOS after you upgrade to Sonoma. java.la...