AAPT2 error: check logs for details AppThene
AAPT2 error: check logs for details AppThene
我遇到 AAPT2 错误,这是由于 Android Studio 升级所致。
经过大量的互联网搜索,我认为它一定是 Android 清单中的 xml 的东西。我尝试了不同的东西,改变了结构,但还没有成功。有使用 AndroidManifest.xml 和 AAPT2 的经验吗?这是我的
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ch.workouttracker"
android:versionCode="1"
android:versionName="1.0" >
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but you must specify either coarse or fine
location permissions for the 'MyLocation' functionality.
-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="AppTheme">
<activity android:name=".TrackActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ProfileActivity"
android:label="@string/title_activity_profile" >
</activity>
<activity
android:name=".TrackCardioActivity"
android:label="@string/title_activity_track_cardio">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
</activity>
<activity
android:name=".TrackWorkoutActivity"
android:label="@string/title_activity_track_workout" >
</activity>
<activity
android:name=".LogoutActivity"
android:label="@string/title_activity_logout">
</activity>
<activity
android:name=".SettingsActivity"
android:label="@string/title_activity_settings" >
</activity>
<activity
android:name=".DashbordActivity"
android:label="@string/title_activity_dashboard" >
</activity>
<activity
android:name=".CreatePlanActivity"
android:label="@string/title_activity_create_plan" >
</activity>
<activity
android:name=".CreateExerciseActivity"
android:label="@string/title_activity_create_exercise" >
</activity>
<activity
android:name=".EditActivity"
android:label="@string/title_activity_edit" >
</activity>
<activity
android:name=".LoginActivity"
android:label="@string/title_activity_login" >
</activity>
<activity
android:name=".WorkoutDetailActivity"
android:label="@string/title_activity_workout_detail" >
</activity>
<activity
android:name=".PlanDetailActivity"
android:label="@string/title_activity_plan_detail" >
</activity>
<activity android:name=".CalendarActivity" >
</activity>
<activity android:name=".EditExerciseActivity">
</activity>
</application>
</manifest>
我找不到问题。也许你可以。
试试 @style/Apptheme
而不是 Apptheme
.
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
我遇到 AAPT2 错误,这是由于 Android Studio 升级所致。
经过大量的互联网搜索,我认为它一定是 Android 清单中的 xml 的东西。我尝试了不同的东西,改变了结构,但还没有成功。有使用 AndroidManifest.xml 和 AAPT2 的经验吗?这是我的
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ch.workouttracker"
android:versionCode="1"
android:versionName="1.0" >
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but you must specify either coarse or fine
location permissions for the 'MyLocation' functionality.
-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="AppTheme">
<activity android:name=".TrackActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ProfileActivity"
android:label="@string/title_activity_profile" >
</activity>
<activity
android:name=".TrackCardioActivity"
android:label="@string/title_activity_track_cardio">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
</activity>
<activity
android:name=".TrackWorkoutActivity"
android:label="@string/title_activity_track_workout" >
</activity>
<activity
android:name=".LogoutActivity"
android:label="@string/title_activity_logout">
</activity>
<activity
android:name=".SettingsActivity"
android:label="@string/title_activity_settings" >
</activity>
<activity
android:name=".DashbordActivity"
android:label="@string/title_activity_dashboard" >
</activity>
<activity
android:name=".CreatePlanActivity"
android:label="@string/title_activity_create_plan" >
</activity>
<activity
android:name=".CreateExerciseActivity"
android:label="@string/title_activity_create_exercise" >
</activity>
<activity
android:name=".EditActivity"
android:label="@string/title_activity_edit" >
</activity>
<activity
android:name=".LoginActivity"
android:label="@string/title_activity_login" >
</activity>
<activity
android:name=".WorkoutDetailActivity"
android:label="@string/title_activity_workout_detail" >
</activity>
<activity
android:name=".PlanDetailActivity"
android:label="@string/title_activity_plan_detail" >
</activity>
<activity android:name=".CalendarActivity" >
</activity>
<activity android:name=".EditExerciseActivity">
</activity>
</application>
</manifest>
我找不到问题。也许你可以。
试试 @style/Apptheme
而不是 Apptheme
.
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">