因此,当我添加新主题或添加代码等时,它不会更新应用程序,就像我添加按钮,然后单击运行它将运行并在应用程序上打开旧版本。我试图重建,我试图重新安装,像一个完全干净的卸载并重新安装在应用程序上,确保运行实例是好的,几乎所有的一切,甚至编辑配置。我重新安装了android studio,但仍然有同样的问题。
活动主要:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@drawable/background"
tools:context="dogboy602k.com.myapplication.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Login to your account"
android:id="@+id/textViewHello"
android:textColor="#100606"
android:textSize="@dimen/abc_action_bar_icon_vertical_padding_material"
android:background="#00ffffff"
android:layout_above="@+id/emailField"
android:layout_centerHorizontal="true"
android:layout_marginBottom="65dp" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:ems="10"
android:id="@+id/passwordField"
android:text="Password"
android:layout_marginBottom="72dp"
android:background="#00ffffff"
android:layout_above="@+id/button"
android:layout_alignParentStart="true"
android:layout_alignEnd="@+id/emailField" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:ems="10"
android:id="@+id/emailField"
android:text="Email"
android:autoText="false"
android:background="#00ffffff"
android:layout_marginBottom="40dp"
android:layout_above="@+id/passwordField"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Enter"
android:id="@+id/button"
android:textColor="#000000"
android:background="#dedddd"
android:nestedScrollingEnabled="false"
android:onClick="clickFunction"
android:layout_marginBottom="51dp"
android:minWidth="80dp"
android:minHeight="50dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>
build gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "dogboy602k.com.myapplication"
minSdkVersion 19
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.firebase:firebase-client-android:2.3.1'
}
apply plugin: 'com.google.gms.google-services'