Im trying to inflate a view which serves as a loading screen for my glSurfaceView while it swaps out textures during runtime (i know how to do it during my onCreate just fine). Its just a RelativeLayout with a progress bar in the middle and when its done with the swap it disappears, but its not inflating correctly.
inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
loading = inflater.inflate(R.layout.loading,null);
RelativeLayout loadingScreen = (RelativeLayout) findViewById(R.id.loadingScreen);
where loadingScreen is the id of the relative layout.
xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/loadingScreen"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFF"
android:visibility="visible" >
<ProgressBar
android:id="#+id/progressBar1"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" >
</ProgressBar>
<EditText
android:id="#+id/editText android:layout_height="
android:layout_width="wrap_content"
wrap_content="" >
</EditText>
</RelativeLayout>
For a test, I added an EditText above the following additional code to test it out:
EditText tester = (EditText) findViewById(R.id.editText); //Now we have an object
tester.setText("dfdfds");
and the error log:
08-12 15:07:35.630: ERROR/ActivityThread(2502): Failed to inflate
08-12 15:07:35.630: ERROR/ActivityThread(2502): android.view.InflateException: Binary XML file line #5: Error inflating class com.huskybus.CampusMapOpenGL
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:212)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.app.Activity.setContentView(Activity.java:1657)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at com.huskybus.Main.onCreate(Main.java:91)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1722)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.app.ActivityThread.access$1500(ActivityThread.java:123)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.os.Handler.dispatchMessage(Handler.java:99)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.os.Looper.loop(Looper.java:130)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.app.ActivityThread.main(ActivityThread.java:3835)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at java.lang.reflect.Method.invokeNative(Native Method)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at java.lang.reflect.Method.invoke(Method.java:507)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at dalvik.system.NativeStart.main(Native Method)
08-12 15:07:35.630: ERROR/ActivityThread(2502): Caused by: java.lang.reflect.InvocationTargetException
08-12 15:07:35.630: ERROR/ActivityThread(2502): at java.lang.reflect.Constructor.constructNative(Native Method)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
08-12 15:07:35.630: ERROR/ActivityThread(2502): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
08-12 15:07:35.630: ERROR/ActivityThread(2502): ... 21 more
08-12 15:07:35.630: ERROR/ActivityThread(2502): Caused by: java.lang.NullPointerException
08-12 15:07:35.630: ERROR/ActivityThread(2502): at com.huskybus.CampusMapOpenGL.<init>(CampusMapOpenGL.java:101)
08-12 15:07:35.630: ERROR/ActivityThread(2502): ... 24 more
08-12 15:07:35.637: DEBUG/AndroidRuntime(2502): Shutting down VM
08-12 15:07:35.637: WARN/dalvikvm(2502): threadid=1: thread exiting with uncaught exception (group=0x40015560)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): FATAL EXCEPTION: main
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.huskybus/com.huskybus.Main}: android.view.InflateException: Binary XML file line #5: Error inflating class com.huskybus.CampusMapOpenGL
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1768)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.app.ActivityThread.access$1500(ActivityThread.java:123)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.os.Handler.dispatchMessage(Handler.java:99)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.os.Looper.loop(Looper.java:130)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.app.ActivityThread.main(ActivityThread.java:3835)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at java.lang.reflect.Method.invokeNative(Native Method)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at java.lang.reflect.Method.invoke(Method.java:507)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at dalvik.system.NativeStart.main(Native Method)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): Caused by: android.view.InflateException: Binary XML file line #5: Error inflating class com.huskybus.CampusMapOpenGL
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:212)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.app.Activity.setContentView(Activity.java:1657)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at com.huskybus.Main.onCreate(Main.java:91)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1722)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): ... 11 more
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): Caused by: java.lang.reflect.InvocationTargetException
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at java.lang.reflect.Constructor.constructNative(Native Method)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): ... 21 more
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): Caused by: java.lang.NullPointerException
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): at com.huskybus.CampusMapOpenGL.<init>(CampusMapOpenGL.java:101)
08-12 15:07:35.653: ERROR/AndroidRuntime(2502): ... 24 more
Try loading.findViewById(...) instead of just findViewById(...)
i also have these kind of errors.i found that the error is come because of my text editor name is not match with the my text editor id.
When you have inflatet the View you need to use that view when finding child views like this
inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
loading = inflater.inflate(R.layout.loading,null);
RelativeLayout loadingScreen = (RelativeLayout) loading.findViewById(R.id.loadingScreen);
Related
I am getting the following error when I create navigation drawer activity and set as launcher activity. due to this app is crashing. I have added both 'com.android.support:appcompat-v7:22.2.1' and 'com.android.support:support-v4:22.2.1' in app build.gradle file.
My build.gradle file:
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc3"
defaultConfig {
applicationId "sampleapp.app"
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:support-v4:22.2.1'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
}
Error:
08-24 20:38:01.673 15555-15555/sampleapp.app E/AndroidRuntime﹕ FATAL EXCEPTION: main
**java.lang.RuntimeException: Unable to start activity ComponentInfo{sampleapp.app/sampleapp.app.MenuSliderActivity}: android.view.InflateException: Binary XML file line #19: Error inflating class fragment**
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1970)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
at android.app.ActivityThread.access$600(ActivityThread.java:128)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4517)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
at dalvik.system.NativeStart.main(Native Method)
**Caused by: android.view.InflateException: Binary XML file line #19: Error inflating class fragment**
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
at sampleapp.app.MenuSliderActivity.onCreate(MenuSliderActivity.java:38)
at android.app.Activity.performCreate(Activity.java:4470)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1934)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
at android.app.ActivityThread.access$600(ActivityThread.java:128)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4517)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at sampleapp.app.NavigationDrawerFragment.onCreateView(NavigationDrawerFragment.java:100)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1789)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:924)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1116)
at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1218)
at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2170)
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:300)
at android.support.v7.app.AppCompatDelegateImplV7.callActivityOnCreateView(AppCompatDelegateImplV7.java:842)
at android.support.v7.app.AppCompatDelegateImplV11.callActivityOnCreateView(AppCompatDelegateImplV11.java:34)
at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:830)
at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:668)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
at sampleapp.app.MenuSliderActivity.onCreate(MenuSliderActivity.java:38)
at android.app.Activity.performCreate(Activity.java:4470)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1934)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
at android.app.ActivityThread.access$600(ActivityThread.java:128)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4517)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
at dalvik.system.NativeStart.main(Native Method)
You should use the new support design library NavigationView:
<android.support.design.widget.NavigationView
android:id="#+id/navigation_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#android:color/black"
app:itemTextColor="#color/drawer_item_color_selector"
app:headerLayout="#layout/drawer_header"
app:menu="#menu/menu_drawer"/>
I am running my app on Eclipse, after successfully setup my project with latest android-support-v7-appcompat library i am facing this issue, don't know how to rectify it, my error log is below
08-12 14:34:09.335: E/AndroidRuntime(7681): java.lang.NoClassDefFoundError: android.support.v7.app.AppCompatDelegateImplV14
08-12 14:34:09.335: E/AndroidRuntime(7681): at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:93)
08-12 14:34:09.335: E/AndroidRuntime(7681): at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:77)
08-12 14:34:09.335: E/AndroidRuntime(7681): at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:429)
08-12 14:34:09.335: E/AndroidRuntime(7681): at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:57)
08-12 14:34:09.335: E/AndroidRuntime(7681): at com.fleetjack.android.apps.viewer.FleetLanding.onCreate(FleetLanding.java:125)
08-12 14:34:09.335: E/AndroidRuntime(7681): at android.app.Activity.performCreate(Activity.java:5283)
08-12 14:34:09.335: E/AndroidRuntime(7681): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
08-12 14:34:09.335: E/AndroidRuntime(7681): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
08-12 14:34:09.335: E/AndroidRuntime(7681): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299)
08-12 14:34:09.335: E/AndroidRuntime(7681): at android.app.ActivityThread.access$700(ActivityThread.java:150)
08-12 14:34:09.335: E/AndroidRuntime(7681): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
08-12 14:34:09.335: E/AndroidRuntime(7681): at android.os.Handler.dispatchMessage(Handler.java:99)
08-12 14:34:09.335: E/AndroidRuntime(7681): at android.os.Looper.loop(Looper.java:137)
08-12 14:34:09.335: E/AndroidRuntime(7681): at android.app.ActivityThread.main(ActivityThread.java:5283)
08-12 14:34:09.335: E/AndroidRuntime(7681): at java.lang.reflect.Method.invokeNative(Native Method)
08-12 14:34:09.335: E/AndroidRuntime(7681): at java.lang.reflect.Method.invoke(Method.java:511)
08-12 14:34:09.335: E/AndroidRuntime(7681): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
08-12 14:34:09.335: E/AndroidRuntime(7681): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
08-12 14:34:09.335: E/AndroidRuntime(7681): at dalvik.system.NativeStart.main(Native Method)
In my libs folder i have added three jar files -> support design, supportV4, supportV7-appcompact, gcm(i have removed libraries in appcompact project library )
As well in my manifest i have changed my app theme to android:theme="#style/Theme.AppCompat" changed activity to AppCompatActivity, Now when i try to run my application it always through an exception.
Kindly help me to fix this issue
Searched through google but all the solution is for Android-Studio i am using eclipse
Thanks in advance
import android-support-* jar files in libs, may causes error.
each library is android-project structure, jar file is not contain android-project structure (res, assets, etc).
import libraries projects and add reference.
check your project settings.
import 'android-support-v7-appcompat library' as project?
clean android-support-v7-appcompat library and your project.
check your project, referencing appcompat library.
check build path
if you still facing error, please comment.
I have issues as I was following this tutorial https://www.youtube.com/watch?v=vQ__ECAEAS0 , how to implement Google maps v2 in android project, I did exactly like in tutorial just in new activity and then i try to open new activity , The application is crashing each time: Sorry new to android...
Creating new activity:
public void openMap(View view) {
Intent intent = new Intent(this, MapMain.class);
startActivity(intent);
}
XML:
<Button
android:id="#+id/bMapas"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_above="#+id/buttonSettings"
android:layout_toLeftOf="#+id/textpowererdBy"
android:background="#drawable/st_nohow_b"
android:onClick="openMap"
android:text="#string/map" />
Manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="nl.test.app"
android:versionCode="1"
android:versionName="1.0" >
<permission android:name="nl.test.app.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
<uses-permission android:name="nl.test.app.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Required to show current location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainMenu"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MapMain"
android:label="#string/title_activity_map_main" >
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyAnNGd2_lI-3-wS0XR06czsjDQNTAATQXF" />
</application>
</manifest>
LogCat
08-12 13:31:25.536: E/AndroidRuntime(440): FATAL EXCEPTION: main
08-12 13:31:25.536: E/AndroidRuntime(440): java.lang.RuntimeException: Unable to start activity ComponentInfo{nl.test.app/nl.test.app.MapMain}: android.view.InflateException: Binary XML file line #9: Error inflating class fragment
08-12 13:31:25.536: E/AndroidRuntime(440): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1815)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.app.ActivityThread.access$500(ActivityThread.java:122)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1024)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.os.Handler.dispatchMessage(Handler.java:99)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.os.Looper.loop(Looper.java:132)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.app.ActivityThread.main(ActivityThread.java:4123)
08-12 13:31:25.536: E/AndroidRuntime(440): at java.lang.reflect.Method.invokeNative(Native Method)
08-12 13:31:25.536: E/AndroidRuntime(440): at java.lang.reflect.Method.invoke(Method.java:491)
08-12 13:31:25.536: E/AndroidRuntime(440): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
08-12 13:31:25.536: E/AndroidRuntime(440): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
08-12 13:31:25.536: E/AndroidRuntime(440): at dalvik.system.NativeStart.main(Native Method)
08-12 13:31:25.536: E/AndroidRuntime(440): Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class fragment
08-12 13:31:25.536: E/AndroidRuntime(440): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:688)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.view.LayoutInflater.rInflate(LayoutInflater.java:724)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.view.LayoutInflater.inflate(LayoutInflater.java:391)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
08-12 13:31:25.536: E/AndroidRuntime(440): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:223)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.app.Activity.setContentView(Activity.java:1786)
08-12 13:31:25.536: E/AndroidRuntime(440): at nl.test.app.MapMain.onCreate(MapMain.java:16)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.app.Activity.performCreate(Activity.java:4397)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1779)
08-12 13:31:25.536: E/AndroidRuntime(440): ... 11 more
08-12 13:31:25.536: E/AndroidRuntime(440): Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 5089000 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
08-12 13:31:25.536: E/AndroidRuntime(440): at com.google.android.gms.common.GooglePlayServicesUtil.A(Unknown Source)
08-12 13:31:25.536: E/AndroidRuntime(440): at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
08-12 13:31:25.536: E/AndroidRuntime(440): at com.google.android.gms.maps.internal.u.I(Unknown Source)
08-12 13:31:25.536: E/AndroidRuntime(440): at com.google.android.gms.maps.internal.u.H(Unknown Source)
08-12 13:31:25.536: E/AndroidRuntime(440): at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
08-12 13:31:25.536: E/AndroidRuntime(440): at com.google.android.gms.maps.SupportMapFragment$b.jz(Unknown Source)
08-12 13:31:25.536: E/AndroidRuntime(440): at com.google.android.gms.maps.SupportMapFragment$b.a(Unknown Source)
08-12 13:31:25.536: E/AndroidRuntime(440): at com.google.android.gms.dynamic.a.a(Unknown Source)
08-12 13:31:25.536: E/AndroidRuntime(440): at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
08-12 13:31:25.536: E/AndroidRuntime(440): at com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown Source)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:291)
08-12 13:31:25.536: E/AndroidRuntime(440): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:660)
08-12 13:31:25.536: E/AndroidRuntime(440): ... 21 more
One thing I notice imidatly is that you don't have this part in you Manifest file:
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
Google Maps API V2 will not run without this meta-data section in your Manifest file.
If this is not working still after making this change, try to go over this blog post I wrote on this topic:
Google Maps API V2 Guide
You can as well go over this tutorial to make sure you are getting the key and setting up the API Console the right way:
Google Maps API V2 Key Guide
My reports provide me this error but I can't understand how is it possible?
java.lang.RuntimeException: Unable to start activity ComponentInfo{net.aviascanner.aviascanner/net.aviascanner.aviascanner.ui.activities.GetCitiesActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2753)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
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 #11: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:513)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
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.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
... 12 more
Caused by: java.lang.reflect.InvocationTargetException
at android.widget.EditText.<init>(EditText.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
... 25 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
... 29 more
Caused by: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
android.view.InflateException: Binary XML file line #11: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:513)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
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.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
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: java.lang.reflect.InvocationTargetException
at android.widget.EditText.<init>(EditText.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
... 25 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
... 29 more
Caused by: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
java.lang.reflect.InvocationTargetException
at android.widget.EditText.<init>(EditText.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
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.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
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.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
... 29 more
Caused by: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
android.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
at android.widget.EditText.<init>(EditText.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
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.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
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: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
at android.widget.EditText.<init>(EditText.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
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.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
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)
I have found this error in my application also. In my application I solved my problem by making the copies of the drawables in all the folders of the drawables i.e. drawable-ldpi, drawable-mdpi, drawable-hdpi, drawable-xhdpi. This works correctly in my application. Hope this will solve your problem if u have not kept the drawables into all the provided drawable folders.
I'm building an Android app with Eclipse and it all went well until I added a particular KeyEvent code. Once I tried to emulate my app, it crashed and died. I tried to clean it multiple times, but it is not being resolved. Also, when I try to edit the source path, the sources are shown for a split second but disappear. Here are the sources that are not being found:
ActivityThread.performLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 2159
ActivityThread.handleLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 2189
ActivityThread.access$600(ActivityThread, ActivityThread$ActivityClientRecord, Intent) line: 139
ActivityThread$H.handleMessage(Message) line: 1261
ActivityThread.main(String[]) line: 4894
ZygoteInit$MethodAndArgsCaller.run() line: 784
ZygoteInit.main(String[]) line: 551
NativeStart.main(String[]) line: not available [native method]
How can I make them become able to use? I am so close to my app being ready. This is the only setback in my app.
EDIT: Here's the logcat output:
08-12 10:52:02.359: E/AndroidRuntime(23219): FATAL EXCEPTION: main
08-12 10:52:02.359: E/AndroidRuntime(23219): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.mshaw.avanos/com.mshaw.avanos.AvanosActivity}: java.lang.NullPointerException
08-12 10:52:02.359: E/AndroidRuntime(23219): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2075)
08-12 10:52:02.359: E/AndroidRuntime(23219): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2189)
08-12 10:52:02.359: E/AndroidRuntime(23219): at android.app.ActivityThread.access$600(ActivityThread.java:139)
08-12 10:52:02.359: E/AndroidRuntime(23219): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
08-12 10:52:02.359: E/AndroidRuntime(23219): at android.os.Handler.dispatchMessage(Handler.java:99)
08-12 10:52:02.359: E/AndroidRuntime(23219): at android.os.Looper.loop(Looper.java:154)
08-12 10:52:02.359: E/AndroidRuntime(23219): at android.app.ActivityThread.main(ActivityThread.java:4894)
08-12 10:52:02.359: E/AndroidRuntime(23219): at java.lang.reflect.Method.invokeNative(Native Method)
08-12 10:52:02.359: E/AndroidRuntime(23219): at java.lang.reflect.Method.invoke(Method.java:511)
08-12 10:52:02.359: E/AndroidRuntime(23219): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
08-12 10:52:02.359: E/AndroidRuntime(23219): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
08-12 10:52:02.359: E/AndroidRuntime(23219): at dalvik.system.NativeStart.main(Native Method)
08-12 10:52:02.359: E/AndroidRuntime(23219): Caused by: java.lang.NullPointerException
08-12 10:52:02.359: E/AndroidRuntime(23219): at com.mshaw.avanos.SimpleEula.getPackageInfo(SimpleEula.java:25)
08-12 10:52:02.359: E/AndroidRuntime(23219): at com.mshaw.avanos.SimpleEula.show(SimpleEula.java:33)
08-12 10:52:02.359: E/AndroidRuntime(23219): at com.mshaw.avanos.AvanosActivity.<init>(AvanosActivity.java:36)
08-12 10:52:02.359: E/AndroidRuntime(23219): at java.lang.Class.newInstanceImpl(Native Method)
08-12 10:52:02.359: E/AndroidRuntime(23219): at java.lang.Class.newInstance(Class.java:1319)
08-12 10:52:02.359: E/AndroidRuntime(23219): at android.app.Instrumentation.newActivity(Instrumentation.java:1039)
08-12 10:52:02.359: E/AndroidRuntime(23219): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2066)
08-12 10:52:02.359: E/AndroidRuntime(23219): ... 11 more
Follow these steps
1) Goto your debug view
2) under Breakpoint Tab you will see NullPointerException
3) Right click and uncheck caught.
4) Debug your Project again
Hope this will help you. Thanks