2
デバッグマニフェストにエラーが発生しました。 AAPT2を無効にすることで回避策を見つけることができましたが、問題の根本に迫っています。エラーに加えて、 "ここでは許可されていない"と "登録されていないURI"というさまざまな属性があります(すべてがデバッグマニフェストにのみあります)。debug/AndroidManifestのエラー
デバッグ/ AndroidManifest.xmlを
<?xml version="1.0" encoding="utf-8"?>
<!-- suppress ALL -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.sam.duluthbikes"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="20"
android:targetSdkVersion="25" />
<!--
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.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera2"
android:required="false" />
<meta-data
android:name="android.support.VERSION"
android:value="25.3.0" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:allowBackup="true"
android:debuggable="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<!--
The API key for Google Maps-based APIs is defined as a string resource.
(See the file "res/values/google_maps_api.xml").
Note that the API key is linked to the encryption key used to sign the APK.
You need a different API key for each encryption key, including the release key that is used to
sign the APK for publishing.
You can define the keys for the debug and release targets in src/debug/ and src/release/.
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
<activity
android:name="com.example.sam.duluthbikes.MenuActivity"
android:label="@string/title_activity_maps" >
</activity>
<activity android:name="com.example.sam.duluthbikes.MainActivity" />
<fragment android:name=".AboutFragment" />
<fragment android:name=".DiscountFragment" />
<fragment android:name=".EventsFragment" />
<fragment android:name=".ReportFragment" />
<fragment android:name=".ToursFragment" />
<fragment android:name=".RideHistoryFragment" />
<activity android:name="com.example.sam.duluthbikes.EndRideActivity" />
<activity
android:name="com.example.sam.duluthbikes.LoginActivity"
android:label="@string/title_activity_maps" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:exported="false"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
</manifest>
メイン/ AndroidManifest.xmlを
<?xml version="1.0" encoding="utf-8"?>
<!--suppress ALL -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.sam.duluthbikes">
<!--
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.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera2" android:required="false" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<!--
The API key for Google Maps-based APIs is defined as a string resource.
(See the file "res/values/google_maps_api.xml").
Note that the API key is linked to the encryption key used to sign the APK.
You need a different API key for each encryption key, including the release key that is used to
sign the APK for publishing.
You can define the keys for the debug and release targets in src/debug/ and src/release/.
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
<activity
android:name=".MenuActivity"
android:label="@string/title_activity_maps">
</activity>
<activity android:name=".MainActivity" />
<fragment android:name=".AboutFragment" />
<fragment android:name=".DiscountFragment" />
<fragment android:name=".EventsFragment" />
<fragment android:name=".ReportFragment" />
<fragment android:name=".ToursFragment" />
<fragment android:name=".RideHistoryFragment" />
<activity android:name=".EndRideActivity" />
<activity
android:name=".LoginActivity"
android:label="@string/title_activity_maps">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
エラー
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:compileDebugAndroidTestSources, :app:compileDebugUnitTestSources, :app:compileDebugSources]
C:\Users\barda\Desktop\College\Fall2017\SoftwareEngineering\GroupBikes\duluthBikes-master\duluthBikes-master\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml
Error:(72) error: unknown element <fragment> found.
Error:(73) error: unknown element <fragment> found.
Error:(74) error: unknown element <fragment> found.
Error:(75) error: unknown element <fragment> found.
Error:(76) error: unknown element <fragment> found.
Error:(77) error: unknown element <fragment> found.
Error:(72) unknown element <fragment> found.
Error:(73) unknown element <fragment> found.
Error:(74) unknown element <fragment> found.
Error:(75) unknown element <fragment> found.
Error:(76) unknown element <fragment> found.
Error:(77) unknown element <fragment> found.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt
Information:BUILD FAILED in 1s
Information:16 errors
Information:0 warnings
Information:See complete output in console
simによって解決されました断片要素を除去する。 – David