小编mle*_*kiy的帖子

支持库中的Fragment中的getContext和getActivity有什么不同?

什么是之间的不同getContext(),并getActivity()Fragment支持库?

他们总是返回同一个对象吗?(与当前片段相关的活动)

android

54
推荐指数
2
解决办法
3万
查看次数

如何在android项目中使用@WorkerThread注释?

在我使用某种方式在非ui线程(AsyncTask,Loader等)中调用代码之前.但是现在我尝试使用@WorkerThread注释方法,它调用了一些网络请求

@WorkerThread
    public void downloadInFile(final String url, final String rootDirectory, final OnFinishLoadAudioInFile onFinishLoadAudioInFile,
                               final OnUpdateLoadAudio onUpdateLoadAudio) {
        final String fileName = URLUtil.guessFileName(url,  null, null);
        downloadFile(url, rootDirectory + File.pathSeparator + fileName, onFinishLoadAudioInFile, onUpdateLoadAudio);
    }
Run Code Online (Sandbox Code Playgroud)

,并有android.os.NetworkOnMainThreadException.如何@WorkerThread正确使用注释?

android android-support-library

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

“apply plugin: 'com.google.gms.google-services' ”这一行应该位于底部吗?

这行重要吗:apply plugin: 'com.google.gms.google-services' 应该位于底部吗?

它来自 firebase 页面,其中包含如何将 firebase 添加到您的 Android 应用程序的说明 它来自 firebase 页面,其中包含如何将 firebase 添加到您的 Android 应用程序的说明

android firebase

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