问题描述
我已经创建了一个AS3移动应用程序,并通过闪存CS6成功导出。
在此的apk我包括我的视频文件(将成为Android平板一presentation)。仅.flvs的总大小为64MB。
当我试图上传到谷歌打我得到有关文件的大小(预期)的警告是> 50MB
我花两个小时试图找到一个解决方法,包括使用的 jobb.bat zipalign.bat ,把文件放到主要的格式.1.obb 和许多其他的选择。
在谷歌网站似乎认为我使用Eclipse(这我不是我用的Flash CS6),但我尝试了所有这些工具无论如何,但取得了零的结果。
我曾尝试
-
但是似乎极其复杂,假设我有蚀。我甚至试图导入了Android的SDK \\演员\\谷歌\\ play_apk_expansion到Flash Builder,而不是正确的项目延期。
我找遍了整个堆栈溢出诸如文章:
【如何扩展一个文件附加到AS3 / AIR应用程序
- 但是由于还没有回应
AS3 / AIR谷歌播放应用程序ID和扩展文件访问
- 但是没有明确的答案,我甚至不知道如何得到摆在首位的.obb文件
- 但是我没有亚马逊斗帐户。也不知过了共享存储是机器人。
Steps创建APK扩展文件
- 但是使用谷歌的旧版本(我没有添加额外的按钮),这也并非是从Flash AS3项目,并再次依赖于Eclipse的。
- 但是此人已经有.obb文件(如何?)。
正如你可以看到我已经尝试了很多不同的方式,但我不能简单的创建扩展方式。
因此,在短期;
剂量任何人不得不对如何上传.apk文件一个明确的一步一步的技术
在Flash CS6是&GT创建的; 50MB到谷歌玩?
您不必prepare OBB - 无需使用JOBB
。使用扩展文件的AIR应用程序最简单的方法就是做一个小的SWF为preloader,并用它作为主要的apk和其他SWF文件(将加载)的所有大数据存储在OBB文件。
这样:
preloader.swf - > APK
app.swf - > OBB
在这种情况下,你不必做一个OBB文件,只需上传新的apk到Google Play和扩展文件节变无扩展文件'上传APK后上传新文件,然后选择您的应用程序.swf文件。谷歌将改变的SWF OBB你不需要这么做。
当您上传您的第一个APK一个新的应用程序,你将无法添加一个OBB文件。你必须只APK上传,然后添加APK的新版本 - 这使OBB选项
现在,你必须在你的preloader类从APK加载app.swf。我使用的是类似的东西:
私人VAR mainVersion:字符串=1000001;
私人VAR的路径:字符串=机器人/ OBB / com.your.app.id
私人变种文件名:字符串=主。 + mainVersion +.com.your.app.id.obb; //补丁第二OBB
私人var文件:文件;
私人VAR FILESTREAM:的FileStream;
私人VAR字节:的ByteArray;
私人VAR applicationLoader:装载机;公共函数应用()
{
文件= File.documentsDirectory.resolvePath(路径+/+文件名); 如果(file.exists)
{
loadSwf();
}
}私有函数loadSwf():无效
{
FILESTREAM =新的FileStream();
fileStream.open(文件,FileMode.READ);
字节=新的ByteArray();
fileStream.readBytes(字节);
fileStream.close(); VAR续:的LoaderContext =新的LoaderContext();
cont.allow codeImport = TRUE; applicationLoader =新的Loader();
applicationLoader.contentLoaderInfo.addEventListener(引发Event.COMPLETE,handleAppLoaded);
applicationLoader.contentLoaderInfo.addEventListener(使用ProgressEvent.PROGRESS,handleProgress); applicationLoader.loadBytes(字节,续)
}私有函数handleProgress(E:ProgressEvent):无效
{
跟踪(INT(100 * e.bytesLoaded / e.bytesTotal))
//只需添加进度栏,如果你想
}私有函数handleAppLoaded(五:事件):无效
{
的addChild(applicationLoader);
}
和您可以在preloader添加一个启动画面;)
如果你必须更新你必须重新编译还与APK新mainVersion OBB文件
如果您ant使用压缩文件,而不是SWF,你必须上传一个zip文件,并在preloader你必须处理它 - 解包并解压,从文件夹中使用的数据
I have created an AS3 mobile app and exported successfully through flash CS6.
In this .apk I have included my video files (going to be a presentation for Android Tablet). The total size of the .flvs alone is 64mb.
When I tried to upload to Google play I got the (expected) warning about the file size being >50mb.
I have spend two hours trying to find a fix, including using the jobb.bat , zipalign.bat , putting the files into the format of main.1.obb and many other options.
The Google website seems to think that I am using Eclipse (which I’m not I used Flash CS6), but I tried all those tools anyway, but yielded zero results.
I have triedhttp://developer.android.com/google/play/expansion-files.html -
But seems extremely complex and assumes I have eclipse. I even tried to import the "android-sdk\extras\google\play_apk_expansion" into Flash builder, but is not the right project extension.
I looked all over Stack Overflow to articles such as :
[How to attach a expansion file to an AS3/AIR application
– But no response as of yet
AS3 / AIR Google Play application id and expansion files access
- But no clear answer, and I don’t even know how this got the .obb file in the first place.
APK 50meg+ Expansion Packs and Flash
-But I don’t have a Amazon bucket account. Also not sure what android shared storage is.
Steps to create APK expansion file
– But is using older version of google ( I don’t have the "Add Extra Button" ) Also this is not from a Flash As3 project , and again relies on Eclipse.
APK 50meg+ Expansion Packs and Flash
-But this person already has the .obb file (HOW ?).
As you can see I have tried many different ways, but I can’t simple create the expansion way.
So in Short ;
Dose anyone one have a clear cut step by step technique on how to upload an .apk
created in Flash CS6 that is >50MB to Google Play ?
You don't have to prepare obb - no need to use jobb.
The easiest way to use expansion file for air app is to make one small swf as preloader and use it as a main apk and the other swf file (that will be loaded) with all big data is stored in obb file.
so:
preloader.swf -> apk
app.swf -> obb
In this scenario you don't have to make an obb file, you just upload new apk to google play and after uploading apk in expansion file section change 'no expansion file' to 'upload a new file' and select your app.swf file. Google will change swf to obb you don't need to do it.
When you upload your first apk for a new app you won't be able to add an obb file. You have to upload just apk and then add new version of apk - this enables obb option.
Now you have to load app.swf from apk in your preloader class. I'm using something like that:
private var mainVersion:String="1000001";
private var path:String = "Android/obb/com.your.app.id";
private var filename:String= "main." + mainVersion + ".com.your.app.id.obb";//patch for second obb
private var file:File;
private var fileStream:FileStream;
private var bytes:ByteArray;
private var applicationLoader:Loader;
public function App()
{
file = File.documentsDirectory.resolvePath(path + "/" + filename);
if (file.exists)
{
loadSwf();
}
}
private function loadSwf():void
{
fileStream = new FileStream();
fileStream.open(file, FileMode.READ);
bytes = new ByteArray();
fileStream.readBytes(bytes);
fileStream.close();
var cont:LoaderContext = new LoaderContext();
cont.allowCodeImport = true;
applicationLoader = new Loader();
applicationLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleAppLoaded);
applicationLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, handleProgress);
applicationLoader.loadBytes(bytes, cont);
}
private function handleProgress(e:ProgressEvent):void
{
trace(int(100 * e.bytesLoaded / e.bytesTotal))
//just add progress bar if you want
}
private function handleAppLoaded(e:Event):void
{
addChild(applicationLoader);
}
And you can add a splash screen in preloader ;)
If you have to update obb file you have to also recompile apk with new mainVersion
If you ant to use zip file instead of swf, you have to upload a zip file, and in preloader you have to process it - unpack and use data from unpacked folder.
这篇关于对于Android的AS3 AIR应用程序的Flash CS6创建扩展文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!