Giter VIP home page Giter VIP logo

wuba / taro-playground Goto Github PK

View Code? Open in Web Editor NEW
225.0 23.0 47.0 31.38 MB

The Taro Playground App is a cross-platform application developed using Taro, to help developers develop and debug Taro applications.

Home Page: https://wuba.github.io/taro-playground/

License: Apache License 2.0

Shell 0.04% Starlark 0.01% Java 0.24% Kotlin 0.09% JavaScript 0.07% Ruby 0.09% Objective-C 0.07% TypeScript 98.72% SCSS 0.46% HTML 0.01% C++ 0.11% Objective-C++ 0.08% CMake 0.01%
react react-native expo taro ios android typescript javascript app playground metro fastlane miniprogram react-native-app developer-tools

taro-playground's Introduction

Taro Playground App

The Taro Playground App is a cross-platform application developed using Taro, to help developers develop and debug Taro applications. It is initialized using taro react native template.

Preview

Android iOS Web Mini Program
https://github.com/wuba/taro-playground/releases https://apps.apple.com/cn/app/taro-playground/id1576830673 https://wuba.github.io/taro-playground/ https://github.com/wuba/taro-playground

iOS testflight link

https://testflight.apple.com/join/RDFCp2yy

Supported versions

  1. taro: @tarojs/cli@^3.2.0
  2. framework: 'react'
Playground Version Taro version React Native version branch
1.1.2 >= 3.2.0, < 3.3.10 0.64 releases/rn-0.64+taro-3.3.9
1.2.0 ~ 1.3.9 >= 3.3.10, < 3.4.2 0.66 releases/rn-0.66+taro-3.4.2
1.4.0 ~ 1.4.8 >= 3.4.2, < 3.5.0 0.67 releases/rn-0.67+taro-3.4.10
1.6.0 ~ 1.6.5 >= 3.5.0, < 3.5.6 0.68 releases/rn-0.68+taro-3.5.5
1.7.0 ~ 1.7.4 >=3.5.6, < 3.6.0 0.69 releases/rn-0.69+taro-3.5.11
1.8.0 ~ >=3.6.0, < 3.7.0 0.70 main

Quick start

install react native library

install peerDependencies of @tarojs/taro-rn @tarojs/components-rn and @tarojs/router-rn, it will also run post-install. please modify and run upgradePeerdeps script when you change taro version.

run this script after the project is initialized.

yarn upgradePeerdeps

pod install

run this script when you add new react native library or update react native library version.

see pod-install for more information.

yarn podInstall

start ios app

yarn ios

start android app

yarn android

start bundler

yarn start

reset cache and start bundler

yarn start --reset-cache

more information

  1. development process of taro react native
  2. github address of the taro project
  3. related articles of taro playground

Release

build ios bundle

yarn build:rn --platform ios

build Android bundle

yarn build:rn --platform android

release ios APP

see publishing-to-app-store for details.

release android apk

see signed-apk-android for details.

Github workflows

use github actions to build your apps. this template include basic github action config.

see .github/workflows for details.

events

we assemble debug and release product for both android and ios when you push or pull request on master branch by default. design your own pipeline by modify .github/workflows files.

see events-that-trigger-workflows

ios

configuration

Modify the following configuration items for package and publish your app.

.github/workflows/assemble_ios_debug.yml .github/workflows/assemble_ios_release.yml

env:
  APP_ID: com.taro.demo # Application Product Bundle Identifier
  APP_NAME: Taro Demo # The Display Name of your app
  VERSION_NUMBER: 1.0.0 # Application version number
  BUILD_NUMBER: 1.0.0.0 # Application build number, used by release only.
  TEAM_ID: XXXXXXXXXX # Team ID, is used when upgrading project
  PROVISIONING_PROFILE_SPECIFIER: Product_profile # Provisioning profile name to use for code signing
  CODE_SIGN_IDENTITY: iPhone Distribution # Code signing identity type (iPhone Developer, iPhone Distribution)
  SIGNING_CERTIFICATE_P12_DATA: ${{secrets.RELEASE_SIGNING_CERTIFICATE_P12_DATA}}
  SIGNING_CERTIFICATE_PASSWORD: ${{secrets.RELEASE_SIGNING_CERTIFICATE_PASSWORD}}
  PROVISIONING_PROFILE_DATA: ${{secrets.RELEASE_PROVISIONING_PROFILE_DATA}}
  APP_STORE_CONNECT_USERNAME: ${{secrets.APP_STORE_CONNECT_USERNAME}} # This secret should be set to the Apple ID of your developer account, used by release only.
  APP_STORE_CONNECT_PASSWORD: ${{secrets.APP_STORE_CONNECT_PASSWORD}} # used by release only.

