我在支付网关项目中遇到了麻烦。根据EBS指南,我将模块导入到我的项目中并进行编译。但是在构建时,它给出了错误提示:`Error:Execution failed for task ':app:processDebugManifest'。
合并清单文件失败:AndroidManifest.xml中来自应用程序@icon属性的值(@mipmap/ic_launcher):14:9-43也存在于[VisionFresh:EBS_Live:unspecified] AndroidManifest.xml:22:9-45的值为(@drawable/ic_launcher)。 建议:在AndroidManifest.xml:12:5-187:19的<application>元素中添加“tools:replace =”android:icon“”以覆盖它。
这是我的build.gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "visionfresh.android.catalyst.com.visionfresh"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile files('libs/commons-net-3.0.1.jar')
compile 'com.android.support:design:23.1.1'
compile files('libs/fluent-hc-4.5.jar')
compile files('libs/httpclient-4.5.jar')
compile files('libs/httpclient-cache-4.5.jar')
compile files('libs/httpclient-win-4.5.jar')
compile files('libs/httpcore-4.4.1.jar')
compile files('libs/httpmime-4.5.jar')
compile files('libs/jna-4.1.0.jar')
compile files('libs/jna-platform-4.1.0.jar')
compile 'com.daimajia.slider:library:1.1.5@aar'
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.nineoldandroids:library:2.4.0'
compile files('libs/commons-net-3.0.1.jar')
compile 'com.squareup.picasso:picasso:2.5.2'
compile project(':EBS_Live')
}
这是我的主要Manifest.xml文件:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="visionfresh.android.catalyst.com.visionfresh">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".SplashScreen"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity">
<!-- <intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter> -->
</activity>
<activity
android:name=".ShopByCategory"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".LoginActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".SignUp"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".TrackListActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".SingleTrackActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".ProductsCategory"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".FilterClass"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".SearchActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".ForgetPassword"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".ProductsDetails"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".Description"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".AboutThisItem"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".TouchOnImage"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".MyAccount"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".WishList"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".ZoomLevel"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".ChangePassword"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".AccountInformation"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".MyAddress"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".Legal"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".InnnerInformation"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".Review"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".Discount_Offer_View_All"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".AnyOtherQuery"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".FullScreenViewActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".CheckOut"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".SubCategory"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".ItemDetails"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".MyOrder"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".OrderDetail"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".ReturnProducts"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".BuyProduct"
android:screenOrientation="portrait">
</activity>
<receiver android:name=".BuyProduct" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.LAUNCHER" />
<data android:scheme="receiver" />
</intent-filter>
</receiver>
<activity
android:name=".PaymentSuccessActivity"
android:label="@string/title_activity_payment_success"
android:screenOrientation="portrait" >
<intent-filter>
<data
android:host="@string/hostname"
android:scheme="com.merchantapp.testkit" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
</application>
</manifest>
这里是 EBS Manifest.xml 文件:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.ebs.android.sdk"
android:versionCode="2"
android:versionName="2.4" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="23" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<android:uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<android:uses-permission android:name="android.permission.READ_PHONE_STATE" />
<android:uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
tools:replace="icon,label,theme"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name=".PaymentDetails"
android:label="@string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".PaymentDetailActivity"
android:label="@string/title_activity_payment_detail"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".PaymentActivity"
android:label="@string/title_activity_payment"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize" >
</activity>
<activity
android:name=".WebViewActivity"
android:label="@string/title_activity_webview"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize" >
</activity>
<activity
android:name=".EBSHomeConfigurableActivity"
android:label="@string/title_activity_test__transaction_details"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".PaymentFailureActivity"
android:label="@string/title_activity_payment_failure" >
</activity>
<activity
android:name=".IdleTimeOut"
android:label="@string/title_activity_idle_time_out" >
</activity>
</application>
</manifest>
这是我的第一个项目,请帮助我。提前感谢!
java.lang.RuntimeException: Unable to start activity ComponentInfo{visionfresh.android.catalyst.com.visionfresh/visionfresh.android.catalyst.com.visionfresh.SplashScreen}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
- user5599808