2013-09-21 4 views
2

나는 apk가 80Mb이므로 Google Play 스토어에서 업로드 할 수 없습니다. 내가 많이 봤 거든 발견 .obb 파일을 기본 확장 파일로 만들 수 있습니다.jobb 도구를 사용하여 주 APK 확장 파일로 .obb 파일을 만드는 방법은 무엇입니까?

또한 .obb 파일을 sdk > tools > jobb.bat 안에있는 jobb tool을 사용하여 만들 수 있지만 불행히도 시작 직후에 닫습니다.

그래서 나는 무엇인가 놓치고 있습니까?

+0

는'.obb' 태그를 생성 중지하십시오 사용 ZipHelper.java를 사용할 필요가 없습니다. .obb 파일은 이미'apk-expansion-files' 태그 아래에 있습니다.이 태그는 이미 여러분의 질문에 있습니다. – Charles

답변

1

은 내가 봤 우리는 0 % 압축 우편을 만드는 방법 http://developer.android.com/google/play/expansion-files.html

Tip: If you're packaging media files into a ZIP, you can use media playback calls on the files with offset and length controls (such as MediaPlayer.setDataSource() and SoundPool.load()) without the need to unpack your ZIP. In order for this to work, you must not perform additional compression on the media files when creating the ZIP packages. For example, when using the zip tool, you should use the -n option to specify the file suffixes that should not be compressed: zip -n .mp4;.ogg main_expansion media_files

또는 에 대한 언급은 그 0% (No compression)와 .ZIP 확인해야 마땅한 것을 발견했다 winrar를 사용하고 있습니까?

enter image description here

여기 그래서 우리는 Play 스토어에서이 우편을 업로드해야한다 압축 방법을

를 참조하십시오.

그래서 당신은

는 단지

ZipResourceFile expansionFile=null; 

      try { 
       expansionFile = APKExpansionSupport.getAPKExpansionZipFile(getApplicationContext(),3,0); 

        AssetFileDescriptor fd = expansionFile.getAssetFileDescriptor("test.mp4"); 
        MediaPlayer mPlayer = new MediaPlayer(); 
        mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); 
        mPlayer.setDataSource(fd.getFileDescriptor(),fd.getStartOffset(),fd.getLength()); 
        mPlayer.prepare(); 
        mPlayer.start(); 

      } catch (IOException e) { 
       // TODO Auto-generated catch block 
       e.printStackTrace(); 
      } 
+0

이것은 자신의 * 질문에 대한 대답의 좋은 예입니다. – PulseJet

+0

Mac을 사용하여 obb 파일을 만들면 obb 파일을 만들 수 있습니까? 주 자산 폴더에 둘 이상의 폴더가 있고 zip 명령을 사용하여 모든 폴더를 포함하는 방법을 모르겠습니다. –

3

보십시오이

$ jobb -d/온도/자산/-o 새로운 OBB - file.obb -k 비밀 키 -pn com.my.app.package -pv 11

경우

-d <directory> : Set the input directory for creating an OBB file. 
-o <filename> : Specify the filename for the OBB file. 
-k <key>  : Specify a password for encrypting a new OBB file 
-pn <package> : Specify the package name for the application that mounts the OBB file,    which corresponds to the package value specified in your application's manifest. 
-pv <version> : Set the minimum version for the application that can mount the OBB file, which corresponds to the android:versionCode value in your application's manifest. 

이 명령어를 사용해보십시오.

체크 다음 링크를 http://developer.android.com/tools/help/jobb.html

+0

답장을 보내 주셔서 감사합니다.하지만이 쿠맨드를 어디에 써야할까요? 내 jobb 도구는 시작 직후 바로 닫힙니다. –

+0

작업 b 도구를 클릭하지 마십시오. 콘솔로 가서이 명령을 실행하십시오. 환경 변수가 안드로이드 SDK의 도구 폴더로 설정되어 있는지 확인하십시오. – Nikhil

+0

잘 시도하고 있습니다. –