我正在研究一個圖像過濾器應用程序,在這我必須應用一些過濾器,如鉛筆素描,裁剪等,我使用的是android的空間庫,但當我打電話給startActivityForResult()關。下面是logcats:Android Aviary庫錯誤
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);
這裏是清單的內容(舍庫)
<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>
請發佈佈局xml爲FeatherActivity。 –
你解決了嗎?剛剛得到相同的錯誤... – sirvon
@sirvon我已經下載這個示例https://github.com/sephiroth74/Aviary-Android-Sample-App並使用本示例中使用的sdk,它的工作原理 –