小编Anu*_*hya的帖子

PIP(Python):ImportError:无法导入名称_remove_dead_weakref

我收到了以下错误,我有很多搜索,但一直没有找到一个好的修复 - 请任何人得到这种错误并解决.请帮忙.

File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
   "__main__", fname, loader, pkg_name)
 File "c:\python27\lib\runpy.py", line 72, in _run_code
   exec code in run_globals
 File "C:\python27\Tools\Scripts\pip.exe\__main__.py", line 5, in <module>
 File "c:\python27\lib\site-packages\pip\__init__.py", line 5, in <module>
   import logging
 File "c:\python27\lib\logging\__init__.py", line 26, in <module>
   import sys, os, time, cStringIO, traceback, warnings, weakref, collections
 File "c:\python27\lib\weakref.py", line 14, in <module>
   from _weakref import (
ImportError: cannot import name _remove_dead_weakref
Run Code Online (Sandbox Code Playgroud)

python pip pywin32

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

Gradle Build陷入执行任务:[:app:generateDebugSources,:app:generateDebugAndroidTestSources]

我在Ubuntu 14.04上运行Android Studio 1.3.2,使用build-tools版本23.0.0.

每当我加载任何项目时,在索引编制完成后,Gradle会显示Gradle Build Running,无论我离开多长时间,它都不显示进度或错误.

我试过这些解决方案:

但他们不适合我.

更多解决方案?将非常感谢帮助

android gradle android-studio

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

如何像redbus一样制作座位预订布局

我正在开发一个巴士预订应用程序,我想添加座位预订布局,就像红色巴士应用程序中一样。我使用 GridView 设计布局,但看起来像

我拥有什么                                    我想要什么

我需要座位 1 和座位 2 之间的空间较小,然后座位 2 和座位 3 之间的空间较大,座位 3 和座位 4 之间的空间又需要座位 1 和座位 2 之间的空间。在最后一排,我需要 5 个座位​​。我需要与红色巴士布局完全相同。

XML

<RelativeLayout
            android:id="@+id/seatLayoutLowerMain"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_below="@+id/seatLegendLayout"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="10.0dip"
            android:background="@drawable/seat_layout_border"
            android:paddingBottom="5.0dp"
            android:paddingRight="5.0dp" >

            <GridView
                android:id="@+id/gridView1"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_below="@+id/driver"
                android:layout_margin="4dp"
                android:columnWidth="100dp"
                android:gravity="center"
                android:numColumns="5"
                android:stretchMode="columnWidth" >
            </GridView>

            <RelativeLayout
                android:id="@+id/driver"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_alignRight="@+id/gridView1"
                android:layout_marginRight="20.0dp"
                android:layout_marginTop="5.0dp"
                android:background="@drawable/steering_icon"
                android:orientation="horizontal" >
            </RelativeLayout>
        </RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

选座活动

public class SeatSelection extends AppCompatActivity implements AdapterView.OnItemClickListener{

GridView gridView;
ArrayList<Item> gridArray = new ArrayList<Item>();
CustomGridViewAdapter customGridAdapter;
public Bitmap …
Run Code Online (Sandbox Code Playgroud)

android gridview android-layout

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

android.support.design.widget.tablayout选项卡指示器颜色

我正在使用TabLayout和View Pager来显示多个标签.我想更改选定的标签指示器.我用过,app:tabIndicatorColor但颜色没有变化.它呈现出绿色.我已经读过,默认情况下tabIndicator颜色被设置为color/accent,但是绿色不是我的强调颜色.我的xml如下:

<?xml version="1.0" encoding="utf-8"?>
Run Code Online (Sandbox Code Playgroud)

<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_height="match_parent"
    android:layout_width="match_parent">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/primary"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:background="@color/primary"
            app:layout_scrollFlags="scroll|enterAlways"
            app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
            />
        <android.support.design.widget.TabLayout
            android:id="@+id/tab_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:tabGravity="fill"
            app:tabIndicatorColor="@android:color/white"
            app:tabSelectedTextColor="@android:color/white"
            app:tabTextColor="@color/primary_light" 
/>
    </android.support.design.widget.AppBarLayout>

    <android.support.v4.view.ViewPager
        android:id="@+id/view_pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior" />

</android.support.design.widget.CoordinatorLayout>
<android.support.design.widget.NavigationView
    android:id="@+id/navigation_view"
    android:layout_height="match_parent"
    android:layout_width="wrap_content"
    android:layout_gravity="start"
    app:headerLayout="@layout/header_layout"
    app:menu="@menu/menu_drawer"
    />
Run Code Online (Sandbox Code Playgroud)

我错过了什么?图片来源:http://imgur.com/uNcbviv

android android-layout android-tablayout

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