我从android studio 2.2升级到3.1.2,我的旧文件显示错误。我不知道如何解决这个问题
错误
错误:找到未知元素
的manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:name=".SplashTimer"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".SplashScreenActivity"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".HomeActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.NoActionBar" />
<activity android:name=".VerificationActivity">
<activity android:name=".MainActivity"
android:screenOrientation="portrait" />
</activity>
<activity android:name=".DashboardActivity"
android:screenOrientation="portrait"/>
<activity
android:name=".LoginActivity"
android:theme="@style/Theme.AppCompat.NoActionBar"
android:screenOrientation="portrait"/>
<activity android:name=".ProblemsActivity"
android:screenOrientation="portrait"/>
<activity
android:name=".TotalActivity"
android:theme="@style/Theme.AppCompat.NoActionBar"
android:screenOrientation="portrait"/>
<activity android:name=".FirstPayment"
android:screenOrientation="portrait"/>
<activity android:name=".FirstPaymentInformation"
android:screenOrientation="portrait"/>
<activity android:name=".DeclineQuestionsActivity"
android:screenOrientation="portrait"/>
<activity android:name=".LIkelyProblemsActivity"
android:screenOrientation="portrait"/>
<activity
android:name=".TotalAmountActivity"
android:theme="@style/Theme.AppCompat.NoActionBar"
android:screenOrientation="portrait"/>
<activity android:name=".ThanksActivity"
android:screenOrientation="portrait"/>
<activity
android:name=".SignUpActivity"
android:theme="@style/SignUpTheme"
android:screenOrientation="portrait"/>
<activity android:name=".StripePayment" />
<activity
android:name=".PaymentActivity"
android:label="@string/title_activity_payment"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />
<activity android:name=".LocationActivity" />
<activity android:name=".SecondPayment" />
<activity android:name=".DriverPayment"
android:screenOrientation="portrait"></activity><!-- ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information. -->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
这是我的清单,我检查了清单,但我不知道错误是什么。我已经尝试检查清单是否与android studio 3.1.2不兼容
答案 0 :(得分:3)
您在
上缺少结束标记<activity android:name=".VerificationActivity">
在之前的版本中,错误放置的标签被忽略或仅生成警告。由于默认情况下启用了Gradle 3.0.0 AAPT2的Android插件。文件可在: https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration