我正在尝试构建签名的APK,这不是我第一次在同一项目中执行此操作,但这一次它显示以下警告。 而且我无法构建APK。
Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation'.
API 'variant.getAssemble()' is obsolete and has been replaced with 'variant.getAssembleProvider()'.
API 'variantOutput.getProcessResources()' is obsolete and has been replaced with 'variantOutput.getProcessResourcesProvider()'.
API 'variantOutput.getProcessManifest()' is obsolete and has been replaced with 'variantOutput.getProcessManifestProvider()'.
API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'.
API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.
API 'variant.getPackageApplication()' is obsolete and has been replaced with 'variant.getPackageApplicationProvider()'.
API 'variant.getExternalNativeBuildTasks()' is obsolete and has been replaced with 'variant.getExternalNativeBuildProviders()'.
com.google.firebase.database.util.JsonMapper: can't find referenced method 'org.json.JSONStringer object()' in program class org.json.JSONStringer
com.google.firebase.database.util.JsonMapper: can't find referenced method 'org.json.JSONStringer key(java.lang.String)' in program class org.json.JSONStringer
com.google.firebase.database.util.JsonMapper: can't find referenced method 'org.json.JSONStringer endObject()' in program class org.json.JSONStringer
com.google.firebase.database.util.JsonMapper: can't find referenced method 'org.json.JSONStringer array()' in program class org.json.JSONStringer
com.google.firebase.database.util.JsonMapper: can't find referenced method 'org.json.JSONStringer endArray()' in program class org.json.JSONStringer
com.google.firebase.database.util.JsonMapper: can't find referenced method 'org.json.JSONStringer value(java.lang.Object)' in program class org.json.JSONStringer
there were 6 unresolved references to program class members.
Exception while processing task java.io.IOException: Please correct the above warnings first.
答案 0 :(得分:0)
上面的跟踪中没有太多信息。
您可以使用 ./ gradlew assembleRelease --stacktrace --info --debug 。
这将为您提供有关实际问题所在的更多信息。
也尝试使用 ./ gradlew clean
进行干净的构建