http://developer.android.com/guide/market/expansion-files.htmlのAPK拡張ファイルを使用しています
コード:
String[] path= getAPKExpansionFiles(this,2,0);
ZipResourceFile expansionFile;
try {
expansionFile = new ZipResourceFile(path[0]);
InputStream fileStream = expansionFile.getInputStream("assets/Tablet/Chester_the_cat/chester_the_cat_2.png");
Bitmap bit=BitmapFactory.decodeStream(fileStream);
iv_new=(ImageView)findViewById(R.id.iv_new);
iv_new.setImageBitmap(bit);
そしてmこの行でこのNullPointerExceptionを取得します
iv_new.setImageBitmap(bit);
XMLでは私のImageViewは:
<ImageView android:id="@+id/iv_new"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>