Comments (4)
By looking at Niffy's fix at nicolasgramlich/AndEngineTexturePackerExtension#2, there seems to be an easy fix. The solution is to change onCreateResources() in SpriteExample.java to:
@Override
public void onCreateResources() {
try {
this.mTexture = new BitmapTexture(this.getTextureManager(), new IInputStreamOpener() {
@Override
public InputStream open() throws IOException {
return getAssets().open("gfx/face_box.png");
}
});
this.mTexture.load();
this.mFaceTextureRegion = TextureRegionFactory.extractFromTexture(this.mTexture);
} catch (IOException e) {
Debug.e(e);
}
}
from andengineexamples.
to get this fix working, it is also needed this import:
import org.andengine.util.adt.io.in.IInputStreamOpener;
from andengineexamples.
I tried the above fix but while the AndEngine Examples force close before starting....Here is my logcat,
03-13 04:50:47.611: E/AndroidRuntime(8241): FATAL EXCEPTION: main
03-13 04:50:47.611: E/AndroidRuntime(8241): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.andengine.examples/org.andengine.examples.launcher.ExampleLauncher}: java.lang.ClassNotFoundException: org.andengine.examples.launcher.ExampleLauncher in loader dalvik.system.PathClassLoader[/data/app/org.andengine.examples-1.apk]
03-13 04:50:47.611: E/AndroidRuntime(8241): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1680)
03-13 04:50:47.611: E/AndroidRuntime(8241): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
03-13 04:50:47.611: E/AndroidRuntime(8241): at android.app.ActivityThread.access$1500(ActivityThread.java:123)
03-13 04:50:47.611: E/AndroidRuntime(8241): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
03-13 04:50:47.611: E/AndroidRuntime(8241): at android.os.Handler.dispatchMessage(Handler.java:99)
03-13 04:50:47.611: E/AndroidRuntime(8241): at android.os.Looper.loop(Looper.java:130)
03-13 04:50:47.611: E/AndroidRuntime(8241): at android.app.ActivityThread.main(ActivityThread.java:3835)
03-13 04:50:47.611: E/AndroidRuntime(8241): at java.lang.reflect.Method.invokeNative(Native Method)
03-13 04:50:47.611: E/AndroidRuntime(8241): at java.lang.reflect.Method.invoke(Method.java:507)
03-13 04:50:47.611: E/AndroidRuntime(8241): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
03-13 04:50:47.611: E/AndroidRuntime(8241): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
03-13 04:50:47.611: E/AndroidRuntime(8241): at dalvik.system.NativeStart.main(Native Method)
03-13 04:50:47.611: E/AndroidRuntime(8241): Caused by: java.lang.ClassNotFoundException: org.andengine.examples.launcher.ExampleLauncher in loader dalvik.system.PathClassLoader[/data/app/org.andengine.examples-1.apk]
03-13 04:50:47.611: E/AndroidRuntime(8241): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
03-13 04:50:47.611: E/AndroidRuntime(8241): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
03-13 04:50:47.611: E/AndroidRuntime(8241): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
03-13 04:50:47.611: E/AndroidRuntime(8241): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
03-13 04:50:47.611: E/AndroidRuntime(8241): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1672)
03-13 04:50:47.611: E/AndroidRuntime(8241): ... 11 more
03-13 04:51:32.902: E/jdwp(8341): Failed sending reply to debugger: Broken pipe
What did I do wrong?
from andengineexamples.
I don't believe this issue alexkempton reported has anything to do with your error, perhaps you should try the andengine forums.
It seems like your project has some kind of configuration (project properties or androidManifest.xml) error, in you place i would try to get it from the repository again and re-run it.
from andengineexamples.
Related Issues (12)
- Couldn't resolve DrawMode enum HOT 1
- Incorrect import in HullAlgorithmExample.java
- possible missing particle class and/or wrong place
- Is AugmentedRealityExample available?
- pragmatically HOT 2
- the problem of combination andengine and android-view
- RadialBlurExample not working ccorrectly!
- Sprite Benchmark HOT 2
- Create perspective in GLES2
- cannot be resolved to a type HOT 2
- Engine unlock missing in SpriteRemoveExample? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from andengineexamples.