标签: code-push

Android Studio 3中响应生成的资源问题

我最近升级到Android Studio 3

gradle plugin: 3.0.0-beta2
gradle: 4.1
Run Code Online (Sandbox Code Playgroud)

在我们的项目中,我们使用:react-native":"0.46.4"与codepush插件.

建造:

gradlew assembleStagingDebug
Run Code Online (Sandbox Code Playgroud)

工作得很好,但一旦我尝试建立生产:

gradlew assembleProductionRelease
Run Code Online (Sandbox Code Playgroud)

我得到一个错误,该错误是由processProductinoReleaseResources任务中的react创建的资源引起的:

Issues:
 - ERROR: /Users/user/react/android/app/build/intermediates/res/merged/production/release/drawable-hdpi/node_modules_reactnavigation_src_views_assets_backicon.png uncompiled PNG file passed as argument. Must be compiled first into .flat file.
 - ERROR:  failed parsing overlays
        at com.android.builder.internal.aapt.v2.AaptV2Jni.buildException(AaptV2Jni.java:154)
Run Code Online (Sandbox Code Playgroud)

在我对这个问题的征服中,我尝试了禁用proguard,如:

buildTypes {
        release {
            debuggable true
            minifyEnabled false
            shrinkResources false
        }
        debug {
            debuggable true
            minifyEnabled false
            println proguardFiles
        }
    }
Run Code Online (Sandbox Code Playgroud)

但没有任何运气.

有任何想法吗?我还要感谢解释android资源的.flat转换在实际发生的地方发生了什么,以及为什么它在StagingDebug任务期间不会发生.

这里提出的解决方法最终对我有用.但我认为原始问题仍然存在.

更新28.3.2018自Android studio 3.1升级以来我得到了这个:

WARNING: The option 'android.enableAapt2' is deprecated and should …
Run Code Online (Sandbox Code Playgroud)

android gradle react-native code-push android-studio-3.0

16
推荐指数
1
解决办法
5038
查看次数

如何在我的React Native Android应用程序中显示当前的CodePush版本标签?

寻找类似的东西: <Text>VERSION={CodePush.VersionLabel}</Text>

CodePush.VersionLabel的内容类似于"v6" code-push deployment ls <MyApp>

我想在登录屏幕的底部显示此信息.

react-native code-push

14
推荐指数
3
解决办法
4476
查看次数

Codepush React Native Android staging-在根项目中找不到任务installReleaseStagingDebug

我正在尝试根据react-native-code-push文档的这一部分配置我的RN android项目

我的build.gradle文件具有以下配置:

buildTypes {
        debug {
        }
        releaseStaging {
            buildConfigField "String", "CODEPUSH_KEY", CODEPUSH_KEY_STAGING
        }
        release {
            buildConfigField "String", "CODEPUSH_KEY", CODEPUSH_KEY_PRODUCTION
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            signingConfig signingConfigs.release
        }
    }
Run Code Online (Sandbox Code Playgroud)

但当我跑: react-native run-android --variant releaseStaging

我收到错误: Task 'installReleaseStagingDebug' not found in root project 'MyAppName'.

也试过跑 react-native run-android --configuration releaseStaging

这给了我一个稍好的错误:

Task 'installReleaseStaging' not found in root project 'MyAppName'. Some candidates are: 'uninstallReleaseStaging'.
Run Code Online (Sandbox Code Playgroud)

知道我错过了什么吗?
谢谢!
乌里

android staging react-native code-push react-native-code-push

9
推荐指数
1
解决办法
1073
查看次数

Dynamically compiling and running a react-native app inside another

I need to create a mobile app that contains other apps and can run them. It is basically like an "app center" which have a list of apps (that we publish on our server) and the user can open one of them which lead to the app being opened.

Think about Expo's app, the user can scan the QR code of his app and it will be automatically compiled and opened, this is close to the feature I want. …

javascript compilation react-native code-push

8
推荐指数
1
解决办法
198
查看次数

应用程序中心 codepush 返回“请求被阻止”

我正在使用 React Native 运行 codepush,我能够在 appcenter 上上传 v1.0,但是现在当我再次运行 codepush 时,它会返回“请求被阻止”

我的命令

appcenter codepush release-react -a username/appname -d Staging
Run Code Online (Sandbox Code Playgroud)

输出

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta content='text/html; charset=utf-8' http-equiv='content-type'/><style type='text/css'>body { font-family:Arial; margin-left:40px; }img  { border:0 none; }#content { margin-left: auto; margin-right: auto }#message h2 { font-size: 20px; font-weight: normal; color: #000000; margin: 34px 0px 0px 0px }#message p  { font-size: 13px; color: #000000; margin: 7px 0px 0px 0px }#errorref { font-size: 11px; color: #737373; margin-top: 41px }</style><title>Microsoft</title></head><body><div …
Run Code Online (Sandbox Code Playgroud)

