数码管码表

共阳
[0xC0 , 0xF9 , 0xA4 , 0xB0 , 0x99 , 0x92 , 0x82 , 0xF8 , 0x80 , 0x90 , 0x88 , 0x83 , 0xC6 , 0xA1 , 0x86 , 0x8E , 0xFF]
//0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 无显示
共阴
[0x3f , 0x06 , 0x5b , 0x4f , 0x66 , 0x6d , 0x7d , 0x07 , 0x7f , 0x6f , 0x77 , 0x7c , 0x39 , 0x5e , 0x79 , 0x71 , 0x00]
//0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 无显示

Gradle配置国内镜像

全局配置,对所有项目生效,在~/.gradle/下创建init.gradle文件

allprojects{
    repositories {
        def ALIYUN_REPOSITORY_URL = 'http://maven.aliyun.com/nexus/content/groups/public'
        def ALIYUN_JCENTER_URL = 'http://maven.aliyun.com/nexus/content/repositories/jcenter'
        all { ArtifactRepository repo ->
            if(repo instanceof MavenArtifactRepository){
                def url = repo.url.toString()
                if (url.startsWith('https://repo1.maven.org/maven2')) {
                    project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_REPOSITORY_URL."
                    remove repo
                }
                if (url.startsWith('https://jcenter.bintray.com/')) {
                    project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_JCENTER_URL."
                    remove repo
                }
            }
        }
        maven {
            url ALIYUN_REPOSITORY_URL
            url ALIYUN_JCENTER_URL
        }
    }
}

react native Unknown argument type ‘__attribute__’ in method

找到myproject/node_modules/react-native/React/Base/RCTModuleMethod.mm. 【或者(.m)】文件

修改static BOOL RCTParseUnused 方法如下:

static BOOL RCTParseUnused(const char **input)
{
return RCTReadString(input, “unused”) || RCTReadString(input, “__attribute((unused))”) ||
RCTReadString(input, “attribute((unused))”);
}

重新编译

android studio unsupported modules detected

首先是出现如下情况:
unsupported modules detected Compilation is not supported for following modules: app. Unfortunately you can’t have non-Gradle Java modules and Android-Gradle modules in one project

然后项目正下方一直出现加载:indexing paused due to batch update

自从更新到android studio 3.2之后,首次打开项目出现错误:indexing paused due to batch update(由于批量更新而暂停的索引),个人猜想可能是第一种情况导致的吧。然后网上查找到了一些方法如下:

1、关闭Android Studio ,去项目根目录删除.idea文件,重启AS搞定
2、File -> Invalidate Caches / Restart -> Invalidate Caches & Restart.
3、File -> Sync Project With Gradle Files

当时我试过后面两种不行,第一种就OK。