【发布时间】:2016-08-01 14:35:20
【问题描述】:
我的 activity_main.xml 有这个代码:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:id="@+id/container"
android:layout_width="match_parent" android:layout_height="match_parent"
tools:context=".MainActivity" tools:ignore="MergeRootFrame" />
行 tools:context 给了我它无法解析符号 MainAcitvity 的错误。
谁能帮我解决这个问题?
【问题讨论】:
-
是任何包内的 MainActivity
-
com.example.android.sunshine.app下是的;
-
尝试像这样使用它:
tools:context="com.example.android.sunshine.app.MainActivity" -
然后给出MainActiviy活动的完整路径
-
试过了还是一样的错误