Я искал много связанных вопросов, но до сих пор не знаю, как это решить. Прежде чем я удалил проект google_play_service_lib, Everthing прекрасно, НО после того, как я удалил его, и импортировать его снова, ошибка только что произошло ...Ошибка раздувания фрагмента класса после удаления и импорта проекта google-play-service_lib
Вот коды:
about_frag.XML
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:scrollbars="vertical" >
<fragment
android:id="@+id/location_map"
android:layout_width="300dp"
android:layout_height="300dp"
class="com.google.android.gms.maps.SupportMapFragment" />
</RelativeLayout>
AboutFragment.java
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.about_frag, container, false);
sc = (ScrollView) view.findViewById(R.id.scrollView1);
sc.setOnTouchListener(null);
TextView tv = (TextView) view.findViewById(R.id.about_text);
tv.setText(R.string.esoft_about);
MainFragmentActivity.instance().fixedTextSize(tv);
return view;
}
журнал ошибок
12-19 15:55:09.562: E/AndroidRuntime(7013): FATAL EXCEPTION: main
12-19 15:55:09.562: E/AndroidRuntime(7013): Process: mypackage, PID: 7013
12-19 15:55:09.562: E/AndroidRuntime(7013): android.view.InflateException: Binary XML file line #48: Error inflating class fragment
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
12-19 15:55:09.562: E/AndroidRuntime(7013): at esoft.com.edm.AboutFragment.onCreateView(AboutFragment.java:33)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:871)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1083)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:635)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1431)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java: 431)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:141)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.support.v4.view.ViewPager.populate(ViewPager.java:895)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.support.v4.view.ViewPager.populate(ViewPager.java:772)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1234)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.View.measure(View.java:16497)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.View.measure(View.java:16497)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.View.measure(View.java:16497)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:719)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:455)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.View.measure(View.java:16497)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.View.measure(View.java:16497)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.View.measure(View.java:16497)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
12-19 15:55:09.562: E/AndroidRuntime(7013): at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2291)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.View.measure(View.java:16497)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1916)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1113)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1295)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5670)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.Choreographer.doCallbacks(Choreographer.java:574)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.Choreographer.doFrame(Choreographer.java:544)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.os.Handler.handleCallback(Handler.java:733)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.os.Handler.dispatchMessage(Handler.java:95)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.os.Looper.loop(Looper.java:136)
12-19 15:55:09.562: E/AndroidRuntime(7013): at android.app.ActivityThread.main(ActivityThread.java:5017)
12-19 15:55:09.562: E/AndroidRuntime(7013): at java.lang.reflect.Method.invokeNative(Native Method)
12-19 15:55:09.562: E/AndroidRuntime(7013): at java.lang.refle
BTW, когда я удалить фрагмент из XML, работа программы совершенно ... надежды не старый вопрос ...
где вы R.id.scrollView1 и R.id.about_text, в каком макете? – Hardik
Дорогой, извините за отсутствие некоторых слов, сначала я включил google-play-service_lib определенно, и он отлично работает, но после того, как я удалю его и импортирую как lib, ошибка вышла ... –
Итак, я говоря, что он правильно импортирован как зеленый знак? – Piyush