小编Har*_*iya的帖子

Gradle同步失败:无法确定com.android.support:recyclerview-v7:24.0.0的工件

我不能syncbuild.gradle下面的错误显示

Gradle同步失败:无法确定com.android.support:recyclerview-v7:24.0.0的工件:脱机模式没有可用的缓存版本

android synchronization build.gradle

7
推荐指数
1
解决办法
7541
查看次数

Android Studio:Gradle Sync失败,支持-v4-24.1.1.jar

我正在处理问题.这里是gradle消息中的问题,同时在gradle中进行同步我们的Android Studio version is 2.1.2.

错误:配置项目':LetMeCall_Store'时出现问题.找不到support-v4.jar(com.android.support:support-v4:24.1.1).在以下位置搜索:https: //jcenter.bintray.com/com/android/support/support-v4/24.1.1/support-v4-24.1.1.jar

下面是gradle文件

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.1"

    defaultConfig {
        applicationId "com.app.letmecall.store"
        minSdkVersion 15
        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.1.1'
    compile 'com.android.support:design:24.0.0-beta1'
    compile 'com.android.support:support-v4:24.0.0-beta1'
    compile 'com.android.support:recyclerview-v7:24.1.1'
    compile 'com.android.support:cardview-v7:24.0.0-beta1'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
    compile 'com.loopj.android:android-async-http:1.4.6'
    compile 'com.daimajia.androidanimations:library:1.0.3@aar'
    compile "com.google.android.gms:play-services:8.3.0"
    compile 'com.mcxiaoke.volley:library-aar:1.0.0' …
Run Code Online (Sandbox Code Playgroud)

android android-studio android-gradle-plugin gradle-plugin android-studio-2.1

7
推荐指数
1
解决办法
1万
查看次数

我可以将GIF格式图像添加为启动画面

如何将GIF格式图像添加为启动画面.我试图添加,但当我添加它.它充当正常图像.我不知道我们是否可以使用Gif图像作为启动画面.如果有任何选项可以使用该GIF格式图像.

android splash-screen gif imageview android-studio

7
推荐指数
1
解决办法
2万
查看次数

无法打开编辑器.Android XML Editor无法处理此输入

每当我厌倦了查看以前版本的XML文件时,我都会收到此错误SVN Team => Show History.我怎样才能解决这个问题?

Could not open the editor. Andriod XML Editor cannot process this input.
Run Code Online (Sandbox Code Playgroud)

eclipse svn android helios

6
推荐指数
1
解决办法
4050
查看次数

Android Studio中"设置..."和"默认设置..."之间有什么区别?

我发现我可以在两个File|中设置文件编码和其他参数 Settings...,还有File| Other Settings| Default Settings....但是,我不清楚这两个选项之间的区别是什么.

此外,我可以运行File| Export Settings...将设置保存到settings.jar文件,但我不清楚如果我运行File|,将恢复什么 Import Settings...操作.

  • 两个设置选项有什么区别?
  • 运行导出/导入时导出/导入的设置是什么?

settings android-studio

6
推荐指数
1
解决办法
314
查看次数

Android Studio错误:"必须从UI线程调用方法getText(),当前推断的线程是worker

我正在android studio中创建一个CRUD操作,但我不断收到错误.错误是当我检查LogCat这是他们告诉我的

156-158
1907-1931/com.example.casquejo.loginadmin E/AndroidRuntime:FATAL EXCEPTION:AsyncTask#2进程:com.example.casquejo.loginadmin,PID:1907 java.lang.RuntimeException:执行doInBackground时发生错误()引起:java.lang.NullPointerException atcom.example.casquejo.loginadmin.NewProductActivity $ CreateNewProduct.doInBackground(NewProductActivity.java:85)at com.example.casquejo.loginadmin.NewProductActivity $ CreateNewProduct.doInBackground(NewProductActivity.java:58 )atcom.example.casquejo.loginadmin.NewProductActivity $ CreateNewProduct.onPreExecute(NewProductActivity.java:67)atcom.example.casquejo.loginadmin.NewProductActivity $ 1.onClick(NewProductActivity.java:53)

有人可以帮我这个或者有人可以提出一个想法如何解决这个问题下面是我的java类EditProductActivity.class的代码

       package com.example.casquejo.loginadmin;

        import java.util.ArrayList;
        import java.util.List;
        import org.apache.http.NameValuePair;
        import org.apache.http.message.BasicNameValuePair;
        import org.json.JSONException;
        import org.json.JSONObject;
        import android.app.Activity;
        import android.app.ProgressDialog;
        import android.content.Intent;
        import android.os.AsyncTask;
        import android.os.Bundle;
        import android.util.Log;
        import android.view.View;
        import android.widget.Button;
        import android.widget.EditText;

        /**
        * Created by Casquejo on 9/14/2015.
        */
        public class NewProductActivity extends Activity {
    private ProgressDialog pDialog;

    JSONParser jsonParser = new JSONParser();
    EditText inputName;
    EditText inputPrice;
    EditText …
Run Code Online (Sandbox Code Playgroud)

java multithreading android android-asynctask

6
推荐指数
2
解决办法
2万
查看次数

无法在Android上设置Google登录范围

我使用Google API登录Android应用.

代码在这里:

SignInButton btnLogin = (SignInButton) findViewById(R.id.sign_in_button);

btnLogin.setOnClickListener(this);

Scope[] scopes = new Scope[2];
scopes[0] = new Scope("https://www.googleapis.com/auth/admin.directory.user.readonly");
scopes[1] = new Scope("https://www.googleapis.com/auth/contacts.readonly");

btnLogin.setScopes(scopes);
Run Code Online (Sandbox Code Playgroud)

使用访问令牌登录成功,但访问令牌只有默认范围:

"userinfo.profile" & "userinfo.email" & "auth/plus.me"
Run Code Online (Sandbox Code Playgroud)

你能帮助我获得两个范围:

"/auth/admin.directory.user.readonly" & "/auth/contacts.readonly"
Run Code Online (Sandbox Code Playgroud)

android google-api access-token google-signin

6
推荐指数
1
解决办法
3497
查看次数

Android软键盘浮动只有特定的布局

我有一个布局,代码如下

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<!--some stuff here-->

<LinearLayout
    android:id="@+id/layout1"
    android:layout_alignParentBottom="true"
    android:layout_above="@+id/layout2"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">
    <EditText
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="5"
        />
    <ImageButton
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:scaleType="fitStart"
        android:layout_marginLeft="5dp"
        style="@style/Base.Widget.AppCompat.Button.Borderless"
        android:src="@drawable/ic_menu_send"/>
</LinearLayout>

<LinearLayout
    android:id="@+id/layout2"
    android:layout_alignParentBottom="true"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">
    <!--some stuff here-->
</LinearLayout>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

在上面的代码时,键盘秀,我想layout2留在bottomlayout1go up with keyboard.如果我添加android:windowSoftInputMode="adjustPan|adjustResize"两个布局保持在底部.请帮忙

android android-layout android-softkeyboard android-xml android-studio

6
推荐指数
1
解决办法
2666
查看次数

Android Studio:@Override“此处不允许使用注释”

我想实施...

@Override
    public void onBackPressed() {
     }
Run Code Online (Sandbox Code Playgroud)

但是,我收到一条错误消息,说“此处不允许使用注释”。我需要在这里实现这个方法。有替代方案吗?

public class supbreh extends Appbreh

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_intent_breh);

 if (myBundle != null) {

        String name =  myBundle.getString("workout");
        ShowDetails(name);
    }
}

 private void ShowAbDetails(String mName) {


    if(mName.equals("abs1")){


        @Override
        public void onBackPressed() {  //"Not Allowed here"

        }

}
Run Code Online (Sandbox Code Playgroud)

java android overriding annotations

5
推荐指数
1
解决办法
2万
查看次数

如何修复"找不到与给定名称匹配的资源('value'与值'@ integer/google_play_services_version')"

我在Visual Studio 2015中构建我的Android App项目时收到以下错误.

找不到与给定名称匹配的资源('value'的值为'@ integer/google_play_services_version')

这些行位于:

obj\Debug\android\manifest\AndroidManifest.xml
Run Code Online (Sandbox Code Playgroud)

里面有3个内容AndroidManifest file.

我从网上下载了谷歌播放服务SDK Manager.

我应该参考我的解决方案吗?

我已经Xamarin.GooglePlayServices.Base, Xamarin.GooglePlayServices.Basement, Xamarin.GooglePlayServices.Maps参考了.

谢谢.

android visual-studio android-resources xamarin

5
推荐指数
1
解决办法
2万
查看次数