androidimage
您好,这个是微信的缓存文件,在平时使用微信是看到的图片都存在这个位置中,以方便下一次您需要看的内容中包含这些图片时不用再一次从网络中花费流量下载。这些文件可以删除的,打不开是因为这些图片经过了加密处理,不能直接打开的。
因为你用微信软件产生的缓存 如果你删除了 下次启动微信又会联网下载这些图片
所以一般情况下不见删除~
㈡ 安卓手机刷机界面image 文件夹什么意思 里面的文件都是什么作用
image文件夹是用来存放android启动引导 boot.img 。
boot.img镜像不是普通意义上的文件系统,而是一种特殊的Android定制格式,由boot header,压缩的内核,ramdisk以及second stage loader(可选)组成,可以从mkbootimg.h文件中看到。
介绍一下boot.img文件的作用及修改方式:
boot.img我们通常称之为“内核”,属于系统底层文件,它包含了手机系统软件和硬件相连接的一个渠道,这里包含了相机、cpu、gpu等驱动。
一般来说官方提供的内核相对于第三方的内核是相对稳定的,如果我们发现刷机包里没有boot.img文件,那么刷机完成后系统会使用刷机之前系统的内核,也就是内核保持不便,一般来说内核的升级才是系统真正的升级;内核文件记录了一些系统底层的核心功能和连接硬件驱动的作用,内核的优化能够给系统带来质的飞跃。
就比如HTC M8目前已经升级到了Android 5.0系统,那么我们刷入4.4版本的boot.img会有什么样的后果呢?一般来说这样跨版本刷boot.img会导致无法开的情况,对于大版本之间的升级绿茶强烈建议不要随意刷boot.img文件,boot.img文件不仅仅是和机型相对于的,而且和版本也相对应,绿茶就见过有新手朋友随意乱刷boot.img文件,导致手机无法开机的情况。
boot.img文件是可以修改的,建议在Linux环境下修改,当然也可以使用Windows系统来解压,简单的修改一些参数,但是要做到真正的代码优化,建议还是在Linux环境下进行。
㈢ 怎么样将自己开发的Android应用程序编译到系统Image中
1. 搭建编译环境
编译环境: Ubuntu 10.10
Android版本:Android 2.2
编译过程中可能需要在Ubuntu上安装必要的一些软件,我安装过的包含如下软件,不同的系统可能会有差别:
jdk6(Android官方建议装jdk5,但是我在编译时会遇到java override问题,改用6没有任何问题), bison, lib64z1-dev, libasound2-dev, flex, gperf, libncurses5-dev
2. 应用程序存放目录
SimpleJNI是采用Android NDK和Java编写的程序,包含apk和so库文件,它的源代码在source tree的development/samples/目录下。
实际上package在编译时所放的目录并没有明确限定,编译后apk和so存放的位置是根据目录下Android.mk所指定的编译类型所决定的,例如:
SimpleJNI根目录下的Android.mk中有一行include $(BUILD_PACKAGE),表示将该目录下的模块编译成package,即apk文件,默认存放的位置为/system/app。
SimpleJNI/jni目录下的Android.mk中有一行为include $(BUILD_SHARED_LIBRARY),表示将该目录下的native.cpp编译为共享库文件,即so文件,默认存放的位置为/system/lib
因此,如果我们想要将自己编写的程序编译至image中,只需要将Eclipse下完成的整个工程到source tree下的某个目录即可,我一般习惯放到packages/apps下。
3. 添加Android.mk
完成了上一步,可以知道,Android.mk在编译中起着至关重要的作用,这其实就是Android编译环境中的make file。为了完成我们的工作,需要在源代码中添加Android.mk。添加自己的Android.mk可以仿照SimpleJNI中的Android.mk,稍微修改即可。我们首先看看SimpleJNI目录下的两个Android.mk的内容:
根目录下的Android.mk
TOP_LOCAL_PATH:= $(call my-dir)
# Build activity
LOCAL_PATH:= $(TOP_LOCAL_PATH)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := samples
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := SimpleJNI
LOCAL_JNI_SHARED_LIBRARIES := libsimplejni
LOCAL_PROGUARD_ENABLED := disabled
include $(BUILD_PACKAGE)
# ============================================================
# Also build all of the sub-targets under this one: the shared library.
include $(call all-makefiles-under,$(LOCAL_PATH))
根目录下的Android.mk决定了整个工程编译的配置,其中,
LOCAL_PATH 定义了当前的目录
LOCAL_MUDULE_TAGS 定义了当前模块的类型,编译器在编译时会根据类型的不同有些差别,有些tags的mole甚至不会被编译至系统中。LOCAL_MUDULE_TAGS主要有如下几种:user debug eng tests optional samples shell_ash shell_mksh。optional表示在所有版本的编译条件下都被编译至image中,剩下的表示在该版本中才会被编译只image中,如user表示在user版本下才会被编译至image中。
对于包含LOCAL_PACKAGE_NAME的mk文件,该项默认为optinal,具体可以参看build/core/package.mk。SimpleJNI中定义为samples的具体作用我也不太清楚,为了保险起见,我自己的apk一般定义为optional。
LOCAL_SRC_FILES 定义了编译apk所需要的java代码的目录
LOCAL_PACKAGE_NAME 这里需要改成自己的package的名字
LOCAL_JNI_SHARED_LIBRARIES 定义了要包含的so库文件的名字,如果你的程序没有采用JNI,这行不需要。
LOCAL_PROGUARD_ENABLED 定义了Java开发中的ProGuard压缩方法,主要用来分析压缩程序的,在我自己的应用中我没有加这行。
include $(BUILD_PACKAGE) 这行是build的关键,表示当前java代码build成apk
include $(call all-makefiles-under,$(LOCAL_PATH)) 表示需要build该目录下的子目录的文件,这样编译系统就会在当前目录下的子目录寻找Android.mk来编译so等其它程序。
根据上述所写,创建我自己的Android.mk如下:
TOP_LOCAL_PATH:= $(call my-dir)
# Build activity
LOCAL_PATH:= $(TOP_LOCAL_PATH)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := TestJniApp
LOCAL_JNI_SHARED_LIBRARIES := libtestjniapp
include $(BUILD_PACKAGE)
# ============================================================
# Also build all of the sub-targets under this one: the shared library.
include $(call all-makefiles-under,$(LOCAL_PATH))
看起来很简单吧,基本不需要改动即可。
Jni目录下的Android.mk
由于我们的TestJniApp是用JNI完成的,包含C源代码,因此也需要一个jni目录下的Android.mk。同样首先看看SimpleJNI中jni目录下的Android.mk的内容:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := samples
# This is the target being built.
LOCAL_MODULE:= libsimplejni
# All of the source files that we will compile.
LOCAL_SRC_FILES:= /
native.cpp
# All of the shared libraries we link against.
LOCAL_SHARED_LIBRARIES := /
libutils
# No static libraries.
LOCAL_STATIC_LIBRARIES :=
# Also need the JNI headers.
LOCAL_C_INCLUDES += /
$(JNI_H_INCLUDE)
# No special compiler flags.
LOCAL_CFLAGS +=
# Don't prelink this library. For more efficient code, you may want
# to add this library to the prelink map and set this to true. However,
# it's difficult to do this for applications that are not supplied as
# part of a system image.
LOCAL_PRELINK_MODULE := false
include $(BUILD_SHARED_LIBRARY)
LOCAL_MODULE 当前模块的名字,即编译后的so文件的名字
LOCAL_SRC_FILES 所要编译的文件
LOCAL_SHARED_LIBRARIES, LOCAL_STATIC_LIBRARIES 该模块要链接的动态库和静态库。
LOCAL_C_INCLUDES 要包含的头文件
LOCAL_CFLAGS C语言编译选项
LOCAL_PRELINK_MODULE 定义是否使用prelink工具,它用事先链接代替运行时链接的方法来加速共享库的加载,不仅可以加快起动速度,还可以减少部分内存开销。
经过修改后,我自己的TestJniApp中jni目录下的Android.mk如下:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libtestjniapp
LOCAL_SRC_FILES := com_test_app_Jni.c
LOCAL_C_INCLUDES += $(JNI_H_INCLUDE)
LOCAL_PRELINK_MODULE := false
include $(BUILD_SHARED_LIBRARY)
这里有一点需要注意,如果要将so文件编译入image,必须要修改LOCAL_MODULE_TAGS,将原有的值samples修改为user,或者可以直接删掉 。删掉是因为对于包含LOCAL_MODULE的mk文件,如果没有指定LOCAL_MODULE_TAGS,该项默认为user,而只有定义为user的情况下,才会将so文件编译入image,具体定义可以参看build/core/base_rule.mk。
4. 修改/bulid/target/proct/generic.mk 把工程编译到系统中
至此,还有最后一部工作。为了将工程编译进入image,还需要在/bulid/target/proct/generic.mk文件中将package name添加进去
PRODUCT_PACKAGES := /
AccountAndSyncSettings /
CarHome /
DeskClock /
……
SyncProvider /
TestJniApp
完成上面这些步骤后,在source tree根目录下编译image就可以了。
㈣ 安卓手机image文件夹到底在哪,如何找出来(用什么软件)
进手机相册随便找张自己拍的图片,查看详细信息,就在那个文件夹里,随便用什么软件都能打开,安卓不是自带“文件管理器”吗?还有连接电脑也行,你就按着那个详细信息找,望采纳
㈤ android怎么自定imagebiew的组合控件
1.先定义该组合的XML文件布局
1 <?xml version="1.0" encoding="utf-8"?>
2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="wrap_content"
4 android:layout_height="wrap_content"
5 android:orientation="horizontal" >
6 <LinearLayout
7 android:layout_width="wrap_content"
8 android:layout_height="wrap_content"
9 android:orientation="vertical"
10 >
11 <ImageView
12 android:id="@+id/touxiang"
13 android:layout_width="80dp"
14 android:layout_height="80dp"
15 android:maxWidth="80dp"
16 android:maxHeight="80dp"
17 >
18 </ImageView>
19 <ImageView
20 android:id="@+id/blood"
21 android:layout_width="wrap_content"
22 android:layout_height="wrap_content"
23 android:maxWidth="80dp"
24 android:maxHeight="20dp"
25 >
26 </ImageView>
27
28 </LinearLayout>
29
30 <LinearLayout
31 android:layout_width="wrap_content"
32 android:layout_height="wrap_content"
33 android:orientation="vertical"
34 android:layout_gravity="center_vertical"
35 >
36 <TextView
37 android:layout_width="wrap_content"
38 android:layout_height="wrap_content"
39 android:text="武器"
40 ></TextView>
41 <TextView
42 android:layout_width="wrap_content"
43 android:layout_height="wrap_content"
44 android:text="防具"
45 ></TextView>
46 <TextView
47 android:layout_width="wrap_content"
48 android:layout_height="wrap_content"
49 android:text="+1马"
50 ></TextView>
51 <TextView
52 android:layout_width="wrap_content"
53 android:layout_height="wrap_content"
54 android:text="-1马"
55 ></TextView>
56 </LinearLayout>
57
58 </LinearLayout>
2.自定义一个继承布局的类
public class GeneralFrame extends LinearLayout {
ImageView general;
ImageView blood;
TextView wuqi;
TextView fangju;
TextView jiayima;
TextView jianyima;
public GeneralFrame(Context context) {
//super(context);
// TODO Auto-generated constructor stub
this(context,null);
}
public GeneralFrame(Context context, AttributeSet attrs) {
super(context, attrs);
// TODO Auto-generated constructor stub
//在构造函数中将Xml中定义的布局解析出来。
LayoutInflater.from(context).inflate(R.layout.generalframe, this, true);
general=(ImageView)findViewById(R.id.touxiang);
blood=(ImageView)findViewById(R.id.blood);
blood.setImageResource(R.drawable.blood);
//wuqi=(TextView)findViewById(R.id
}
可在XML文件里调用该类
< com.layouts.uitest.GeneralFrame
android:layout_height="wrap_content"
android:layout_width="wrap_content"
/>
也可以在代码中动态添加该类
GeneralFrame general=new GeneralFrame(this);
general.setGeneralImage(R.drawable.diaochan);
linear2.addView(general);
自定义View.
自定义类继承View
public class MyView extends View
{
public MyView (Context c,AttributeSet set)
{
}
@Override
public void onDraw(Canvas canvas)
{
}
}
调用方法同自定义控件一样。
自定义View的构造方法一定要选中 public MyView (Context c,AttributeSet set),系统会回调该构造方法
㈥ Android的ImageBottom如何判断添加按下的图片,一个变亮一个变暗
可以使用selector,需要两张图片,默认的时候显示一张比较亮的图片,android:state_pressed="true"时,android:drawable属性给个比较暗的图片。
㈦ android里面byte和image的相互转换怎么做
Bitmap bitmap = view.getDrawingCache();
bos = new ByteArrayOutputStream();
bitmap.compress(CompressFormat.JPEG,100,bos);
补充内容 (2011-3-1 10:51):
byte[] b = bos.toByteArray();
㈧ android中imageButtton中图片设置问题
android:src="@drawable/imagebuttonlayout">
改成
android:background="@drawable/imagebuttonstate">
-----------------------------
"background"好像拼错了
-----------------------
<item android:drawable="@drawable/button_normal" /> 默认image
<item android:state_pressed="true"
android:drawable="@drawable/button_pressed" />按下image
<item android:state_pressed="false"
android:drawable="@drawable/button_unPressed" />松开image
<item android:state_focused="true" android:drawable="@drawable/button_focused" />得到焦点时image
<item android:state_focused="false" android:drawable="@drawable/button_focused" />失去焦点时image
㈨ Android Image下分隔两地会报错怎么办我在主函数中声明的image在子函数中就不能使用
变量声明在函数内部了,所以这个对象的有效域只在其所属的一对大括号内,离开这个方法就无法继续访问了。解决方法有几种:
方法1:
声明为这个类中的域,而非函数内的一个变量。
代码如下:
private ImageView image1 = null;
protected void func1() {
image1 = ...;
}
protected void func2() {
image1.set...();
}
方法2:
作为参数传给函数2。
代码如下:
protected void func1() {
ImageView image1 = ...;
func2(image1);
}
protected void func2(ImageView image) {
image.set...();
}