我无法从 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/