小编Cry*_*csy的帖子

警告:API'variable.getMergeAssets()'已过时/ Android Studio 3.3

在最近的android更新之后,每次我构建我的应用程序时,都会收到以下警告:

WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.
It will be removed at the end of 2019.
Run Code Online (Sandbox Code Playgroud)
API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'. 
API 'variant.getPackageApplication()' is obsolete and has been replaced with 'variant.getPackageApplicationProvider()'. 
API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.
Run Code Online (Sandbox Code Playgroud)

虽然我在网上搜索解决方案,但大多数建议忽略这个问题,并等待将来的更新,这将有修复.还有其他解决方案,但那些根本不起作用.结果,我运行我的应用程序忽略警告.

当应用程序加载到我的虚拟设备中时,TextInputButton响应触摸使它们变得无用.我正在使用本机应用程序.请帮助我解决问题,因为它在gradle警告之前没有发生.

我的build.gradle(Module:app)有以下几行:

apply plugin: 'com.android.application'

import com.android.build.OutputFile

/**
 * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
 * and bundleReleaseJsAndAssets). …
Run Code Online (Sandbox Code Playgroud)

android build.gradle gradle-plugin react-native

12
推荐指数
1
解决办法
1万
查看次数

React-native(Signed)版本APK不断崩溃

在遵循了官方react native文档(即https://facebook.github.io/react-native/docs/signed-apk-android)中的所有文档之后,我创建了一个签名的react-native apk 。创建它后,我的应用程序崩溃了。

退后一步,我决定制作一个新的未编辑应用程序,然后重做相同的步骤。但是,该应用程序仍然崩溃。我查看了StackOverflow上的所有讨论,并尝试了他们的解决方案,但是没有一个起作用。谁能告诉我我做错了什么?以及我该如何解决。

这是我的build.gradle:

(在麻烦中,Android Studio确实警告我有关无法解析符号“ build”,但这并未影响我在虚拟设备中的应用)

apply plugin: "com.android.application"

import com.android.build.OutputFile

/**
 * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
 * and bundleReleaseJsAndAssets).
 * These basically call `react-native bundle` with the correct arguments during the Android build
 * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
 * bundle directly from the development server. Below you can see all the possible configurations …
Run Code Online (Sandbox Code Playgroud)

apk android-studio react-native

2
推荐指数
2
解决办法
2478
查看次数