harshu harshu - 4 months ago 38
Android Question

Error in parsing "g/"

When i am trying to add this library https://github.com/michaldrabik/TapBarMenu into my project i am watching error.i am pasting my error here ,

Error in parsing "g/"


And another file is coming in editor which is giving these code,

<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:width="48dp"
android:height="48dp"
android:viewportWidth="24"
android:viewportHeight="24"

app:vc_viewportWidth="24"
app:vc_viewportHeight="24" >
<group
android:name="rotationGroup"
android:pivotX="12.0"
android:pivotY="12.0"
android:rotation="90">

<path
android:name="v"
android:fillColor="#000000"
android:pathData="@string/path_stop"

app:vc_fillColor="#000000"
app:vc_pathData="@string/path_stop"/>
</group>
</vector>
<!-- From: file:/Users/wnafee/code/vector-compat/library/src/main/res/drawable/ic_stop_vector.xml -->

Answer

i had also seen these error previously and it solved by changing some line of code ,

If you have gradle <= 1.5 then just add these in your build.gradle file ,

 defaultConfig {
        generatedDensities = []
    }

    aaptOptions {
        additionalParameters "--no-version-vectors"
    }

If you are having build gradle version >2.0 you must use these file

defaultConfig {
    vectorDrawables.useSupportLibrary = true
}

i hope it will solve error, if any issue you face please comment