Hello-gl2 example building

Put problems with the Android NDK in this forum.

Hello-gl2 example building

Postby i.blast » Thu Feb 03, 2011 3:30 pm

I'm trying to build hello-gl2 project from ndk examples under windows using cygwin. When I build the project in eclipse I think it doesn't add native libs into .apk (it's very small, about 10 kbytes). And when I'm trying to run it on emulator (SDK 2.3.1 with all options) it crashes with error:
Code: Select all
The application GL2JNI (process com.example.gl2jni) has stopped unexpectedly. Please try again.

What could be the problem? :?
Thanks for replies.
i.blast
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Feb 03, 2011 3:01 pm
Location: Russia, Perm

Top

Re: Hello-gl2 example building

Postby vijaysuralkar » Thu May 26, 2011 6:46 am

Hi,

I am facing a similar problem. after looking into the DDMS view in eclipse i could make out that the error is occurring at line 165 of GL2JNIView.java file where it throws a exception in case the configuration is not chosen. the relevant code is

Code: Select all
        public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {

            /* Get the number of minimally matching EGL configurations
             */
            int[] num_config = new int[1];
            egl.eglChooseConfig(display, s_configAttribs2, null, 0, num_config);

            int numConfigs = num_config[0];

            if (numConfigs <= 0) {
                throw new IllegalArgumentException("No configs match configSpec");  // <---Exception Thrown here
            }


is anyone else facing the same problem?

Thanks in Advance
vijaysuralkar
Once Poster
Once Poster
 
Posts: 1
Joined: Thu May 26, 2011 6:14 am

Re: Hello-gl2 example building

Postby windclose » Wed Sep 14, 2011 7:16 am

Android emulator don't support OpenGL ES2.0.You should try you code in a real machine.
windclose
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Sep 14, 2011 7:11 am

Re: Hello-gl2 example building

Postby Stealth » Sat Oct 22, 2011 3:59 am

I'm receiving this same error when running the same example on my Droid X. I'm well-aware that this will happen in an emulator, because that's the only answer I've been able to find while searching for a solution; I am getting this error from running the app on a real device

My .apk is also about 10k, if that's of any relevance. I've tried targetting 2.2, 2.3.1, and 2.3.3, all with the same result. I am attempting to run it on 2.3.3

I've tried building a few of the other examples, such as hello-jni and native-plasma, which do run correctly, but hello-gl2 just throws the error described in the original post

3D apps I've gotten from the market also seem to work fine

Any idea what could be going wrong?

Thanks for any help
Stealth
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Oct 22, 2011 3:02 am

Top

Return to NDK Problems

Who is online

Users browsing this forum: No registered users and 1 guest