首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Android Aviary库错误

Android Aviary库错误
EN

Stack Overflow用户
提问于 2013-10-22 16:28:26
回答 1查看 1.6K关注 0票数 1

我在一个图像过滤器应用程序上工作,在这个应用程序中,我必须应用一些过滤器,如铅笔草图,裁剪等,我正在使用安卓的鸟类库,但当我调用startActivityForResult()应用程序获得强制关闭。这里是logcat:

11-23 13:31:03.290: E/AndroidRuntime(4367): FATAL EXCEPTION: main

11-23 13:31:03.290: E/AndroidRuntime(4367): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jai.imagedemo/com.aviary.android.feather.FeatherActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class android.widget.RelativeLayout

对解决这个问题有什么帮助吗?下面是我的代码:

代码语言:javascript
复制
Intent newIntent = new Intent( this, FeatherActivity.class );
        newIntent.setData(Uri.parse(imageFilePath));

        newIntent.putExtra( Constants.EXTRA_OUTPUT_FORMAT, Bitmap.CompressFormat.JPEG.name() );
        String mSessionId = StringUtils.getSha256( System.currentTimeMillis() + "pv1frfq8o76siqy" );

        newIntent.putExtra( Constants.EXTRA_OUTPUT_HIRES_SESSION_ID, mSessionId );
        newIntent.putExtra( Constants.EXTRA_IN_SAVE_ON_NO_CHANGES, true );

        startActivityForResult( newIntent, 2 );

这是Manifest的内容(适用于鸟类图书馆)

代码语言:javascript
复制
 <activity
            android:name="com.aviary.android.feather.FeatherActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:hardwareAccelerated="true"
            android:largeHeap="true"
            android:process=":standalone"
            android:screenOrientation="unspecified" />
       <provider
            android:name="com.aviary.android.feather.library.providers.FeatherContentProvider"
            android:authorities="com.aviary.launcher.HiResProvider"
            android:exported="false" >
        </provider> 
EN

回答 1

Stack Overflow用户

发布于 2015-07-08 21:37:46

我得到了你答案的答案。只需在清单中添加这一行:-

代码语言:javascript
复制
android:theme="@style/AviaryTheme"

就像这样:

代码语言:javascript
复制
  <activity
        android:name="com.aviary.android.feather.FeatherActivity"
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:finishOnTaskLaunch="true"
        android:hardwareAccelerated="true"
        android:process=":standalone"
        android:screenOrientation="unspecified"
        android:uiOptions="splitActionBarWhenNarrow" 
        android:theme="@style/AviaryTheme"/>

它将解决二进制膨胀问题。您必须添加鸟类主题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19512734

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档