values like ${{secrets.xxxxx}} are manually generated and store in your github encrypted secrets.

SIGNING_CERTIFICATE_P12_DATA
cat Certificates.p12 | base64 | pbcopy
SIGNING_CERTIFICATE_PASSWORD

encryption password of your Personal Information Exchange (.p12)

PROVISIONING_PROFILE_DATA
cat profile.mobileprovision | base64 | pbcopy
APP_STORE_CONNECT_PASSWORD

This secret should be set to an application-specific password for your Apple ID account. Follow these instructions to create an application-specific password.

read more

  1. deploy an ios app to testflight or the app store using github actions
  2. encrypted-secrets
  3. fastlane

android

configuration

Modify the following configuration items for package and publish your app.

.github/workflows/assemble_android_debug.yml .github/workflows/assemble_android_release.yml

env:
  APP_ID: com.taro.demo  # Application Product Bundle Identifier
  APP_NAME: Taro Demo  # The Display Name of your app
  VERSION_NAME: 1.0.0 # version name
  VERSION_CODE: 10 # version code
  KEYSTORE_FILE: debug.keystore # key store file
  KEYSTORE_PASSWORD: android # key store password
  KEYSTORE_KEY_ALIAS: androiddebugkey # key store key alias
  KEYSTORE_KEY_PASSWORD: android # key store key password

For the security of your app, please regenerate the .keystore file and store the password in your github encrypted secrets.

read more

  1. app signing
  2. encrypted-secrets

Web & Mini Program support

This project supports web and mini program, but it has not been fully tested.

start web server

yarn dev:h5

Github workflows of Web

see peaceiris/actions-gh-pages for more details.

start wechat mini program

yarn dev:weapp

Github workflows of Wechat Mini Program

configuration

We use @tarojs/plugin-mini-ci to deploy mini programs. Modify the following configuration items for package and publish your wechat mini program.

.github/workflows/assemble_weapp_release.yml

env:
  WEAPP_ID: ${{ secrets.WEAPP_ID }} # wechat mini program id
  WEAPP_KEY: ${{ secrets.WEAPP_KEY }} # wechat mini program key

values like ${{secrets.xxxxx}} are manually generated and store in your github encrypted secrets.

WEAPP_KEY
cat private.$WEAPP_ID.key | base64 | pbcopy

Attention

The source code is customized for the Taro playground application and is for reference only. If you want to use it directly, please make the following changes.

  1. Use your own signature file.
  2. Customize your app id, app name, app launcher, etc.
  3. Remove the attention block in ios/Podfile.

For React Native repo debugging

  1. Change appName to taroDemo, which used in AppRegistry.registerComponent(appName, () => App);.
  2. Generate a QR code with content taro://${ip}:${port} or shaking the phone and change bundle Location.

Contributing

We sincerely hope that developers can provide valuable comments and suggestions, and developers can provide feedback on suggestions and problems by submitting PR or Issue.

If you have other questions, you can join the communication group for help.

License

Taro Playground source code is available under the Apache License V2.

Taro and its graphic trademarks are owned by Beijing Jingdong Century Trading Co., Ltd. and licensed to the Taro Playground project.

taro-playground's People

Contributors

4332weizi avatar 523753042 avatar 58code avatar bettyuan avatar felixonmars avatar flyrui316 avatar iambool avatar ichengbo avatar shinken008 avatar silentmelody avatar zhiqingchen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

taro-playground's Issues

拉取代码编译安卓app报错

Task :expo:compileDebugKotlin FAILED
\node_modules\expo\android\src\main\java\expo\modules\ReactNativeHostWrapperBase.kt: (50, 3): 'getUIImplementationProvider' overrides nothing
\node_modules\expo\android\src\main\java\expo\modules\ReactNativeHostWrapperBase.kt: (50, 76): Unresolved reference: UIImplementationProvider
\node_modules\expo\android\src\main\java\expo\modules\ReactNativeHostWrapperBase.kt: (51, 12): Not enough information to infer type variable T
请问这是和我本机开发环境有关吗

运行 yarn ios 报如下错误

Error message

xcodebuild[9510:1400671] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:3D28E7C6-28B1-456C-861B-F0FF0C32BF49, OS:16.4, name:iPhone 14 }
{ platform:iOS Simulator, id:3D28E7C6-28B1-456C-861B-F0FF0C32BF49, OS:16.4, name:iPhone 14 }
** BUILD FAILED **


