jamesmontemagno / vsts-mobile-tasks

VSTS Tasks for Mobile!
MIT License
79 stars 22 forks source link

[Android] Azure DevOps message: ##[error]unable to find the matched key. #25

Closed PiotrWachulec closed 4 years ago

PiotrWachulec commented 4 years ago

Hi @jamesmontemagno :),

I'm trying to use the Bump Android Versions task, but I'm getting an error: ##[error]unable to find the matched key.

My AndroidManifest.xml looks like below:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" package="com.***" android:versionCode="1">
    <uses-sdk android:minSdkVersion="24" android:targetSdkVersion="28" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <application android:label="***.Android">
        <provider android:name="android.support.v4.content.FileProvider" android:authorities="com.***.fileprovider" android:exported="false" android:grantUriPermissions="true">
            <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"></meta-data>
        </provider>
        <activity android:name="microsoft.identity.client.BrowserTabActivity">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
            </intent-filter>
        </activity>
    </application>
</manifest>

My configuration looks like below: Screenshot 2019-10-10 at 09 48 02

And my task finished like below: Screenshot 2019-10-10 at 09 55 34

Is there any my mistake or bad config?

Thanks in advance for your help!

jamesmontemagno commented 4 years ago

Yes, you need to add android:versionName This is a required attribute.

<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.Media.Plugin.Sample">
PiotrWachulec commented 4 years ago

Works, thanks a lot!