Android Aviary Library错误

时间:2013-10-22 08:28:26

标签: android aviary

我正在研究一个图像过滤器应用程序,在这里我必须应用一些过滤器,如铅笔素描,裁剪等,因为我使用aviary库为android但当我调用startActivityForResult()应用程序得到强制关闭。这是logcats:

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

解决此问题的任何帮助? 这是我的代码:

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(鸟舍图书馆)的内容

 <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> 

1 个答案:

答案 0 :(得分:0)

得到你的答案的解决方案。只需在清单中添加以下行: -

android:theme="@style/AviaryTheme"

就像那样: -

  <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"/>

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