The following build commands failed:
        CompileC /Users/kenny/Library/Developer/Xcode/DerivedData/taroDemo-bhudqnvehprncdezkduoxyigqosy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build/Objects-normal/arm64/FBReactNativeSpec-generated.o
/Users/kenny/taro-playground/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm
normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-Codegen' from project 'Pods')
(1 failure)

React Native Info

System:
    OS: macOS 13.3
    CPU: (8) arm64 Apple M1
    Memory: 76.19 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.19.0/bin/yarn
    npm: 8.19.3 - ~/.nvm/versions/node/v16.19.0/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    Android SDK:
      API Levels: 25, 28, 29, 30, 31, 32, 33
      Build Tools: 29.0.2, 30.0.3
      System Images: android-31 | Google APIs ARM 64 v8a
      Android NDK: 22.1.7171670
  IDEs:
    Android Studio: 2022.1 AI-221.6008.13.2211.9619390
    Xcode: 14.3/14E222b - /usr/bin/xcodebuild
  Languages:
    Java: 19.0.1 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: ^18.1.0 => 18.2.0 
    react-native: ^0.70.5 => 0.70.7 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

请问要怎么解决?

taro-playground error

image
image

LOG Running "taroDemo" with {"rootTag":11}
ERROR Invariant Violation: "taroDemo" has not been registered. This can happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn't called., js engine: hermes

PS D:\code\myApp> yarn dev:rn --qr
yarn run v1.22.21
$ npm run build:rn -- --watch --qr --qr

[email protected] build:rn
taro build --type rn --watch --qr --qr

👽 Taro v3.6.21

yarn ios ----build commands failed

The following build commands failed:
CompileC /Users/mac/Library/Developer/Xcode/DerivedData/taroDemo-bukgeqacgqpxgrgzivmhyneopmqe/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/x86_64/json.o /Users/mac/WebstormProjects/taro-playground/ios/Pods/RCT-Folly/folly/json.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')

app启动不了报错

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening taroDemo.xcworkspace

接入热更新服务

需求描述

  1. 方便发布。
  2. 提供热更新接入示例。

todo

  1. 考虑接入 app center
  2. 通过 action 触发热更新发布

启用 Hermes

文档

https://reactnative.dev/docs/hermes

问题

  • Taro RN 在编译时,没有使用 react-native/scripts/react-native-xcode.shnode_modules/react-native/react.gradle
    以至于没有进行字节码的打包,相关内容需要进行重构
  • 入口文件通过 --entry-file 传入 node_modules/metro/src/node-haste/DependencyGraph/assets/empty-module.js

format.h:580:9: note: in instantiation of member function

