小编Pra*_*ani的帖子

从22.0.1更新Android SDK工具到22.0.4(最新版本)

我想将我的Android SDK工具从22.0.1更新到22.0.4

我也安装了ADT,但无法将SDK工具更新到22.0.4

我面临以下问题:

Download interrupted: Read timed out issue.
Run Code Online (Sandbox Code Playgroud)

以下是更新SDK时的屏幕截图:

在此输入图像描述 谁能帮我 :

提前致谢.

编辑:我找到了解决方案对于上述问题并添加了解决方案作为答案.如果有人遇到同样的问题,他/她也可以解释这个问题.

sdk android adt

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

"Content-Provider"和"SQLite数据库"之间的确切区别

我已经为Android做了SQLite数据库编程,但我对Content-Provider一无所知,除了这个:"我已经提到了Android开发者页面,Android SDK解释了"Content-provider",因为它用于存储和检索数据."

但是之后,

  1. "Content-Provider"和"SQLite数据库"之间的确切区别是什么?
  2. 什么时候最好存储数据?

任何例子或帮助!!

sqlite android android-contentprovider

85
推荐指数
5
解决办法
4万
查看次数

引起:java.lang.UnsupportedOperationException:无法转换为dimension:type = 0x1

在Android中,我在模拟器和某些移动设备中遇到以下错误但在平板电脑中没有:

我无法理解实际上是什么错误?

我搜索了很多教程,但找不到任何解决方案.

请帮我解决这个问题.

注意:在这个应用程序中,我使用了ActionbarSherlock和主题,可能是因为该库或任何其他问题?

我的错误日志是:

09-11 17:52:57.342: E/AndroidRuntime(9935): FATAL EXCEPTION: main
09-11 17:52:57.342: E/AndroidRuntime(9935): android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
09-11 17:52:57.342: E/AndroidRuntime(9935):     at android.view.LayoutInflater.createView(LayoutInflater.java:613)
09-11 17:52:57.342: E/AndroidRuntime(9935):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
09-11 17:52:57.342: E/AndroidRuntime(9935):     at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
09-11 17:52:57.342: E/AndroidRuntime(9935):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
09-11 17:52:57.342: E/AndroidRuntime(9935):     at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
09-11 17:52:57.342: E/AndroidRuntime(9935):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
09-11 17:52:57.342: E/AndroidRuntime(9935):     at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:371)
09-11 17:52:57.342: E/AndroidRuntime(9935):     at android.widget.ArrayAdapter.getView(ArrayAdapter.java:362)
09-11 17:52:57.342: E/AndroidRuntime(9935):     at android.widget.AbsSpinner.onMeasure(AbsSpinner.java:193)
09-11 17:52:57.342: …
Run Code Online (Sandbox Code Playgroud)

android android-emulator android-layout android-theme actionbarsherlock

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

在webview中禁用滚动?

到目前为止,我只是一名iPhone开发人员,现在我决定给Android一个旋转.我在Android上无法弄清楚的是如何以编程方式阻止滚动WebView

类似于iPhone预防onTouchMove活动的东西会很棒!

android android-webview android-scrollbar android-scroll

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

如何使用AutoCompleteTextView并使用来自Web API的数据填充它?

我想AutoCompleteTextView在我的活动中使用an ,并通过查询Web API将数据填充为用户类型.我该怎么做呢?

我是否创建了一个新类并重写AutoCompleteTextView.performFiltering,或者我是否使用自定义列表适配器并提供android.widget.Filter覆盖performFiltering 的自定义?

或者有更好的方法来获得我的最终目标吗?

我做了一些类似的事情,但是它用于快速搜索框,它涉及实现服务,但我相信这不是我想要做的.

networking android filter autocompletetextview

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

如何使surfaceview透明

大家好我想让我的DrawingSurface视图透明.我试了很多东西,但它不起作用.

这是我的表面视图透明的xml代码

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <FrameLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:src="@drawable/icon" >
        </ImageView>

        <LinearLayout
            android:id="@+id/linearLayout1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:background="#00000000" >

            <codewalla.android.drawings.DrawingSurface
                android:id="@+id/drawingSurface"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent" >
            </codewalla.android.drawings.DrawingSurface>
        </LinearLayout>
    </FrameLayout>

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <Button
            android:id="@+id/colorRedBtn"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="10"
            android:onClick="onClick"
            android:text="R" />

        <Button
            android:id="@+id/colorBlueBtn"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="10"
            android:onClick="onClick"
            android:text="G" />

        <Button
            android:id="@+id/colorGreenBtn"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="10"
            android:onClick="onClick"
            android:text="B" />

        <Button
            android:id="@+id/undoBtn"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="10"
            android:onClick="onClick"
            android:text="U" />

        <Button
            android:id="@+id/redoBtn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="10"
            android:onClick="onClick"
            android:text="R" />
    </LinearLayout>

</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

android surfaceview

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

Android:DataBinding 和 ViewBinding 之间的区别

自 Jetpack 发布以来,我们一直在使用DataBinding。Android 文档表明ViewBinding已添加到Android Studio 3.6 Canary 11+ 中。

我阅读了文档,但它看起来类似于DataBinding。

谁能解释一下这两个概念之间的区别?

data-binding android android-databinding android-jetpack android-viewbinding

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

Android LocationServices.FusedLocationApi已弃用

我无法弄清楚为什么LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient,mLocationRequest, this);"FusedLocationApi"被淘汰并指出它已被弃用. 点击此处查看图片

import android.location.Location;
import android.location.LocationListener;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;
import android.os.Bundle;

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;

public class MaintainerMapActivity extends FragmentActivity implements OnMapReadyCallback, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener{

private GoogleMap mMap;
GoogleApiClient mGoogleApiClient;
Location mLastLocaton;
LocationRequest mLocationRequest;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_maintainer_map2);
    // Obtain the SupportMapFragment and get notified when the map is ready to be used.
    SupportMapFragment …
Run Code Online (Sandbox Code Playgroud)

java android deprecated android-fusedlocation

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

错误状态:平台不允许不安全的 HTTP:

我遇到了以下问题:E/flutter (7144): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] 未处理的异常:错误状态:平台不允许不安全的 HTTP:http://myIPv4 :端口/路径。

这是我要申请的颤振代码

这是我可以访问的后端: 我的后台代码

我已经允许 cors 访问,但即使这对我也没有帮助。我已经尝试使用 http://localhost:port/path 和 http://myIP:port/path 但没有用!

但是如果我尝试通过浏览器直接访问,那么工作。

浏览器打印

connection mobile http node.js flutter

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

打开Android Studio中最后关闭的标签页

我是Android Studio的新手,想知道是否有任何快捷方式/选项可以重新打开最后关闭的标签.

android keyboard-shortcuts android-studio

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