1

我尝试在 react-native 中获取 apk,但它没有给我任何东西。apk文件中的发布文件为空,grandlew bundleRelease完成后,它说:

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

我找不到如何解决这个问题

我在 app/build.grandle 中的签名配置

signingConfigs {
        release {
            if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
                storeFile file(MYAPP_UPLOAD_STORE_FILE)
                storePassword MYAPP_UPLOAD_STORE_PASSWORD
                keyAlias MYAPP_UPLOAD_KEY_ALIAS
                keyPassword MYAPP_UPLOAD_KEY_PASSWORD
            }
        }
    }

在 gradle.properties 中:

MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore
MYAPP_UPLOAD_KEY_ALIAS=my-key-alias
MYAPP_UPLOAD_STORE_PASSWORD=password
MYAPP_UPLOAD_KEY_PASSWORD=password

创建 my-upload-key.keystore 后,我从 C:\Program Files\Java\jdk1.8.0_181\bin 复制 my-upload-key.keystore 并粘贴到 android/app。有什么问题吗?

4

1 回答 1

0

默认情况下,Gradle 不会显示所有警告(例如弃用警告)。相反,Gradle 将收集它们并在构建结束时呈现摘要。尝试通过 gradle.properties 指定警告模式,如下所示:

org.gradle.warning.mode=all

请让我们知道它是否有效。

于 2019-11-25T09:25:44.667 回答