gpt4 book ai didi

android.view.InflateException 错误膨胀类

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:06:17 25 4
gpt4 key购买 nike

我在实现Jake Wharton's ViewPagerIndicator的时候发现了一些问题.这些是 Logcat 上的内容:

06-19 15:32:02.661: E/AndroidRuntime(692): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.aprian.learn/com.aprian.learn.VPIndicator}: android.view.InflateException: Binary XML file line #7: Error inflating class com.viewpagerindicator.TitlePageIndicator

我已经把viewpagerindicator库放到build路径下了,但是还是启动不了app。

最佳答案

您需要根据 Referencing Library Projects 添加 ViewPagerIndicator 作为 Libarary 项目.将它用作 .jar 文件是行不通的。

基本步骤是:将 ViewPagerIndicator 添加为现有源中的新项目并

To add a reference to a library project, follow these steps:

  1. In the Package Explorer, right-click the dependent project and select Properties.
  2. In the Properties window, select the "Android" properties group at left and locate the Library properties at right.
  3. Click Add to open the Project Selection dialog.
  4. From the list of available library projects, select a project and click OK.
  5. When the dialog closes, click Apply in the Properties window.
  6. Click OK to close the Properties window.

如果这不起作用,请尝试项目 -> 清理。

编辑:另请参阅 Jake Wharton 的回答:Answer

关于android.view.InflateException 错误膨胀类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11097408/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com