- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
更新后,我已将我的 AndroidStudio 从 2.2.3 更新到 2.3,我的项目开始出现一些构建冲突:所有 com.android.support 库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃)。找到版本 25.2.0、25.0.2
应用程序模块 build.gradle
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
def AAVersion = '4.2.0'
apply plugin: 'io.fabric'
apt {
arguments {
androidManifestFile variant.outputs[0]?.processResources?.manifestFile
}
}
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
// The Fabric Gradle plugin uses an open ended version to react
// quickly to Android tooling updates
classpath 'io.fabric.tools:gradle:1.+'
}
}
repositories {
maven {
url "https://jitpack.io"
}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url 'https://zendesk.artifactoryonline.com/zendesk/repo'
}
maven {
url 'https://maven.fabric.io/public'
}
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "amaro.amaroandroid"
minSdkVersion 21
targetSdkVersion 25
renderscriptTargetApi 25
renderscriptSupportModeEnabled true
versionCode 6
versionName "1.01"
//Instrumentation Test Runner
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// Enabling multidex support.
multiDexEnabled true
manifestPlaceholders = [manifestApplicationId : "${applicationId}",
onesignal_app_id : "32551ffc-b35d-482f-81c7-2c4206811814",
onesignal_google_project_number: "867653264688"]
vectorDrawables.useSupportLibrary = true
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
preDexLibraries = false
javaMaxHeapSize "2g"
}
}
afterEvaluate {
tasks.matching {
it.name.startsWith('dex')
}.each { dx ->
if (dx.additionalParameters == null) {
dx.additionalParameters = []
}
dx.additionalParameters += '--multi-dex'
dx.additionalParameters += "--main-dex-list=$projectDir/multidex.keep".toString()
}
}
allprojects {
repositories {
mavenCentral()
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':api')
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
compile group: 'com.zopim.android', name: 'sdk', version: '1.3.2.1'
// Required for geotagging
compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
transitive = true;
}
compile 'com.google.maps.android:android-maps-utils:0.4.+'
compile 'com.android.support:recyclerview-v7:25.2.0'
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
compile 'org.jsoup:jsoup:1.10.2'
compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.5'
compile 'com.mikepenz:iconics-core:2.6.6@aar'
compile 'com.mikepenz:google-material-typeface:2.2.0.1.original@aar'
compile 'com.mikepenz:material-design-iconic-typeface:2.2.0.1@aar'
compile 'com.mikepenz:fontawesome-typeface:4.6.0.1@aar'
compile 'com.mikepenz:octicons-typeface:3.2.0.1@aar'
compile 'com.mikepenz:meteocons-typeface:1.1.0.1@aar'
compile 'com.mikepenz:community-material-typeface:1.5.54.1@aar'
compile 'com.mikepenz:weather-icons-typeface:2.0.10.1@aar'
compile 'com.mikepenz:typeicons-typeface:2.0.7.1@aar'
compile 'com.mikepenz:entypo-typeface:1.0.0.1@aar'
compile 'com.mikepenz:devicon-typeface:2.0.0.1@aar'
compile 'com.mikepenz:foundation-icons-typeface:3.0.0.1@aar'
compile 'com.mikepenz:ionicons-typeface:2.0.1.1@aar'
compile 'com.github.Yalantis:Context-Menu.Android:v1.0.4'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.android.support.test.espresso:espresso-contrib:2.2.2'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.github.medyo:fancybuttons:1.8.3'
compile 'com.yarolegovich:lovely-dialog:1.0.4'
compile 'com.wang.avi:library:1.0.5'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.traex.rippleeffect:library:1.3'
compile 'com.balysv:material-ripple:1.0.2'
compile 'com.mikepenz:actionitembadge:3.2.5@aar'
compile 'com.github.linger1216:labelview:v1.1.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.onesignal:OneSignal:3.+@aar'
compile 'com.google.android.gms:play-services-places:10.2.0'
compile 'com.google.android.gms:play-services-location:10.2.0'
compile 'com.google.android.gms:play-services-analytics:10.2.0'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.github.rahatarmanahmed:circularprogressview:2.5.0'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.+'
androidTestCompile 'com.android.support:support-annotations:25.2.0'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test.espresso:espresso-idling-resource:2.2.2'
androidTestCompile 'org.mockito:mockito-core:1.+'
androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.google.gms:google-services:3.0.0'
// replace with the current version of the android-apt plugin
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'me.tatarka:gradle-retrolambda:3.2.4'
classpath 'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
configurations.classpath.exclude group: 'com.android.tools.external.lombok'
}
allprojects {
repositories {
jcenter()
jcenter()
mavenCentral()
maven { url 'http://repo.spring.io/milestone' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
resolutionStrategy {
force 'com.android.support:support-annotations:25.2.0'
}
}
}
def getDate() {
def date = new Date()
def formattedDate = date.format('yyyyMMdd-HHmm')
return formattedDate
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: 'com.android.library'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'com.neenbedankt.android-apt'
def AAVersion = '4.2.0'
apt {
arguments {
androidManifestFile variant.outputs[0]?.processResources?.manifestFile
}
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 21
targetSdkVersion 25
multiDexEnabled true
versionCode 1
versionName "1.0"
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "String", "SHARE_URL", System.getenv("RSAPIURL") ? "\"" + System.getenv("RSAPIURL") + "\"" : "\"https://amaro.com\""
buildConfigField "String", "API_URL", System.getenv("RSAPIURL") ? "\"" + System.getenv("RSAPIURL") + "\"" : "\"https://amaro.com/shop/api/\""
buildConfigField "String", "DEV_API_URL", System.getenv("RSAPIURL") ? "\"" + System.getenv("RSAPIURL") + "\"" : "\"https://amaro.com/shop/api/\""//https://amaro.com/shop/api/
buildConfigField "String", "SESSION", "\"_aecp\""//_aecp
buildConfigField "String", "AUTHENTICATION", "\"_aecp_user\""//_aecp_user
}
debug {
minifyEnabled false
debuggable true
buildConfigField "String", "SHARE_URL", System.getenv("RSAPIURL") ? "\"" + System.getenv("RSAPIURL") + "\"" : "\"https://amaro.com\""
buildConfigField "String", "API_URL", System.getenv("RSAPIURL") ? "\"" + System.getenv("RSAPIURL") + "\"" : "\"https://amaro.com/shop/api/\""
buildConfigField "String", "DEV_API_URL", System.getenv("RSAPIURL") ? "\"" + System.getenv("RSAPIURL") + "\"" : "\"http://dev.amaro.com/shop/api/\""//
buildConfigField "String", "SESSION", "\"_aecp_dev\""//_aecp_dev
buildConfigField "String", "AUTHENTICATION", "\"_aecp_dev_user\""//_aecp_dev_user
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
compile "org.projectlombok:lombok:1.16.6"
apt "org.androidannotations:rest-spring:$AAVersion"
compile "org.androidannotations:rest-spring-api:$AAVersion"
compile 'org.springframework.android:spring-android-rest-template:2.0.0.M3'
compile "commons-lang:commons-lang:2.6"
compile "com.j256.ormlite:ormlite-jdbc:4.48"
compile "com.j256.ormlite:ormlite-android:4.48"
compile "org.jdeferred:jdeferred-core:1.2.2"
compile "org.javamoney:moneta-bp:1.0"
compile 'com.fasterxml.jackson.core:jackson-core:2.1.0'
compile 'com.fasterxml.jackson.core:jackson-databind:2.1.0'
compile 'com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.1.0'
compile 'com.squareup:otto:1.3.8'
}
最佳答案
解决了!
在你的根 build.gradle 中,你应该有
ext {
supportlib_version = '25.2.0'
...
}
...
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "$supportlib_version"
}
}
}
}
...
dependencies {
compile "com.android.support:appcompat-v7:25.2.0"
compile "com.android.support:recyclerview-v7:25.2.0"
...
}
关于android - 更新后在 Android 2.3 中构建项目的问题。 'all com.android.support libraries must use the exact same version',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42658286/
我在优化 JOIN 以使用复合索引时遇到问题。我的查询是: SELECT p1.id, p1.category_id, p1.tag_id, i.rating FROM products p1
我有一个简单的 SQL 查询,我正在尝试对其进行优化以删除“使用位置;使用临时;使用文件排序”。 这是表格: CREATE TABLE `special_offers` ( `so_id` int
我有一个具有以下结构的应用程序表 app_id VARCHAR(32) NOT NULL, dormant VARCHAR(6) NOT NULL, user_id INT(10) NOT NULL
此查询的正确索引是什么。 我尝试为此查询提供不同的索引组合,但它仍在使用临时文件、文件排序等。 总表数据 - 7,60,346 产品= '连衣裙' - 总行数 = 122 554 CREATE TAB
为什么额外的是“使用where;使用索引”而不是“使用索引”。 CREATE TABLE `pre_count` ( `count_id`
我有一个包含大量记录的数据库,当我使用以下 SQL 加载页面时,速度非常慢。 SELECT goal.title, max(updates.date_updated) as update_sort F
我想知道 Using index condition 和 Using where 之间的区别;使用索引。我认为这两种方法都使用索引来获取第一个结果记录集,并使用 WHERE 条件进行过滤。 Q1。有什
I am using TypeScript 5.2 version, I have following setup:我使用的是TypeScript 5.2版本,我有以下设置: { "
I am using TypeScript 5.2 version, I have following setup:我使用的是TypeScript 5.2版本,我有以下设置: { "
I am using TypeScript 5.2 version, I have following setup:我使用的是TypeScript 5.2版本,我有以下设置: { "
mysql Ver 14.14 Distrib 5.1.58,用于使用 readline 5.1 的 redhat-linux-gnu (x86_64) 我正在接手一个旧项目。我被要求加快速度。我通过
在过去 10 多年左右的时间里,我一直打开数据库 (mysql) 的连接并保持打开状态,直到应用程序关闭。所有查询都在连接上执行。 现在,当我在 Servicestack 网页上看到示例时,我总是看到
我使用 MySQL 为我的站点构建了一个自定义论坛。列表页面本质上是一个包含以下列的表格:主题、上次更新和# Replies。 数据库表有以下列: id name body date topic_id
在mysql中解释的额外字段中你可以得到: 使用索引 使用where;使用索引 两者有什么区别? 为了更好地解释我的问题,我将使用下表: CREATE TABLE `test` ( `id` bi
我经常看到人们在其Haxe代码中使用关键字using。它似乎在import语句之后。 例如,我发现这是一个代码片段: import haxe.macro.Context; import haxe.ma
这个问题在这里已经有了答案: "reduce" or "apply" using logical functions in Clojure (2 个答案) 关闭 8 年前。 “and”似乎是一个宏,
这个问题在这里已经有了答案: "reduce" or "apply" using logical functions in Clojure (2 个答案) 关闭 8 年前。 “and”似乎是一个宏,
我正在考虑在我的应用程序中使用注册表模式来存储指向某些应用程序窗口和 Pane 的弱指针。应用程序的一般结构如下所示。 该应用程序有一个 MainFrame 顶层窗口,其中有几个子 Pane 。可以有
奇怪的是:。似乎a是b或多或少被定义为id(A)==id(B)。用这种方式制造错误很容易:。有些名字出人意料地出现在Else块中。解决方法很简单,我们应该使用ext==‘.mp3’,但是如果ext表面
我遇到了一个我似乎无法解决的 MySQL 问题。为了能够快速执行用于报告目的的 GROUP BY 查询,我已经将几个表非规范化为以下内容(该表由其他表上的触发器维护,我已经同意了与此): DROP T
我是一名优秀的程序员,十分优秀!