~/taro-playground/ios/Pods/Headers/Public/fmt/fmt/format.h:580:9: note: in instantiation of member function 'fmt::basic_string_viewfmt::internal::char8_type::basic_string_view' requested here
: basic_string_viewinternal::char8_type(
^

本地起playground在ios上挂

我的环境:
xcode: v14.3.1
node: v16.20.0

repro step:

  • yarn -> yarn upgradePeerdeps -> yarn build:rn --platform ios -> yarn start -> yarn ios (npx react-native run-ios --no-packager --simulator 'iPhone 14 Pro')

yarn ios的时候报错和这个是这个issue里#91 一样的错: https://user-images.githubusercontent.com/42827938/253148187-c152ef13-4a4d-45ee-88ef-688839b7b2dc.png
然后我用xcode直接build,报错'value' is unavailable: introduced in iOS 12.0,按照这个帖子fix了facebook/react-native#34106 (comment)

然后继续yarn ios,成功,但是metro那边开始报错

 ERROR  Invariant Violation: Tried to register two views with the same name RNSVGRect
 ERROR  Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
        A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
Error: Unable to resolve module ./Libraries/Components/DatePicker/DatePickerIOS from /Users/shinn/Documents/opensource/taro-playground/node_modules/react-native/index.js: 

None of these files exist:
  * node_modules/react-native/Libraries/Components/DatePicker/DatePickerIOS(.native|.native.ts|.ts|.native.tsx|.tsx|.native.js|.js|.native.jsx|.jsx|.native.scss|.scss|.native.sass|.sass|.native.less|.less|.native.css|.css|.native.pcss|.pcss|.native.json|.json|.native.styl|.styl|.native.cjs|.cjs|.native.svgx|.svgx)
  * node_modules/react-native/Libraries/Components/DatePicker/DatePickerIOS/index(.native|.native.ts|.ts|.native.tsx|.tsx|.native.js|.js|.native.jsx|.jsx|.native.scss|.scss|.native.sass|.sass|.native.less|.less|.native.css|.css|.native.pcss|.pcss|.native.json|.json|.native.styl|.styl|.native.cjs|.cjs|.native.svgx|.svgx)
  15 | import typeof ActivityIndicator from './Libraries/Components/ActivityIndicator/ActivityIndicator';
  16 | import typeof Button from './Libraries/Components/Button';
> 17 | import typeof DatePickerIOS from './Libraries/Components/DatePicker/DatePickerIOS';
     |                                   ^
  18 | import typeof DrawerLayoutAndroid from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid';
  19 | import typeof FlatList from './Libraries/Lists/FlatList';
  20 | import typeof Image from './Libraries/Image/Image';
    at ModuleResolver.resolveDependency (/Users/shinn/Documents/opensource/taro-playground/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:152:15)
    at DependencyGraph.resolveDependency (/Users/shinn/Documents/opensource/taro-playground/node_modules/metro/src/node-haste/DependencyGraph.js:264:43)
    at Object.resolve (/Users/shinn/Documents/opensource/taro-playground/node_modules/metro/src/lib/transformHelpers.js:170:21)
    at resolveDependencies (/Users/shinn/Documents/opensource/taro-playground/node_modules/metro/src/DeltaBundler/graphOperations.js:466:33)
    at processModule (/Users/shinn/Documents/opensource/taro-playground/node_modules/metro/src/DeltaBundler/graphOperations.js:232:31)
    at async addDependency (/Users/shinn/Documents/opensource/taro-playground/node_modules/metro/src/DeltaBundler/graphOperations.js:361:18)
    at async Promise.all (index 1)
    at async processModule (/Users/shinn/Documents/opensource/taro-playground/node_modules/metro/src/DeltaBundler/graphOperations.js:279:3)
    at async addDependency (/Users/shinn/Documents/opensource/taro-playground/node_modules/metro/src/DeltaBundler/graphOperations.js:361:18)
    at async Promise.all (index 0)
Error: Unable to resolve module ./Libraries/Components/DatePicker/DatePickerIOS from /Users/shinn/Documents/opensource/taro-playground/node_modules/react-native/index.js: 

None of these files exist:
  * node_modules/react-native/Libraries/Components/DatePicker/DatePickerIOS(.native|.native.ts|.ts|.native.tsx|.tsx|.native.js|.js|.native.jsx|.jsx|.native.scss|.scss|.native.sass|.sass|.native.less|.less|.native.css|.css|.native.pcss|.pcss|.native.json|.json|.native.styl|.styl|.native.cjs|.cjs|.native.svgx|.svgx)
  * node_modules/react-native/Libraries/Components/DatePicker/DatePickerIOS/index(.native|.native.ts|.ts|.native.tsx|.tsx|.native.js|.js|.native.jsx|.jsx|.native.scss|.scss|.native.sass|.sass|.native.less|.less|.native.css|.css|.native.pcss|.pcss|.native.json|.json|.native.styl|.styl|.native.cjs|.cjs|.native.svgx|.svgx)

simulator上就一直白屏。这个该如何解决?谢谢

yarn dev:tt 编译抖音小程序报错

✖ Errors:

ModuleBuildError: Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: {path}/node_modules/react-native/index.js: Unexpected token, expected "{" (14:7)

12 |
13 | // Components

14 | import typeof AccessibilityInfo from './Libraries/Components/AccessibilityInfo/AccessibilityInfo';
| ^
15 | import typeof ActivityIndicator from './Libraries/Components/ActivityIndicator/ActivityIndicator';
16 | import typeof Button from './Libraries/Components/Button';
17 | import typeof DatePickerIOS from './Libraries/Components/DatePicker/DatePickerIOS';
at parser.next ()
at normalizeFile.next ()
at run.next ()
at transform.next ()

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

npm run start 出错

系统:windows
[email protected]

 ERROR  Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

APP 沙盒方案

扫描加载不同 app 后,多个 app 之间未隔离,可能产生风险。

  1. APP权限隔离
  2. 文件存储隔离。
  3. storage存储隔离。
  4. RN包直接调用问题处理。

提供加载 release bundle 方案

功能描述

  1. 用户将应用进行打包后,通过cdn,github release assets 等形式进行存储。
  2. 其他用户使用扫描功能,加载bundle运行。
  3. 提供方便的 action 供项目接入,支持在github中打包 bundle 并生成二维码。
  4. 方便 demo 等项目进行传播。

todo

  1. 注意版本号兼容的处理。
  2. 注意打包时的 isdev、platform 参数的处理。

添加样式测试demo

  1. 样式单位 rem、px、rpx。
  2. 跨平台样式。
  3. classname。
  4. 全局样式。
  5. css module
  6. ...

依赖收集,如有需要加入app的依赖,请回复此 issue

为方便调试,本 APP 支持必要的依赖加入。

lib version app version status
react-native-svg 12.1.1 >= 1.3.0 released
@shopify/flash-list 1.1.0 >=1.4.10 released
@shopify/react-native-skia 0.1.134 >=1.6.0 released
react-native-reanimated 2.9.0 >=1.6.0 released
expo-gl 11.3.0 >=1.6.0 released
lottie-react-native 5.1.3 >=1.6.0 released
lottie-ios 3.2.3 >=1.6.0 released
react-native-linear-gradient 2.6.2 >=1.6.2 released

欢迎 PR

  1. yarn add xxxx
  2. yarn
  3. 提交 PR 至 main 分支

手机软件扫码、手动输入服务地址时无法正常预览

  1. 测试项目,https://github.com/wuba/Taro-Mortgage-Calculator
  2. 昨天在自己家里网络是可以正常预览的,到了公司环境后无法预览
  3. 电脑和手机连接的同一个wifi,经过测试网络是通的。我在电脑上随便启动了个服务,手机通过局域网ip,http协议可以访问到,但是taro rn启动的应用,就无法预览
  4. 手机为苹果,手机软件版本为1.7.0,taro-rn应用依赖包通过yarn安装,启动脚本为:npm run dev:rn
    36179219c8a029247c07031d4ef9bfc

全新taro init什么都不做创建新项目安卓启动报错

相关平台

React Native

使用框架

React

环境信息

macos monterey 12.2.1
nodejs: v12.16.3
taro:  v3.4.1
react-native: ^0.66.0

复现步骤

taro init 选择rn模版
yarn upgradePeerdeps
yarn start

期望结果

成功打开app

实际结果

扫码后,启动了app,但是红屏报错

错误截图如下

image

请问,这个和本地安卓环境应该无关吧,ios是正常的

javac --version
javac 17.0.2

尝试解决

使用测试手机 华为meta 30pro
更换手机小米 note
结果是一样的

iOS端启动报错 希望修改

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening taroDemo.xcworkspace

Taro 3.6.0不支持

使用Taro [email protected]、@1.8.0.x
都会报错误

LOG Running "taroDemo" with {"rootTag":11}
ERROR Invariant Violation: "taroDemo" has not been registered. This can happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn't called., js engine: hermes

望尽快支持Taro 3.6.0

或者还有没有别的什么调试方式,不需要降Taro版本的?

Android端APP启动报错 密码错误 希望修改

Execution failed for task ':app:packageDebug'.

A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
com.android.ide.common.signing.KeytoolException: Failed to read key androiddebugkey from store "/Volumes/project/个人项目/taro/taro-playground/android/app/debug.keystore": keystore password was incorrect

taro-playground-1.4.8在11月4日rn官方bug之后发布Android失败

相关平台
React Native

使用框架
React

环境信息
windows7
jdk8
gradle6.9
nodejs: v12.22.11
taro: v3.4.10

复现步骤
下载并解压 taro-playground-1.4.8
yarn upgradePeerdeps
yarn build:rn --platform android
cd android
gradlew assembleRelease

结果
发布apk失败(如下)

FAILURE: Build failed with an exception.

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

Multiple task action failures occurred:
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx appcompat:appcompat:1.4.1
AAR metadata file: C:\Users\Administrator.gradle\caches\transforms-3\3a0feba48fed99a23f9c4bbf34263afa\transforms\appcompat:1.4.1\META-INF\com\android\build\gradle\arr-metadata.properties

尝试解决
删除node_modules
修改 package.json的 "react-native": "0.67.5",
yarn upgradePeerdeps
yarn build:rn --platform android
cd android
gradlew assembleRelease
结果还是发布失败

这个项目是不支持小程序查看吗?

运行 yarn dev:weapp 后报错:

./node_modules/@react-native-community/cameraroll/js/CameraRoll.js
Module build failed (from ./node_modules/@tarojs/mini-runner/node_modules/babel-loader/lib/index.js):
SyntaxError: /Users/ruoxie/Github/taro-playground/node_modules/@react-native-community/cameraroll/js/CameraRoll.js: Support for the experimental syntax 'flow' isn't currently enabled (32:8):

30 | };
31 |

32 | export type GroupTypes = $Keys;
| ^
33 |
34 | export type Include =
35 | | 'filename'

Add @babel/preset-flow (https://git.io/JfeDn) to the 'presets' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-flow (https://git.io/vb4yb) to the 'plugins' section to enable parsing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.