Google 与 actionBarSherlock 的映射 - Android 工作室?
Google map with actionBarSherlock - Android studio?
我正在使用这个 LINK ,我将这个样本导入到我的 android studio 2.1.2 但出现了一些错误。
我的 gradle :
apply plugin: 'com.android.application'
android {
compileSdkVersion 17
buildToolsVersion '19.1.0'
defaultConfig {
applicationId "com.ecs.google.maps.v2.actionbarsherlock"
minSdkVersion 9
targetSdkVersion 18
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile 'com.android.support:gridlayout-v7:18.0.0'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.google.maps.android:android-maps-utils:0.4+'
compile 'com.google.android.gms:play-services-maps:9.2.1'
compile 'com.google.android.gms:play-services-places:9.2.1'
compile files('libs/commons-logging-1.1.1.jar')
compile files('libs/google-http-client-1.15.0-rc.jar')
compile files('libs/google-http-client-android-1.15.0-rc.jar')
compile files('libs/google-http-client-jackson2-1.15.0-rc.jar')
compile files('libs/httpclient-4.0.1.jar')
compile files('libs/httpcore-4.0.1.jar')
compile files('libs/jackson-core-2.1.3.jar')
compile files('libs/jackson-core-asl-1.9.11.jar')
compile files('libs/gson-2.3.1.jar')
}
并且:
// 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.1.+'
}
}
allprojects {
repositories {
jcenter()
}
}
这是我的错误:
我的问题已解决:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '23.0.2'
defaultConfig {
applicationId "com.ecs.google.maps.v2.actionbarsherlock"
minSdkVersion 9
targetSdkVersion 22
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.google.android.gms:play-services:4.+'
compile 'com.google.maps.android:android-maps-utils:0.4+'
compile files('libs/commons-logging-1.1.1.jar')
compile files('libs/google-http-client-1.15.0-rc.jar')
compile files('libs/google-http-client-android-1.15.0-rc.jar')
compile files('libs/google-http-client-jackson2-1.15.0-rc.jar')
compile files('libs/httpclient-4.0.1.jar')
compile files('libs/httpcore-4.0.1.jar')
compile files('libs/jackson-core-2.1.3.jar')
compile files('libs/jackson-core-asl-1.9.11.jar')
compile files('libs/gson-2.3.1.jar')
compile 'com.android.support:gridlayout-v7:22.1.1'
compile 'com.android.support:support-v4:22.2.0'
}
并且:
// 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.1.+'
}
}
allprojects {
repositories {
jcenter()
}
}
我正在使用这个 LINK ,我将这个样本导入到我的 android studio 2.1.2 但出现了一些错误。
我的 gradle :
apply plugin: 'com.android.application'
android {
compileSdkVersion 17
buildToolsVersion '19.1.0'
defaultConfig {
applicationId "com.ecs.google.maps.v2.actionbarsherlock"
minSdkVersion 9
targetSdkVersion 18
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile 'com.android.support:gridlayout-v7:18.0.0'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.google.maps.android:android-maps-utils:0.4+'
compile 'com.google.android.gms:play-services-maps:9.2.1'
compile 'com.google.android.gms:play-services-places:9.2.1'
compile files('libs/commons-logging-1.1.1.jar')
compile files('libs/google-http-client-1.15.0-rc.jar')
compile files('libs/google-http-client-android-1.15.0-rc.jar')
compile files('libs/google-http-client-jackson2-1.15.0-rc.jar')
compile files('libs/httpclient-4.0.1.jar')
compile files('libs/httpcore-4.0.1.jar')
compile files('libs/jackson-core-2.1.3.jar')
compile files('libs/jackson-core-asl-1.9.11.jar')
compile files('libs/gson-2.3.1.jar')
}
并且:
// 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.1.+'
}
}
allprojects {
repositories {
jcenter()
}
}
这是我的错误:
我的问题已解决:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '23.0.2'
defaultConfig {
applicationId "com.ecs.google.maps.v2.actionbarsherlock"
minSdkVersion 9
targetSdkVersion 22
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.google.android.gms:play-services:4.+'
compile 'com.google.maps.android:android-maps-utils:0.4+'
compile files('libs/commons-logging-1.1.1.jar')
compile files('libs/google-http-client-1.15.0-rc.jar')
compile files('libs/google-http-client-android-1.15.0-rc.jar')
compile files('libs/google-http-client-jackson2-1.15.0-rc.jar')
compile files('libs/httpclient-4.0.1.jar')
compile files('libs/httpcore-4.0.1.jar')
compile files('libs/jackson-core-2.1.3.jar')
compile files('libs/jackson-core-asl-1.9.11.jar')
compile files('libs/gson-2.3.1.jar')
compile 'com.android.support:gridlayout-v7:22.1.1'
compile 'com.android.support:support-v4:22.2.0'
}
并且:
// 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.1.+'
}
}
allprojects {
repositories {
jcenter()
}
}