Jaskaye17
Jaskaye17

Reputation: 637

What is the cause of BRANCH SDK: Invalid "android-prefix" in <branch-config> in your config.xml error?

I have recently incorporated branch's branch-cordova-sdk into my application. Now when I use ionic package to build my .apk file, ionic package fails with the following error:

BRANCH SDK: Invalid "android-prefix" in <branch-config> in your config.xml.

My Config.xml file uses the required options according to the docs and is as follows:

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.test.project" version="0.0.1">

    <plugin name="branch-cordova-sdk" spec="^2.5.17" />
    <branch-config>
        <branch-key value="key_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
        <uri-scheme value="testApp" />
        <link-domain value="com.test.project" />
    </branch-config>

</widget>

I have also tried adding the option android prefix with a dummy value like this: without any success.

It is not clear to me what is going wrong here, any help would be appreciated.

I am using the following:

Upvotes: 1

Views: 606

Answers (1)

maninak
maninak

Reputation: 2726

Please copy paste this single command in your terminal and see if it helps:

cordova plugin remove io.branch.sdk && \
cordova plugin remove branch-cordova-sdk && \
cordova platform remove android && \
cordova platform add android && \
cordova build android

Source

Upvotes: 2

Related Questions