728x90

https://github.com/react-native-webview/react-native-webview/blob/master/docs/Debugging.md

 

GitHub - react-native-webview/react-native-webview: React Native Cross-Platform WebView

React Native Cross-Platform WebView. Contribute to react-native-webview/react-native-webview development by creating an account on GitHub.

github.com

위 사이트 참고

 

 

// MainApplication.java 에 디버깅 허용 소스 추가

import android.webkit.WebView;

  @Override
  public void onCreate() {
    super.onCreate();
	  ...
    WebView.setWebContentsDebuggingEnabled(true);
  }

크롬에서 아래 주소로 열기

chrome://inspect/#devices

 

앱을 실행 중인 기기명 확인 후 inspect 클릭

 

728x90

https://stackoverflow.com/questions/71836843/upgraded-react-native-version

 

Upgraded react native version

After upgrading my react native version from 0.63.3 to latest version, I am getting the following errors: > Could not resolve all files for configuration ':classpath'. > Could not find com.

stackoverflow.com

android > settings.gradle 내용 변경

rootProject.name = 'my_app'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/react-native-gradle-plugin')

if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
    include(":ReactAndroid")
    project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
}

package.json

{
  "name": "my_app",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android-d": "react-native run-android --variant=debug",
    "android": "react-native run-android --variant=release",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint .",
    "build-android": "cd ./android && ./gradlew app:bundleRelease --stacktrace",
    "build": "cd ./android && ./gradlew assembleRelease",
    "build-debug": "cd ./android && ./gradlew assembleDebug",
    "bundle": "cd ./android && ./gradlew app:bundleRelease",
    "clean": "cd ./android && ./gradlew clean",
    "devtools": "react-devtool"
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "^1.15.14",
    "@react-native-firebase/app": "^14.11.0",
    "@react-native-firebase/dynamic-links": "^14.11.0",
    "@react-native-firebase/messaging": "^14.11.0",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/stack": "^6.0.11",
    "react": "17.0.2",
    "react-native": "0.68.2",
    "react-native-webview": "^11.22.2",
    "react-native-gesture-handler": "^2.1.0",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-screens": "^3.10.1",
    "react-native-send-intent": "^1.3.0",
    "react-router-dom": "^6.2.1"
  },
  "devDependencies": {
    "@babel/core": "^7.8.4",
    "@babel/runtime": "^7.8.4",
    "@react-native-community/eslint-config": "^1.1.0",
    "babel-jest": "^25.1.0",
    "eslint": "^6.5.1",
    "jest": "^25.1.0",
    "metro-react-native-babel-preset": "^0.59.0",
    "react-test-renderer": "16.13.1"
  },
  "jest": {
    "preset": "react-native"
  }
}

 

'Mobile App Develop > Android개발' 카테고리의 다른 글

[Android] React Native Webview 디버깅  (0) 2022.07.04

+ Recent posts