You see, I've been programming a long-time game with Libgdx, I always used gradlew to install an apk debug and try it on my android, the thing is that I have it finished, it weighs a lot, and I test it with gradlew on my cellphone, but the difference is that now it doesn't run, it doesn't run on android but it does in the desktop. Why? I don't know what is wrong, I didn't put code because it is a lot and as I said nothing is wrong, just do not run on Android. -I use eclipse. The worst part is that I don't know what I did, because before it ran me on android.
manifest:
<?xml version="1.0" encoding="utf-8"?>
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="20" />
<application android:name="android.support.multidex.MultiDexApplication>
<uses-library android:name="android.test.runner" />
</application>
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.cubopez.es"
android:handleProfiling="false"
android:functionalTest="false"
android:label="Tests for com.cubopez.es"/>
</manifest>
(This didn't work before I tried to add the Multidex)
Error message (I tried to delete the mp3 asset that provocated that error, but it failed again with other mp3 asset):
E/AndroidRuntime: FATAL EXCEPTION: GLThread 22480Process: com.cubopez.blast, PID: 31220Theme: themes:{default=overlay:com.zui.theme.XuiSkin.blue, iconPack:system, fontPkg:system, com.android.systemui=overlay:system, com.android.systemui.navbar=overlay:system}com.badlogic.gdx.utils.GdxRuntimeException: com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load dependencies of asset: winter.mp3 at com.badlogic.gdx.assets.AssetManager.handleTaskError(AssetManager.java:582) at com.badlogic.gdx.assets.AssetManager.update(AssetManager.java:383) at com.badlogic.gdx.assets.AssetManager.finishLoading(AssetManager.java:404) at com.cubopez.blast.MainGame.create(MainGame.java:129) at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:311) at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1519) at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load dependencies of asset: winter.mp3 at com.badlogic.gdx.assets.AssetLoadingTask.handleAsyncLoader(AssetLoadingTask.java:121) at com.badlogic.gdx.assets.AssetLoadingTask.update(AssetLoadingTask.java:90) at com.badlogic.gdx.assets.AssetManager.updateTask(AssetManager.java:507) at com.badlogic.gdx.assets.AssetManager.update(AssetManager.java:381) at com.badlogic.gdx.assets.AssetManager.finishLoading(AssetManager.java:404) at com.cubopez.blast.MainGame.create(MainGame.java:129) at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:311) at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1519) at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: com.badlogic.gdx.utils.GdxRuntimeException: Error loading audio file: winter.mp3Note: Internal audio files must be placed in the assets directory. at com.badlogic.gdx.utils.async.AsyncResult.get(AsyncResult.java:46) at com.badlogic.gdx.assets.AssetLoadingTask.handleAsyncLoader(AssetLoadingTask.java:119) ... 8 more
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Error loading audio file: winter.mp3Note: Internal audio files must be placed in the assets directory. at com.badlogic.gdx.backends.android.AndroidAudio.newMusic(AndroidAudio.java:120) at com.badlogic.gdx.assets.loaders.MusicLoader.loadAsync(MusicLoader.java:48) at com.badlogic.gdx.assets.loaders.MusicLoader.loadAsync(MusicLoader.java:29) at com.badlogic.gdx.assets.AssetLoadingTask.call(AssetLoadingTask.java:70) at com.badlogic.gdx.assets.AssetLoadingTask.call(AssetLoadingTask.java:34) at com.badlogic.gdx.utils.async.AsyncExecutor$2.call(AsyncExecutor.java:58) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)
Caused by: java.io.FileNotFoundException: winter.mp3 at android.content.res.AssetManager.openAssetFd(Native Method) at android.content.res.AssetManager.openFd(AssetManager.java:357) at com.badlogic.gdx.backends.android.AndroidFileHandle.getAssetFileDescriptor(AndroidFileHandle.java:237) at com.badlogic.gdx.backends.android.AndroidAudio.newMusic(AndroidAudio.java:110) at com.badlogic.gdx.assets.loaders.MusicLoader.loadAsync(MusicLoader.java:48) at com.badlogic.gdx.assets.loaders.MusicLoader.loadAsync(MusicLoader.java:29) at com.badlogic.gdx.assets.AssetLoadingTask.call(AssetLoadingTask.java:70) at com.badlogic.gdx.assets.AssetLoadingTask.call(AssetLoadingTask.java:34) at com.badlogic.gdx.utils.async.AsyncExecutor$2.call(AsyncExecutor.java:58) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)
Part of the code that charges the assets:
public class MainGame extends Game {
private AssetManager manager;
private BaseScreen menu, levels, game;
protected int Height, Width;
private boolean isLoaded = false;
private Texture pez;
@Override
public void create () {
manager = new AssetManager();
manager.load("cubopez.png", Texture.class);
manager.load("menu.png", Texture.class);
manager.load("levels.png", Texture.class);
manager.load("playButton.png", Texture.class);
manager.load("background1.png", Texture.class);
manager.load("background2.png", Texture.class);
manager.load("background3.png", Texture.class);
manager.load("winscreen.png", Texture.class);
manager.load("cubopezgrade1.png", Texture.class);
manager.load("cubopezgrade2.png", Texture.class);
manager.load("cubopezgrade3.png", Texture.class);
manager.load("cubopezgrade4.png", Texture.class);
manager.load("cubopezgrade5.png", Texture.class);
manager.load("cubopezgrade6.png", Texture.class);
manager.load("cubopezgrade7.png", Texture.class);
manager.load("supercubopez.png", Texture.class);
manager.load("supercubopez1.png", Texture.class);
manager.load("supercubopez2.png", Texture.class);
manager.load("supercubopez3.png", Texture.class);
manager.load("supercubopez4.png", Texture.class);
manager.load("supercubopez5.png", Texture.class);
manager.load("supercubopez6.png", Texture.class);
manager.load("supercubopez7.png", Texture.class);
manager.load("supercubopez8.png", Texture.class);
manager.load("rubik8bits.png", Texture.class);
manager.load("alga1.png", Texture.class);
manager.load("alga2.png", Texture.class);
manager.load("alga3.png", Texture.class);
manager.load("alga4.png", Texture.class);
manager.load("mar.png", Texture.class);
manager.load("cementerio.png", Texture.class);
manager.load("nieve.png", Texture.class);
manager.load("martick.png", Texture.class);
manager.load("cementeriotick.png", Texture.class);
manager.load("nievetick.png", Texture.class);
manager.load("mistery.png", Texture.class);
manager.load("barradavidavacia.png", Texture.class);
manager.load("barradavida1.png", Texture.class);
manager.load("barradavida2.png", Texture.class);
manager.load("barradavida3.png", Texture.class);
manager.load("barradavida4.png", Texture.class);
manager.load("barradavida5.png", Texture.class);
manager.load("barradavida6.png", Texture.class);
manager.load("barradavida7.png", Texture.class);
manager.load("barradavida8.png", Texture.class);
manager.load("barradavida9.png", Texture.class);
manager.load("barradavida10.png", Texture.class);
manager.load("barradavidavaciaboss.png", Texture.class);
manager.load("barradavida1boss.png", Texture.class);
manager.load("barradavida2boss.png", Texture.class);
manager.load("barradavida3boss.png", Texture.class);
manager.load("barradavida4boss.png", Texture.class);
manager.load("barradavida5boss.png", Texture.class);
manager.load("barradavida6boss.png", Texture.class);
manager.load("barradavida7boss.png", Texture.class);
manager.load("barradavida8boss.png", Texture.class);
manager.load("barradavida9boss.png", Texture.class);
manager.load("barradavida10boss.png", Texture.class);
manager.load("rubik8bitsscrambled.png", Texture.class);
manager.load("cubopezmuerto.png", Texture.class);
manager.load("neodimio.png", Texture.class);
manager.load("skeltoncubopez.png", Texture.class);
manager.load("gameover.png", Texture.class);
manager.load("ghostfish.png", Texture.class);
manager.load("titulo.png", Texture.class);
manager.load("tiburon.png", Texture.class);
manager.load("tiburon2.png", Texture.class);
manager.load("nado.ogg", Sound.class);
manager.load("punch.ogg", Sound.class);
manager.load("boss.png", Texture.class);
manager.load("copo.png", Texture.class);
manager.load("copo2.png", Texture.class);
manager.load("copo3.png", Texture.class);
manager.load("estalactita.png", Texture.class);
manager.load("bubble.png", Texture.class);
manager.load("bubble2.png", Texture.class);
manager.load("bubble3.png", Texture.class);
manager.load("bossbackground.png", Texture.class);
manager.load("darkcubopez.png", Texture.class);
manager.load("mirror.png", Texture.class);
manager.load("powerup.ogg", Sound.class);
manager.load("music1.ogg", Music.class);
manager.load("fight.ogg", Music.class);
manager.load("winter.ogg", Music.class);
manager.load("music2.ogg", Music.class);
manager.load("winsound.ogg", Music.class);
manager.load("gameoversound.ogg", Sound.class);
manager.load("pyraminx.png", Texture.class);
manager.load("info.png", Texture.class);
manager.load("pyraminxscrambled.png", Texture.class);
manager.load("mirrorcube.png", Texture.class);
manager.load("mirrorscrambled.png", Texture.class);
manager.load("megaminx.png", Texture.class);
manager.load("megaminxscrambled.png", Texture.class);
manager.load("menusound.ogg", Music.class);
manager.finishLoading();