Android 问题集合

Failed converting ECJ parse tree to Lombok for file E:\AndroidStudioProjects\HSH\hsh_lib\src\main\java\com\dhwl\hsh\lib\utils\RxUtils.java java.lang.UnsupportedOperationException: Unknown ASTNode child: LambdaExpression 使用java8 当前com.android.tools.lint版本与Retrolambda冲突

http://blog.csdn.net/dhx20022889/article/details/46894469


Execution failed for task ‘:hsh_merchant:processDebugResources’.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\android-sdk-windows\build-tools\23.0.3\aapt. exe'' finished with non-zero exit value 1 资源相关error未解决完。 http://stackoverflow.com/questions/29450620/aapt-exe-finished-with-non-zero-exit-value-1 http://stackoverflow.com/questions/30899963/how-to-fix-22-0-1-aapt-exe-finished-with-non-zero-exit-value-1
android studio custom view rendering problems

降低预览版本


65536 方法上限问题

method ID not in [0, 0xffff]: 65536 https://developer.android.com/studio/build/multidex.html#avoid
android {
    compileSdkVersion 21
    buildToolsVersion "21.1.0"

    defaultConfig {
        ...
        minSdkVersion 14
        targetSdkVersion 21
        ...

        // Enabling multidex support.
        multiDexEnabled true
    }
    ...
}

dependencies {
  compile 'com.android.support:multidex:1.0.0'
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.android.multidex.myapplication">
    <application
        ...
        android:name="android.support.multidex.MultiDexApplication">
        ...
    </application>
</manifest>

或者

Note: If your app uses extends the Application class, you can override the attachBaseContext() method and call MultiDex.install(this) to enable multidex. For more information, see the MultiDexApplication reference documentation.

A problem was found with the configuration of task ':app:packageRelease'. File 'E:\StudioProjects\GanWuMei\GanWuMei\app\build\intermediates\res\resources-release-stripped.ap_' specified for property 'resourceFile' does not exist.

试了如下配置,没用。
image

这个方法解决问题

buildTypes {
    release {
        minifyEnabled false
        shrinkResources false  // true -> false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

minifyEnabled 是开启混淆 shrinkResources 删除无效的Resource shrinkResources依赖于minifyEnabled,必须和minifyEnabled一起用。


Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.internal.widget.TintManager" on path: DexPathList[[zip file "/data/app/com.fivestar.finance.app-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]

添加依赖包

compile 'com.android.support:design:24.1.1'

GIT问题:error:src refspec master does not match any

将本地GIT版本库PUSH到一个GITHUB上一个空的版本库时可能会出现如下错误 error:src refspec master does not match any 原因: 本地版本库为空, 空目录不能提交 (只进行了init, 没有add和commit)


Android Studio类中实现Serializable自动生成serialVersionUID

1、File -> Settings… -> Editor -> Inspections -> Serialization issues[在java类目下] -> Serializable class without ‘serialVersionUID’(选中)

2、进入实现了Serializable中的类,选中类名,Alt+Enter弹出提示,然后直接导入完成

文/IF_I_WERE_A_BOY(简书作者) 原文链接:http://www.jianshu.com/p/c504857389d1 著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。


1.在写TextView 和ImageView 使用Selector切换字体颜色和图片的时候遇到定义的selector无效?

解决办法:textView字体颜色切换的selector最好写在res/color文件夹下,并且要在配置文件中添加clickable=”true” ImageView的图片切换也是要添加这个属性。如果没有添加这个属性,在代码中为相应的textView 和ImageView设置相应的事件监听也可达到效果, 这里建议添加clickable=”true”

在代码中为textView.setTextColor(a);a为Selector文件,不会产生效果。


Error:
Choreographer: Skipped 298 frames!  The application may be doing too much work on its main thread.

高德地图 mLocationOption.setOnceLocation(true); 改为-> mLocationOption.setOnceLocation(false);


android:singleLine=”true” sdk 23 后 过期被弃用 由 android:lines=”1” 取代,但部分手机无效,扔需设置前者


Android N 7.0 安装包解析失败问题

https://developer.android.com/about/versions/nougat/android-7.0-changes.html https://developer.android.google.cn/about/versions/nougat/android-7.0-changes.html

https://developer.android.google.cn/reference/android/support/v4/content/FileProvider.html

http://blog.csdn.net/henrychow_2015/article/details/54584905

启动安装页面的思路通常是往intent里面传递action个、flags、uri等参数,然后通过startActivity(Intent)的方式。7.0以前和7.0以后这些参数的配置就不太一样了。 7.0以前,配置action:Intent.setAction(Intent.ACTION_VIEW);配置flags:Intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);配置uri:Intent.setDataAndType(Uri.fromFile(问题1中的apkFile),”application/vnd.android.package-archive”)。 7.0以后,配置action:Intent.setAction(Intent.ACTION_INSTALL_PACKAGE);配置flags:Intent.setFlags(Intent.FLAG_GRANT_URI_PERMISSION);配置uri:Intent.setDataAndType(FileProvider.getUriForFile(context, “manifest中的provider,下面的例子会讲到”, 问题1中的apkFile),”application/vnd.android.package-archive”)。


All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.3.0, 24.0.0. Examples include com.android.support:support-v4:25.3.0 and com.android.support:support-v4:24.0.0

项目里(依赖或间接依赖)中包含不同版本包容易编译错误,需统一,support v7 appcompat等包依赖support-v4 ,解决办法添加 compile ‘com.android.support:support-v4:25.3.0’


IllegalArgumentException in CustomDatePicker                                                       java.lang.IllegalArgumentException: field android.widget.NumberPicker.mSelectionDivider has type android.graphics.drawable.Drawable, got java.lang.Integer

解决办法:long mindate = System.currentTimeMillis() - 1000L;
或者 initialDate = new Date(System.currentTimeMillis() - 1000L);


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Android 控件集合是指在Android开发中,用于构建用户界面的一组预定义控件的集合Android提供了丰富的控件可供开发者使用,包括文本框、按钮、图像视图、列表视图、下拉框等。这些控件可以通过XML布局文件或者Java代码动态创建和配置。 Android 控件集合具有以下特点: 1. 多样性:Android控件集合中包含了丰富的控件种类,满足了不同应用场景下的需求。开发者可以根据具体的界面设计要求选择合适的控件进行使用。 2. 可定制性:Android控件集合提供了丰富的配置属性,开发者可以通过设置这些属性来满足自己的设计需求。同时还可以通过自定义控件继承或覆盖Android原生控件,实现更加个性化的效果。 3. 事件监听:Android控件集合支持事件监听机制,开发者可以为控件添加相应的事件处理器,对用户的交互行为做出响应。比如,可以为按钮控件添加点击事件监听器,实现点击按钮后执行相应的操作。 4. 布局管理:Android控件集合中的控件可以通过各种布局管理器进行灵活的排列和组合。比如,线性布局、相对布局、帧布局等。开发者可以根据需求选择合适的布局管理器,实现想要的页面布局效果。 综上所述,Android控件集合提供了丰富多样的控件供开发者使用,具备较高的可定制性和灵活性,方便开发者构建出各种各样的用户界面。通过合理运用和配置控件集合,可以实现强大的Android应用程序。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值