Android Studio 1.4をアップデートすると(メモ)

Android Studio 1.4をアップデートしたところ


warning: Ignoring InnerClasses attribute for an anonymous inner class
http://build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/res/values-v21/values-v21.xml

とか出るようになって、いろいろな対策を入れてみたけど、Amazon Kindle Fireで全く動かなくなった。

compileSdkVersion 22
buildToolsVersion “22.0.1”
にして
multiDexEnabled true
compile ‘com.android.support:multidex:1.0.0’

を追加するとかの対策ですね。

でも、おかしい。そもそも22.2.0なんか使ってない。
じゃ、ライブラリやわ。ライブラリの中で変化した可能性のあるのはどれ?

これ。絶対これ。
compile ‘com.google.android.gms:play-services:+’

じゃ、必要なのだけにしてみる
compile ‘com.google.android.gms:play-services-ads:+’
compile ‘com.google.android.gms:play-services-gcm:+’
compile ‘com.google.android.gms:play-services-analytics:+’

コンパイル通る。デバッグモードでも起動する。

おそらく、このサービス以外の中に「appcompat-v7/22.2.0」を使ってるのがいるようですね。

AndEngineメモ

かなり手こずったのでメモ
ストレージのファイルを利用してAndEngineのテクスチャとする方法

Sprite base = getBaseActivity().getResourceUtil()
				.getSpriteFromFile(getBaseActivity().getFilesDir() + "/background.png");
		attachChild(base);
public Sprite getSpriteFromFile(String fileName) {
	File imageFile = new File(fileName);
	FileInputStream imageFis = null;
	try {
		imageFis = new FileInputStream(imageFile);
	} catch (FileNotFoundException e) {
		e.printStackTrace();
	}
	Bitmap bm = BitmapFactory.decodeStream(imageFis);
	BitmapTextureAtlas bta = new BitmapTextureAtlas(
			gameActivity.getTextureManager(),
			getTwoPowerSize(bm.getWidth()),
			getTwoPowerSize(bm.getHeight()),
			TextureOptions.BILINEAR_PREMULTIPLYALPHA);
	gameActivity.getEngine().getTextureManager().loadTexture(bta);

	FileBitmapTextureAtlasSource fileTextureSource = FileBitmapTextureAtlasSource.create(imageFile);
	TiledTextureRegion btr = BitmapTextureAtlasTextureRegionFactory.createTiledFromSource(bta, fileTextureSource, 0, 0, 1, 1);

 
	Sprite s = new Sprite(0, 0, btr,
			gameActivity.getVertexBufferObjectManager());
	s.setBlendFunction(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);

 	return s;
}

メモ

メモ:Windows Phoneでisolated strageへデータを保存して呼び出す時、なぜかファイル名にアンダーバーを含むとパラメータが違いますとでてアクセスできなかった。仕様なのかな?

メモ〜

今日わかったこと。T-01Cはアプリ内課金への対応に不具合がある可能性があります。
一部のロットかすべてのロットかはわかりませんが
 ・ACTION_PURCHASE_STATE_CHANGED
 ・ACTION_RESPONSE_CODE
の情報がなぜか届きません。
情報が届かないためアプリ側では対応できません。
端末が正常に情報を送るようにメーカーが対応するのを祈りましょう。