在我的 Haskell 项目中stack run
,它显示以下内容,但仍在运行。这是什么警告?我怎样才能摆脱它?
Stack has not been tested with GHC versions above 8.6, and using 8.8.2, this may fail
Stack has not been tested with Cabal versions above 2.4, but version 3.0.1.0 was found, this may fail
Run Code Online (Sandbox Code Playgroud) 我有一个项目,其中compileSdkVersion
和 targetSdkVersion
是25.当我尝试将版本升级到26时,我收到以下错误:
Could not find com.android.support:support-annotations:26.1.0.
Required by:
project :app
project :app > com.android.support:support-compat:26.1.0
Please install the Android Support Repository from the Android SDK Manager.
Open Android SDK Manager
Run Code Online (Sandbox Code Playgroud)
我打开了Android SDK Manager,但找不到要安装的Android Support Repository.
我该如何解决这个问题?
这是我的应用程序和项目gradle文件:
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'io.fabric'
android {
compileSdkVersion 26
buildToolsVersion '26.0.3'
defaultConfig {
//my default config
}
signingConfigs {
config {
//config
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
debug …
Run Code Online (Sandbox Code Playgroud) 我的JSON响应(来自服务器)具有作为JSON对象的属性,但是我不想解析所有属性,而是希望将其中一些保留为JSON编码的字符串。
例如:
{
"date": "23-03-2019",
"changed": true,
"data": {
"login": "9999999",
"loginFormatted": "999 99 99",
}
}
Run Code Online (Sandbox Code Playgroud)
在这里,我想将“数据”属性解析为字符串。我该怎么做?(我正在使用Retrofit v2.4.0和Moshi v1.5.0)
我的响应模型班:
public class Response {
@Json(name = "date")
public long date;
@Json(name = "changed")
public boolean changed;
@Json(name = "data")
public String data;
}
Run Code Online (Sandbox Code Playgroud) onCreateView
片段的内部方法:
swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
refresh();
}
});
Run Code Online (Sandbox Code Playgroud)
我的refresh()
方法是这样的:
public void {
//some action
swipeRefreshLayout.setRefreshing(false);
}
Run Code Online (Sandbox Code Playgroud)
但有时swipeRefresLayout
并没有停止刷新。当我调试代码时,它甚至不会执行refresh()
。
我该如何解决?
编辑: 这里更清晰的代码:
public class VisaCardsFragment extends Fragment {
@Bind(R.id.swipe_refresh_layout)
SwipeRefreshLayout swipeRefreshLayout;
@Bind(R.id.recycler_view_visa_cards)
RecyclerView recyclerViewVisaCards;
@Bind(R.id.text_view_message)
TextView textViewMessage;
private List<Card> cards;
private List<VisaCard> visaCards;
private VisaCardsAdapter adapter;
public VisaCardsFragment() {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_visa_cards, container, false);
setHasOptionsMenu(true);
ButterKnife.bind(this, view);
visaCards = …
Run Code Online (Sandbox Code Playgroud) 如何编写与具有以下属性的字符串匹配的正则表达式?:
123
或123.4
或123.56
)。.12
)。000.12
,只能是0.12
)一起写入。