• 9
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

API 'variantOutput.getProcessManifest()' is obsolete

I am trying to change version code, version name and app icon. Below is my code

    variant.outputs.all { output ->
        def newApkName
        if (output.zipAlign) {
            newApkName = "Application.apk"
        }

        output.processManifest.doLast{
            // Stores the path to the maifest.
            String manifestPath = "$manifestOutputDirectory/AndroidManifest.xml"
            // Stores the contents of the manifest.
            def manifestContent = file(manifestPath).getText()
            // Changes the version code in the stored text.
            manifestContent = manifestContent.replace('android:versionName="dev_build"',
                    String.format('android:versionName="%s"', variant.versionName))
            // Overwrites the manifest with the new text.
            file(manifestPath).write(manifestContent)
        }

        output.processManifest.doLast{
            // Stores the path to the maifest.
            String manifestPath = "$manifestOutputDirectory/AndroidManifest.xml"
            // Stores the contents of the manifest.
            def manifestContent = file(manifestPath).getText()
            // Changes the version code in the stored text.
            manifestContent = manifestContent.replace('android:icon="@drawable/app_icon_main"',
                    String.format('android:icon="@drawable/%s"', getVersionIconName()))
            // Overwrites the manifest with the new text.
            file(manifestPath).write(manifestContent)
        }

        outputFileName = "Application.apk"
    }

Getting bellow warning: WARNING: API 'variantOutput.getProcessManifest()' is obsolete and has been replaced with 'variantOutput.getProcessManifestProvider()'. It will be removed at the end of 2019. For more information, see https://d.android.com/r/tools/task-configuration-avoidance. To determine what is calling variantOutput.getProcessManifest(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace. Affected Modules: Application

Environment Details: Android Studio : 3.3.1 Gradle Version: 4.10.0 Build Tool Version 28.0.2

    • I already tried after changing method name and getting below error. ERROR: Could not get unknown property 'ProcessManifestProvider' for ApkVariantOutputImpl_Decorated{apkData=Main{type=MAIN, fullName=devDebug, filters=[], versionCode=1000, versionName=dev_build}} of type com.android.build.gradle.internal.api.ApkVariantOutputImpl.