我已经在过去几个月的问题是,Android的工作室往往会卡住的Gradle: build,因为看到这里.Android Studio本身会保持响应,但构建根本不会进展.它也永远不会产生任何类型的错误,因此我无法发布任何有用的信息.一旦进入蓝色月亮,它可能突然起作用,但没有可靠的.
最近我在Stack Overflow上发现了一篇帖子,Gradle: build当他试图创建一个新项目时,某个人的Android Studio会被卡住,他注意到这个问题在32位版本的Android中不存在.所以我想,为什么不试试呢.事实证明,构建不再是问题,而是assembleDebug在尝试构建应用程序时.从这里可以看出.
当然,使用命令提示符和gradlew运行时,所有这些命令都可以正常运行.
到目前为止我尝试过的:
我正在运行最新版本的Android Studio,使用版本19.1.0的构建工具,gradle v0.11 +和am在Windows 8.1上.
还有什么我可以尝试的吗?这开始变得非常烦人.我能想到的最后一个可能的解决方案就是完成一个完整的格式和全新的Windows安装.
我正在尝试使用EditText创建一个登录屏幕,您可以在其中输入电子邮件,可以在忘记密码时按下TextView,然后使用按钮进入登录过程的下一步.
我目前在XML中的实现是基于您可以在ADT中自动生成的登录屏幕的示例代码:
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".LoginActivity" >
<!-- Login progress -->
<LinearLayout
android:id="@+id/login_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_horizontal"
android:orientation="vertical"
android:visibility="gone" >
<ProgressBar
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp" />
<TextView
android:id="@+id/login_status_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:fontFamily="sans-serif-light"
android:text="@string/login_progress_signing_in"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<!-- Login form -->
<ScrollView
android:id="@+id/login_form"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
style="@style/LoginFormContainer"
android:layout_gravity="center"
android:layout_centerInParent="true"
android:layout_width="250dp"
android:layout_height="350dp"
android:background="@drawable/shop_background"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<EditText
android:id="@+id/email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/prompt_email"
android:inputType="textEmailAddress"
android:maxLines="1"
android:singleLine="true" />
<TextView
android:text="Forgot password"
android:layout_above="@id/sign_in_button"
android:id="@+id/forgot_password"
android:layout_centerHorizontal="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:id="@+id/sign_in_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:paddingLeft="32dp"
android:paddingRight="32dp"
android:background="@drawable/button_login" …Run Code Online (Sandbox Code Playgroud)