zoukankan      html  css  js  c++  java
  • Android工程中javax annotation Nullable找不到的替代方案

    我们在某些Android开源库中会遇到下面的引用找不到的问题:
    import javax.annotation.Nonnull;
    import javax.annotation.Nullable;
     
    其实Android实现了javax的类似注解,可以使用下面的引用替换:
    import android.support.annotation.NonNull;
    import android.support.annotation.Nullable;
     
    当然,后者需要引入库的声明:
    dependencies {
        compile 'com.android.support:support-annotations:21.0.2'
    }

  • 相关阅读:
    How Many Answers Are Wrong
    Agri-Net —poj1258
    食物链
    A Bug's Life
    畅通工程
    Shortest path of the king
    Alex and Number
    KMP
    快速幂
    0x04
  • 原文地址:https://www.cnblogs.com/zhujiabin/p/10553295.html
Copyright © 2011-2022 走看看