我得到以下错误
Error:(1, 1) A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
> Gradle version 2.10 is required. Current version is 2.8. If using the gradle wrapper, try editing the distributionUrl in C:\Users\TARUN\Desktop\GingerBuds\gradle\wrapper\gradle-wrapper.properties to gradle-2.10-all.zip
Run Code Online (Sandbox Code Playgroud)
然后我改变了上面的gradle路径,然后发生了以下问题,
我正在构建我的项目时遇到此异常.我重建并清理了项目并更新了google-play-services,然后我也遇到了错误.任何人都可以帮我解决这个问题.
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
java.io.FileNotFoundException: C:\Users\TARUN\Desktop\Gingerbuds\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\8.4.0\jars\classes.jar (The system cannot find the path specified)
Run Code Online (Sandbox Code Playgroud)
的build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.kitchenvilla.gingerbuds"
minSdkVersion 15
targetSdkVersion 23
versionCode 24
versionName "1.2.2"
}
buildTypes { …Run Code Online (Sandbox Code Playgroud) 我有一个edittext视图和按钮,编辑文本有一些默认值.当我点击按钮时,我将焦点放在编辑文本上.但问题是光标位于编辑文本的开头.如何在默认文本后放置光标.
我做了什么.
mobile_text =(EditText)findViewById(R.id.mobile_text);
mobile_edit = (ImageView)findViewById(R.id.mobile_edit_icon);
mobile_edit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mobile_text.setEnabled(true);
mobile_text.requestFocus();
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
}
});
Run Code Online (Sandbox Code Playgroud)
我的layout.xml文件
<RelativeLayout
android:paddingTop="@dimen/pad_3dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/pad_5dp"
android:paddingBottom="@dimen/pad_5dp"
>
<TextView
android:id="@+id/mobile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="MOBILE"
android:paddingLeft="2dp"
android:textSize="@dimen/txt_12sp"
/>
<EditText
android:paddingTop="@dimen/pad_5dp"
android:layout_below="@+id/mobile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:id="@+id/mobile_text"
android:text="9581129423"
/>
<ImageView
android:clickable="true"
android:id="@+id/mobile_edit_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/edit"
android:layout_below="@+id/mobile"
android:layout_alignParentRight="true"
android:gravity="right|end"
/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud) 我有一个地址,最后包含密码.
如何使用正则表达式从地址中提取6位数的密码?
我试过用String.index()但不完美.我不知道怎么写reg exp语法从整个字符串中提取6位数字符串.
输入:
19,Jogeshwari Vikhroli Link Rd,MHADA Colony 19,Powai,Mumbai,Maharashtra 400076,Mumbai,
输出:
400076
在我的活动中,我有一个长滚动视图包含多个视图,当用户向上或向下滚动时,我必须检查文本视图是否在屏幕上可见.
请帮我 .