MyApplication
2016-06-08 17:11
405 查看
在AndroidManifest.xml文件中:
新增android:name=".activity.MyApplication"(以实际路径为准)
MyApplication.java
新增android:name=".activity.MyApplication"(以实际路径为准)
<application android:name=".activity.MyApplication" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/Theme.AppCompat.NoActionBar" >
MyApplication.java
package com.hxsmart.appstore.activity; import android.app.Application; import com.yolanda.nohttp.NoHttp; /** * Created by llbt on 2016/4/22. */ public class MyApplication extends Application { private static MyApplication instance = null; public static MyApplication getInstance() { return instance; } @Override public void onCreate() { super.onCreate(); instance = this; } }
相关文章推荐
- Android App中的GridView网格布局使用指南
- Android之GLSurfaceView立方体各面不同图片纹理测试代码2
- iOS应用崩溃日志揭秘
- AppStore提交App被拒原因及翻译
- sublime中的cocos-js代码提示
- 【Android】29、常见控件的使用方法——EditText
- Android透明通知栏
- Android高效加载大图、多图解决方案,有效避免程序OOM
- Android NDK日志符号化 查找crash原因
- Fast R-CNN: Fast Region-based Convolutional Networks for object detection
- Android开发之AIDL实现远程服务进程通信(IPC)
- Swift
- Android中GLSurfaceView截图
- recylerview的使用
- Android apk dex与odex
- swift中变量的get和set
- android CoordinatorLayout使用
- 文章标题
- Android之JNI NDK错误 No JNI_OnLoad found in /data/data/
- android权限大全