Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8062805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:47:51+00:00 2026-06-05T10:47:51+00:00

I know this has been asked a lot on SO, but unfortunately none of

  • 0

I know this has been asked a lot on SO, but unfortunately none of the answers did solve my problem.

I have 3 Android devices for testing + emulator and my app just works fine on all of them, but when I publish the app I get this error (only on few devices, not all):

java.lang.RuntimeException: Unable to start activity ComponentInfo{<package>/<package>.<ProjectName>Activity}: android.view.InflateException: Binary XML file line #10: Error inflating class <package>.MainSurfaceView
 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
 at android.app.ActivityThread.access$2300(ActivityThread.java:125)
 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
 at android.os.Handler.dispatchMessage(Handler.java:99)
 at android.os.Looper.loop(Looper.java:123)
 at android.app.ActivityThread.main(ActivityThread.java:4627)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:521)
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
 at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class <package>.MainSurfaceView
 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
 at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
 at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
 at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
 at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
 at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
 at android.app.Activity.setContentView(Activity.java:1647)
 at <package>.<ProjectName>Activity.onCreate(Unknown Source)
 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
 ... 11 more
Caused by: java.lang.ClassNotFoundException: <package>.MainSurfaceView in loader dalvik.system.PathClassLoader[/data/app/<package>-1.apk]
 at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
 at android.view.LayoutInflater.createView(LayoutInflater.java:466)
 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)

The class extends class GLSurfaceView and has 3 constructors (GLSurfaceView supports only 2, but I read on SO that the missing third may cause the problem – it doesn’t).

Class (only constructors):

public class MainSurfaceView extends GLSurfaceView {

    public MainSurfaceView(Context context) {
        super(context);
    }

    public MainSurfaceView(Context context, AttributeSet attrs){
        super(context, attrs);
    }

    public MainSurfaceView(Context context, AttributeSet attrs, int defStyle){
        super(context, attrs);
    }
}

Adding constructor

public MainSurfaceView(Context context, AttributeSet attrs, int defStyle){
    super(context, attrs);
}

did not solve the problem.

My manifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="<package>"
      android:versionCode="5"
      android:versionName="1.2.1">
    <uses-sdk android:minSdkVersion="8" />

    <supports-screens android:largeScreens="true"
                      android:anyDensity="true"
                      android:normalScreens="true"
                      android:smallScreens="true"
                      android:resizeable="true" />


    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".<project>Activity"
                  android:label="@string/app_name"
                  android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name="com.google.ads.AdActivity"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
            android:configChanges="keyboard|keyboardHidden|orientation" />

    </application>
</manifest>

And my layout file:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
  android:orientation="vertical"
  android:layout_width="480dp"
  android:layout_height="800dp"
  android:layout_gravity="center">

    <<package>.MainSurfaceView android:id="@+id/glSurface" android:layout_width="fill_parent"
         android:layout_height="fill_parent" android:layout_gravity="top|left"/>

  <com.google.ads.AdView android:id="@+id/adView"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    android:visibility="visible"
    android:layout_alignParentTop="true"
    ads:adSize="BANNER"
    ads:adUnitId="<id>"
    ads:loadAdOnCreate="true"/>

</FrameLayout>

Thanks for any help. It would be also very helpful if someone can tell me how to recreate the error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T10:47:53+00:00Added an answer on June 5, 2026 at 10:47 am

    If you have updated to ADTv17 or above, the old ProGuard files will do this to you. Create a new empty project, and see project.properties and proguard-properties and modify your current project accordingly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this has been asked a lot, but I have a server-side custom
I know this type of question has been asked a lot but none of
Okay i know this has been asked a lot but it seems that none
I know this has been asked a lot, but the only answers I could
I know this has been asked a lot of times, but I have honestly
Yes, I know this question has been asked a lot of times, but I
I know this has been asked before but all the answers I found didn't
I know this has been asked much the same before but no answers seem
I know this has probably been asked a lot on here, but I am
i know this has been asked but none of the threads had a solution

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.