【发布时间】:2019-07-13 20:11:36
【问题描述】:
我已经尝试了很多解决并按照此链接进行操作 StackOverflow 但没有任何反应。我介绍自己是 android 编程和学习自己的初学者。
//values文件夹中styles.xml的代码
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<!--<item name="android:textColor">#00FF00</item>-->
<!--<item name="android:typeface">monospace</item>-->
</style>
</resources>
//and code for build.gradle Module:app is
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.madhav.schoolmanagement"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
implementation 'android.arch.lifecycle:extensions:1.1.1'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:appcompat-v7:+'
implementation 'com.google.firebase:firebase-core:16.0.3'
implementation 'com.google.firebase:firebase-auth:16.0.3'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.android.support:appcompat-v7:28.0.0'
}
repositories {
google()
}
buildscript {
repositories {
google()
}
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
【问题讨论】:
-
在您的屏幕截图中,有一个带有感叹号的红色圆圈(缩放按钮旁边)。单击该按钮,您将了解为什么不显示预览。
-
尝试粘贴我的答案中的相同资源并重建您的项目
-
@VipulChauhan 我按照你说的做了,但是没有用
-
终于通过这个链接解决了[stackoverflow.com/questions/42477738/….非常感谢您的帮助。@VipulChauhan,@sohel yadav,@Nurlan