react-native code-push appcenter

8
推荐指数
1
解决办法
1616
查看次数

App Store和Play Store如何处理恶意代码推送?

诸如React Native或Cordova之类的本地编程平台使开发人员能够使用JavaScript编写其应用程序并将其发布到iOS和Android。

尽管code-push是一项允许开发人员通过云服务器(而不是Play商店或App Store等官方应用程序中心)更新其应用程序的服务,但请注意,开发人员应在App Store或Play商店上发布其安全的应用程序,并在获得批准后,通过代码推送更新他的应用程序,并向其应用程序添加恶意逻辑,例如将用户联系人或画廊图片发送到其服务器。

在这种情况下,对操作系统安全性有哪些保证?Google或Apple如何处理这些应用程序?

react-native code-push

7
推荐指数
1
解决办法
448
查看次数

桥未设置。这可能是因为您已经在 CodePush 中显式合成了桥,即使它是从 RCTEventEmitter 继承的

我得到的错误是这样的:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error when sending event: CodePushDownloadProgress with body: {
    receivedBytes = 1965637;
    totalBytes = 1965637;
}. Bridge is not set. This is probably because you've explicitly synthesized the bridge in CodePush, even though it's inherited from RCTEventEmitter.'
Run Code Online (Sandbox Code Playgroud)

这就是我包装 React 组件的方式:

export default CodePush(
    {
        updateDialog: false,
        checkFrequency: CodePush.CheckFrequency.ON_APP_RESUME,
        installMode: CodePush.InstallMode.ON_NEXT_RESTART
    },
)(App);
Run Code Online (Sandbox Code Playgroud)

有人知道如何修复吗?

javascript ios react-native code-push react-native-ios

7
推荐指数
0
解决办法
1397
查看次数

CodePush:如何部署到同一部署配置的多个构建版本?

我了解理想情况的部署模型,所有用户总是将他们的应用更新到最新的应用商店版本.但实际上他们没有.如何使用CodePush处理react-native iOS应用程序的不同构建版本?考虑以下两种情况:

1)我一直在使用CodePush将新的js bundels部署到我的应用程序的1.0.0版本中.现在我发布了1.1.0并希望通过CodePush提供新代码.据我所知,现在有一种方法可以同时部署到1.0.0和1.1.0,不同的捆绑包也不同.因此,一旦我将捆绑包推出到1.1.0,就无法更新未通过应用商店更新的1.0.0应用.

2)据我所知,解决这个问题的一种方法是仅使用增加的内部版本号(CFBundleVersion)发布新版本,但更改版本字符串(CFBundleShortVersionString).但这有效,即使是新下载的最新应用程序商店版本(例如1.1.0(8))也会首先在codepush上加载最新的捆绑包.

有没有办法干净利落地完成这项工作而没有不必要的更新?

ios react-native code-push

6
推荐指数
1
解决办法
1229
查看次数

如何使用CodePush为React Native部署任意资源

我正在使用CodePush将js包和一些资源部署到我的react-native iOS应用程序.我没有使用react-native bundler从我的项目中收集所有静态图像,而是使用一个构建步骤将一个名为"static"的文件夹复制到release/assets中.但是除了"静态"文件夹之外,我还有发布/资产中的其他文件夹,其中包含通过uri在应用程序中动态使用的图像和视频(例如{uri:'assets/images/myImage.jpg'}).在XCode中构建应用程序时,我只在包中包含assets文件夹.

从CodePush文档中我收集到,部署release文件夹应该更新我的所有资产.但事实并非如此.

我通过XCode下载了xcappdata,你可以看到,CodePush下载了所有内容并将其存储在/ Library/Application Support/CodePush/[id]/release中.但它仍然没有出现在应用程序中.

有任何想法吗?我是否误解了CodePush的功能?

ios react-native code-push

6
推荐指数
1
解决办法
886
查看次数

如何使用Code Push CLI更新"生产"部署?

我一直在向我的团队展示我的Staging关键进度.当我这样做code-push deployment ls APP_NAME_HERE -k,它会给我一个StagingProductionProduction具有消息No updates released.

我一直在code-push release-react APP_NAME_HERE ios用来更新.任何人都可以指导我,我需要发送什么选项Production而不是Staging

react-native code-push

6
推荐指数
1
解决办法
4489
查看次数