小编Kan*_*han的帖子

无法解决:com.android.databinding:library:3.1.2

更新android studio 3.1.2后,我现有的项目给出错误

dataBinding.enabled = true
Run Code Online (Sandbox Code Playgroud)

错误如下 -

Failed to resolve: com.android.databinding:library:3.1.2
Failed to resolve: com.android.databinding:adapters:3.1.2
Run Code Online (Sandbox Code Playgroud)

我的gradle依赖如下 -

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:25.1.0'

implementation 'com.android.support:recyclerview-v7:25.1.0'
implementation 'com.android.support:preference-v7:25.1.0'

implementation 'com.android.support.constraint:constraint-layout:1.0.0-beta3'

implementation 'com.firebase:firebase-jobdispatcher:0.5.0'

// Instrumentation dependencies use androidTestCompile
// (as opposed to testCompile for local unit tests run in the JVM)
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support:support-annotations:25.1.0'
androidTestImplementation 'com.android.support.test:runner:0.5'
androidTestImplementation 'com.android.support.test:rules:0.5'
Run Code Online (Sandbox Code Playgroud)

}

我也试过了

android.databinding.enableV2=true
Run Code Online (Sandbox Code Playgroud)

但它也没有用

当我尝试将构建工具版本更新到4.4时,我发现了这个错误.如果我不更新构建工具版本,那么它的工作正常.

android android-gradle-plugin

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

找不到属性app:useSimpleSummaryProvider

我想更新我的首选项摘要,在这里找到了一个名为SimpleSummaryProvider的东西。但就我而言,这是指找不到属性,app:useSimpleSummaryProvider而在Java代码中,则是无法解析SummaryProvider类。我的应用程序级别构建Gradle依赖项为-

implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support:support-annotations:28.0.0'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:preference-v7:28.0.0'
Run Code Online (Sandbox Code Playgroud)

我不知道我是否想念什么。我将不胜感激

android android-preferences build.gradle

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

由视图模型的LiveData条目填充的过滤器回收器视图

我正在使用体系结构组件视图模型的LiveData填充回收器视图,并想添加一个searchview过滤器,但找不到任何解决方案。我尝试在适配器中使用可过滤的接口,但它也无法正常工作,这是可能的,因为视图模型不允许更改。

我的适配器是-

public class NetworkAdapter extends RecyclerView.Adapter<NetworkAdapter.NetworksViewHolder> implements Filterable {

// Member variable to handle item clicks
final private ItemClickListener mItemClickListener;
// Class variables for the List that holds task data and the Context
private List<NetworkEntry> mNetworkEntries;
private List<NetworkEntry> mFilteredNetworkEntries = new ArrayList<>();
private Context mContext;

/**
 * Constructor for the TaskAdapter that initializes the Context.
 *
 * @param context  the current Context
 * @param listener the ItemClickListener
 */
public NetworkAdapter(Context context, ItemClickListener listener) {
    mContext = context;
    mItemClickListener = …
Run Code Online (Sandbox Code Playgroud)

android android-room android-architecture-lifecycle android-architecture-components

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

无法解析 EncodeDecodeTest 中的 InputSurface 和 OutputSurface

我正在尝试将 mp4 文件转换为低帧率和低分辨率视频,为此我正在尝试使用 bigflake.com 中的示例。但是当我复制一个 EncodeDecodeTest 类时,它无法解析 InputSurface 和 OutputSurface 类。我用谷歌搜索但没有找到任何东西。

mp4 android

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

无法解析 SphericalUtil

我正在尝试通过方法计算多边形的面积SphericalUtil.computeArea(),但无法解析符号SphericalUtil

我已将以下行放入gradle.build

compile 'com.google.maps.android:android-maps-utils:0.4.+'

android google-maps

0
推荐指数
1
解决办法
1607
查看次数