当我尝试生成应用APK时,我遇到以下错误。
错误:任务':app:transformClassesWithJarMergingForRelease'执行失败。 com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com / google / thirdparty / publicsuffix / PublicSuffixPatterns.class
在我添加之后出现:" multiDexEnabled true" 到我的gradle文件。但这是必要的。
任何人都可以帮助我?
gradle文件包含:
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
lintOptions{
checkReleaseBuilds false
}
defaultConfig {
applicationId "pl.nowakprojects.socialmafia"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "0.1"
multiDexEnabled true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildTypes.each {
it.buildConfigField 'boolean', 'PREMIUM_VERSION', PremiumVersionBoolean
}
}
ext {
JUNIT_VERSION = '4.12'
DAGGER_VERSION = '2.4'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'org.parceler:parceler:1.1.5'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.android.support:recyclerview-v7:25.1.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'org.parceler:parceler-api:1.1.5' //Parceler - przenoszenie obiektow miedzy Activity
compile 'com.jakewharton:butterknife:8.4.0' //ButterKnife
compile 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'com.afollestad.material-dialogs:core:0.9.0.2'
compile 'org.greenrobot:eventbus:3.0.0' //EventBus
compile 'me.tankery.lib:circularSeekBar:1.1.3' //SeekBar
// compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
//compile 'com.android.support.constraint:constraint-layout:1.0.0-beta3'
compile 'com.annimon:stream:1.1.4'
//compile "com.google.auto.value:auto-value:1.2"
}
答案 0 :(得分:-1)
此问题是由<Content keyboardShouldPersistTaps='always' keyboardDismissMode='on-drag'>
<List>
<ListItem style={styles.inspectionsItemDivider} itemDivider>
<TextInput
autoFocus={true}
ref={(input) => { this.titleSearch = input }}
placeholder='Start typing...'
multiline={true}
onChangeText={this.setSearchText.bind(this)}
value={this.getSearchValue()}/>
</ListItem>
<View style={styles.searchContainer}>
<Text style={styles.recentText}>Recommended Descriptions</Text>
<List dataArray={this.state.searchedDescriptions}
renderRow={(description) =>
<ListItem button onPress={() => this.setInformationDescription(description)}>
<Text>{description}</Text>
</ListItem>
</List>
</View>
</List>
</Content>
gradle引起的。
只需删除
myTextView.setTextColor(R.color.my_favorite_color);
即可 会工作的。
不知道这个问题的根本原因。