小编Jim*_*anB的帖子

MAC上Android Studio的插件文件夹在哪里

我已经安装了一个插件,现在开始崩溃了我的Android Studio.有人知道Android Studio存储下载的插件文件的位置,所以我可以手动删除吗?

macos android intellij-idea intellij-plugin android-studio

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

Android Studio 3 + Gradle 4.0 + shrinkResources + libraryProject =无法在项目中找到匹配的配置

我有问题将我的项目迁移到最新的Gradle 4.0 + Android Studio 3版本,这给我带来了各种错误.我一点一点地设法将它们全部排除在外,除了这一个.

    Could not resolve all dependencies for configuration ':app:forGoogleCoverageRuntimeClasspath'.
   > Unable to find a matching configuration in project :mylibrary:
       - Configuration 'debugApiElements':
           - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'AndroidTypeAttr{name=Aar}' and found compatible value 'AndroidTypeAttr{name=Aar}'.
           - Required com.android.build.gradle.internal.dependency.BuildTypeAttr 'BuildTypeAttr{name=coverage}' and found incompatible value 'BuildTypeAttr{name=debug}'.
           - Found com.android.build.gradle.internal.dependency.VariantAttr 'VariantAttr{name=debug}' but wasn't required.
           - Required org.gradle.api.attributes.Usage 'for runtime' and found incompatible value 'for compile'.
           - Required store 'ProductFlavorAttr{name=forGoogle}' but no value provided.
       - Configuration 'debugRuntimeElements':
           - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'AndroidTypeAttr{name=Aar}' and found …
Run Code Online (Sandbox Code Playgroud)

android gradle build.gradle android-build-type android-studio-3.0

10
推荐指数
1
解决办法
6504
查看次数

从现有任务中的通知启动新活动

我的应用程序接收推送并根据推送类型打开不同的活动。

我使用TaskStackBuilder待处理的 Intent 来在我的清单中结合创建一个合成后堆栈android:parentActivityName。

到目前为止,一切都很简单。当应用程序未启动时,一切按预期工作。但是,如果应用程序位于后台(任务正在运行),待处理的 Intent 还会使用清单中定义的父级启动我所需的活动,但会重置现有任务。问题是用户同时启动的其他活动也会被清除。 在此输入图像描述

所以想要实现的是:

  1. 如果应用程序未启动,请使用合成后台堆栈(MainActivity)打开所需的活动
  2. 如果应用程序正在运行,请尊重当前的任务顺序,并将所需的活动推到其之上。

我似乎无法让它与TaskStackBuilder.

我很乐意获得一些见解。

android android-intent android-notifications android-pendingintent taskstackbuilder

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

从 Scrollview 到底层 Viewpager 的调度事件

在我的 Android 应用程序中,我有以下布局:

<CustomRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>

<android.support.v4.view.ViewPager
    android:id="@+id/image_viewpager"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    />

<OverScrollBounceScrollView 
    android:id="@+id/scrollview"
    android:orientation="vertical" 
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true"
    >

    <LinearLayout
        android:id="@+id/user_profile_scroll_content"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        >

        <RelativeLayout
            android:id="@+id/dummy_viewport"
            android:layout_width="match_parent"
            android:layout_height="350dp"
            >

        </RelativeLayout>

        <LinearLayout
            android:id="@+id/scroll_content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:background="@android:color/white"
            >

            ...some content

        </LinearLayout>
    </LinearLayout>
</OverScrollBounceScrollView>
</CustomRelativeLayout>
Run Code Online (Sandbox Code Playgroud)

它看起来像这样:

http://i.stack.imgur.com/lzL5u.png

我的目标是:

  1. 当我在 Y 方向滚动时,我希望滚动视图接管并正常滚动
  2. 当我在 X 方向滚动时,我希望滚动视图下的 viewpager 接管

现在的问题是,scrollview 接受所有事件,而根本无法访问 viewpager。

关于如何解决这个问题的任何想法?

android touch scrollview android-custom-view android-event

3
推荐指数
1
解决办法
2221
查看次数