1

よろしくお願いします。

Android用の新しいビルドシステム(gradle)を使用しています。Eclipse からビルドすると、アプリは正しく機能します。ただし、gradle からのビルドを使用する場合、参照されるライブラリに問題があります。

ライブラリの最初のアクティビティを起動すると、正常に動作します。ただし、その「読み込み」アクティビティが完了すると、次のアクティビティを開始しようとするとアプリがクラッシュします。

logcat には次のように表示されます。

RuntimeException: Unable to start activity ComponentInfo____________ android.view.InflateException: Binary XML file line #14: Error inflating class__________

...

原因: java.lang.ClassNotFoundException

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    tools:context=".Player" >

    <FrameLayout
        android:id="@+id/id"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:visibility="gone" >

        <com.my.class.name
            android:id="@+id/id2"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" />
    </FrameLayout>
4

0 に答える 0