react-native - 我无法从 react-native 安装 apk 电话我 ""未安装应用程序""اا

标签 react-native

我无法从 react-native 安装 apk

它的电话我““未安装应用程序””

我使用 ing 构建它

./gradlew assembleRelease

build 成功

总时间:15.842 秒

此构建可能更快,请考虑使用 Gradle 守护程序:http://gradle.org/docs/2.4/userguide/gradle_daemon.html

我STFW

我发现
这个

https://github.com/facebook/react-native/issues/4421

和这个

Unable to install signed apk from React Native

但没有解决问题

最佳答案

您共享的链接中的文档:

I use this to sine my apk facebook.github.io/react-native/docs/signed-apk-android.html and I try unsine apk but its the same



不完整且未签署您的 APK 文件。

如所见 here :

Android requires that all apps be digitally signed with a certificate before they can be installed, so to distribute your Android application via Google Play store, you'll need to generate a signed release APK. The Signing Your Applications page on Android Developers documentation describes the topic in detail. This guide covers the process in brief, as well as lists the steps required to packaging the JavaScript bundle.


gradlew assembleRelease只会构建/捆绑您的应用程序以进行生产。您需要自己签署 APK 文件。

这些是我想在生产模式下运行我的应用程序时采取的步骤:
  • keytool -genkey -v -keystore key.keystore -alias app-alias -keyalg RSA -keysize 2048 -validity 10000
  • cd android && gradlew assembleRelease && cd ..
  • jarsigner -verbose -keystore \path_to_key\key.keystore \path_to_apk\app-release-unsigned.apk app-alias
  • zipalign -f -v 4 \path_to_apk\app-release-unsigned.apk appName.apk

  • 按照以下步骤操作,您的应用程序应该会成功安装。

    关于react-native - 我无法从 react-native 安装 apk 电话我 ""未安装应用程序""اا,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44752263/

    相关文章:

    javascript - react native : Touchable Opacity element is clickable on iOS but not Android

    react-native - 如何将 props 从组件传递到另一个组件

    react-native - Visual Studio 代码 react-native : Current workspace is not a React Native project

    android - 如何将 View 宽度扩展到 React Native 中的可用可用空间

    node.js - 语义发布未安装并询问我无法更新的特定 Node 版本

    javascript - this.props.filterUser 不是一个函数

    windows - 我正在尝试生成一个 apk 但出现此错误任务 ':app:bundleReleaseJsAndAssets' 执行失败

    javascript - 如何通过 react-navigation 在 react-native 上使用 react 钩子(Hook)

    javascript - 如何在 react-native 中传递子项和父项之间的数据?

    sqlite - React Native AsyncStorage |行太大而无法放入 CursorWindow