我正在使用API 23,而我正试图将其转换为API 19.
我将清单改为:
<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/Theme.AppCompat">
<activity android:name=".MainActivity" android:noHistory="true">
我已将gradle构建更改为
android {
compileSdkVersion 19
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
defaultConfig {
applicationId "hi_there"
minSdkVersion 19
targetSdkVersion 19
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:19.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-auth:11.8.0'
compile 'com.ibm.watson.developer_cloud:conversation:4.2.1'
compile 'com.ibm.watson.developer_cloud:text-to-speech:4.2.1'
compile 'com.ibm.watson.developer_cloud:speech-to-text:4.2.1'
compile 'com.ibm.mobilefirstplatform.clientsdk.android:analytics:1.1.0'
compile 'com.ibm.watson.developer_cloud:android-sdk:0.4.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.estimote:sdk:1.4.1'
compile 'com.estimote:mustard:0.2.1'
compile 'org.jsoup:jsoup:1.10.3'
compile 'joda-time:joda-time:2.9.4'
// for joda
compile 'pub.devrel:easypermissions:0.3.0'
compile('com.google.api-client:google-api-client-android:1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.google.apis:google-api-services-calendar:v3-rev276-1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
compile 'com.android.support:multidex:1.0.0'
}
我也试过
compile 'com.android.support:design:19.0.0'
导致
"Failed to resolve: com.android.support:design:19.0.0"
我觉得我创建的.xml文件存在问题。 我正在使用所有.xml文件的全屏活动
感谢任何反馈:)
答案 0 :(得分:0)
材料设计可从API Level 21获得。
你应该替换
compileSdkVersion 19
targetSdkVersion 19
要
compileSdkVersion 21
targetSdkVersion 21
它会起作用。
也可以将21.0.0版本用于设计库。
compile 'com.android.support:design:21.0.0'
希望它会对你有所帮助。 :)
答案 1 :(得分:0)