如何在AAR文件中的自定义视图xml文件中更改自定义视图包名称

时间:2016-04-08 05:26:39

标签: android android-studio gradle aar

我有一个包含drawable,layout和java文件的aar文件。包含自定义视图及其类名的xml文件之一是按旧项目。所以当我在我的新项目中使用时,我得到的错误(我在下面显示)

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.techreco.arcmenu.lib.AnimatedPathViewGroup" on path: DexPathList[[zip file "/data/app/com.example.pc28.arcmultiple-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.pc28.arcmultiple-2, /system/lib]]

Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class com.techreco.arcmenu.lib.AnimatedPathViewGroup

所以我该如何解决这个问题?

我当前的项目包名称:com.example.pc28.arcmultiple 和AAR文件中的自定义视图及其无法访问的包名称。该自定义视图是

<merge xmlns:android="http://schemas.android.com/apk/res/android" >

<com.techreco.arcmenu.lib.AnimatedPathViewGroup
    android:id="@+id/animated_path"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_centerInParent="true"
    />

<com.techreco.arcmenu.lib.ArcLayout
    android:id="@+id/item_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_centerInParent="true"
     /> </merge>

0 个答案:

没有答案