I get the Error
Unable to start activity ComponentInfo{de.androidbuch.activiti/de.androidbuch.activiti.task.Activity}: android.view.InflateException: Binar
Had the same error type, where exactly the same error message in logcat was displayed. I needed to make changes in the Java Build Path located under Project->Properties
. I had included Google Maps related libraries like android-support-v4.jar
and google-play-services.jar
; however I was missing including these on the 'Build class path'
in the 'Order and Export'
option menu. Maybe the error lies here.
Try including libraries to the build class path.
The order of which the classes are built might also trigger the error, so my advice is also to try to rearrange the order of the building path. The error disappeared when I used the following order: 'my_project_name/src'->'my_project_name/gen'->'Android Private Libraries'
. The last unit contains the jar files mentioned earlier.
In your xml file just use a instead of the tag. The inflater tries to create an android.app.Fragment from which will fail on API < 10. So you need to create a view group of a different type.
Make sure there is no exception raised in the onCreateView method of the fragment. If any exception is raised in this method, logcat won't show exact details of the exception, instead it always shows the message:
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.fragment"
on path: DexPathList[[zip file "/data/app/com.package/base.apk"],
nativeLibraryDirectories=[/data/app/com.package/lib/arm64, /vendor/lib64, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
Make sure your Activity
extends FragmentActivity
.
If you want to inherit the AppCompatActivity, then you can do something like this- In the activity xml, use a FrameLayout like this-
<FrameLayout
android:id="@+id/result_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/progress_frame"/>
and in the activity onCreate
-
final FragmentManager supportFragmentManager = getSupportFragmentManager();
FragmentTransaction ft = supportFragmentManager.beginTransaction();
ft.replace(R.id.result_fragment, fphResultActivityFragment, "result fragment");
ft.commitAllowingStateLoss();
Just had this same error. The reason for mine was the visibility of my fragment class. It was set to default, should be public.