My app has been working fine the whole time I've been developing it, but it suddenly stopped working. It crashes right at the begining even before opening. The same thing happens on the phone or on the emulator. I went back a few versions that used to work as well, and they aren't working.
Could this be something to do with the android.jar??
Here is the LogCat:
04-09 23:59:00.065: I/Process(10872): Sending signal. PID: 10872 SIG: 9
04-10 00:01:29.875: D/AndroidRuntime(11072): Shutting down VM
04-10 00:01:29.875: W/dalvikvm(11072): threadid=1: thread exiting with uncaught exception (group=0x4001d560)
04-10 00:01:29.875: E/AndroidRuntime(11072): FATAL EXCEPTION: main
04-10 00:01:29.875: E/AndroidRuntime(11072): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.heatscore.pregame/com.heatscore.pregame.appMain}: java.lang.ClassNotFoundException: com.heatscore.pregame.appMain in loader dalvik.system.PathClassLoader[/data/app/com.heatscore.pregame-1.apk]
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1581)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.app.ActivityThread.access$1500(ActivityThread.java:121)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.os.Looper.loop(Looper.java:123)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.app.ActivityThread.main(ActivityThread.java:3701)
04-10 00:01:29.875: E/AndroidRuntime(11072): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 00:01:29.875: E/AndroidRuntime(11072): at java.lang.reflect.Method.invoke(Method.java:507)
04-10 00:01:29.875: E/AndroidRuntime(11072): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
04-10 00:01:29.875: E/AndroidRuntime(11072): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
04-10 00:01:29.875: E/AndroidRuntime(11072): at dalvik.system.NativeStart.main(Native Method)
04-10 00:01:29.875: E/AndroidRuntime(11072): Caused by: java.lang.ClassNotFoundException: com.heatscore.pregame.appMain in loader dalvik.system.PathClassLoader[/data/app/com.heatscore.pregame-1.apk]
04-10 00:01:29.875: E/AndroidRuntime(11072): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
04-10 00:01:29.875: E/AndroidRuntime(11072): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
04-10 00:01:29.875: E/AndroidRuntime(11072): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-10 00:01:29.875: E/AndroidRuntime(11072): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
04-10 00:01:29.875: E/AndroidRuntime(11072): ... 11 more
And here is my manifest file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.heatscore.pregame"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<application android:icon="#drawable/icon" android:theme="#style/app_theme" >
<activity android:name=".appMain" 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="Login"/>
<activity android:name="MgtRecPredActivity"/>
<activity android:name="Tabs"/>
<activity android:name="ScheduleActivity"/>
<activity android:name="PredictionsActivity"/>
<activity android:name="ScoreboardActivity"/>
<activity android:name="AlertsActivity"/>
<activity android:name="SettingsActivity"/>
<activity android:name="AboutActivity"/>
<activity android:name="LogoutActivity"/>
<activity android:name="SetPrediction"/>
<activity android:name="FinalizePredictionActivity"/>
<activity android:name="RegisterAcitvity" android:windowSoftInputMode="stateHidden"/>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
Your exception is a ClassNotFoundException. Eclipse should not compile, if the class is internal to your application. Maybe some external references broken?
If you are using Eclipse try 'clean project'
Related
I am simply trying to start my program but appear to have difficultly getting past this error. I did some researching and it seems to be linked with intent. I have double-checked my manifest file (which will be posted below) and the package names appear to be correct.
One thing that did catch my eye was the second line of the exception log. It is looking for
class "com.project.BluetoothTransfer_v1000" on path:
at /data/app/com.project.BluetoothTransfer_v1000-1.apk
Is that '-1' supposed to be there?
04-10 16:04:49.182: E/AndroidRuntime(30008): FATAL EXCEPTION: main
04-10 16:04:49.182: E/AndroidRuntime(30008): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.project.BluetoothTransfer_v1000/com.project.BluetoothTransfer_v1000.BluetoothTransferActivity}: java.lang.ClassNotFoundException: Didn't find class "com.project.BluetoothTransfer_v1000.BluetoothTransferActivity" on path: /data/app/com.project.BluetoothTransfer_v1000-1.apk
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2229)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.app.ActivityThread.access$700(ActivityThread.java:165)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1326)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.os.Looper.loop(Looper.java:137)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.app.ActivityThread.main(ActivityThread.java:5455)
04-10 16:04:49.182: E/AndroidRuntime(30008): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 16:04:49.182: E/AndroidRuntime(30008): at java.lang.reflect.Method.invoke(Method.java:525)
04-10 16:04:49.182: E/AndroidRuntime(30008): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
04-10 16:04:49.182: E/AndroidRuntime(30008): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
04-10 16:04:49.182: E/AndroidRuntime(30008): at dalvik.system.NativeStart.main(Native Method)
04-10 16:04:49.182: E/AndroidRuntime(30008): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.project.BluetoothTransfer_v1000.BluetoothTransferActivity" on path: /data/app/com.project.BluetoothTransfer_v1000-1.apk
04-10 16:04:49.182: E/AndroidRuntime(30008): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64)
04-10 16:04:49.182: E/AndroidRuntime(30008): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
04-10 16:04:49.182: E/AndroidRuntime(30008): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
04-10 16:04:49.182: E/AndroidRuntime(30008): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2220)
04-10 16:04:49.182: E/AndroidRuntime(30008): ... 11 more
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.project.BluetoothTransfer_v1000"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.project.BluetoothTransfer_v1000"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
You are missing the name of the activity into the Manifest.xml
<activity
android:name="com.project.BluetoothTransfer_v1000"
That´s the cause of the ClassNotFoundException:
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.project.BluetoothTransfer_v1000.BluetoothTransferActivity" on path: /data/app/com.project.BluetoothTransfer_v1000-1.apk
Add the name of your activity "BluetoothTransferActivity" into the Manifest.xml:
<activity
android:name="com.project.BluetoothTransfer_v1000.BluetoothTransferActivity"
I have created an android project on eclipse and by default it generated the basic "Hello world!" app. With minSDK api level 8 and target api level 15 and also compiled with api 19 (latest). Everything else was set on default (blank activity etc). The problem is when I'm trying to run the app on my level 15 AVD it fails and the message "Unfortunately 'app's name' has stopped" shows up. Why is this happening? Can anyone help me fix this?
catlog
04-10 15:21:17.383: W/dalvikvm(645): VFY: unable to resolve static field 1630 (ActionBarWindow) in Landroid/support/v7/appcompat/R$styleable;
04-10 15:21:17.383: D/dalvikvm(645): VFY: replacing opcode 0x62 at 0x0004
04-10 15:21:17.392: D/AndroidRuntime(645): Shutting down VM
04-10 15:21:17.392: W/dalvikvm(645): threadid=1: thread exiting with uncaught exception (group=0x2ba041f8)
04-10 15:21:17.402: E/AndroidRuntime(645): FATAL EXCEPTION: main
04-10 15:21:17.402: E/AndroidRuntime(645): java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
04-10 15:21:17.402: E/AndroidRuntime(645): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:104)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:57)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98)
04-10 15:21:17.402: E/AndroidRuntime(645): at com.example.asdf.MainActivity.onCreate(MainActivity.java:18)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.app.Activity.performCreate(Activity.java:4465)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.app.ActivityThread.access$600(ActivityThread.java:123)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.os.Looper.loop(Looper.java:137)
04-10 15:21:17.402: E/AndroidRuntime(645): at android.app.ActivityThread.main(ActivityThread.java:4424)
04-10 15:21:17.402: E/AndroidRuntime(645): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 15:21:17.402: E/AndroidRuntime(645): at java.lang.reflect.Method.invoke(Method.java:511)
04-10 15:21:17.402: E/AndroidRuntime(645): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-10 15:21:17.402: E/AndroidRuntime(645): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-10 15:21:17.402: E/AndroidRuntime(645): at dalvik.system.NativeStart.main(Native Method)
04-10 15:21:17.692: I/dalvikvm(645): threadid=3: reacting to signal 3
04-10 15:21:17.702: I/dalvikvm(645): Wrote stack traces to '/data/anr/traces.txt'
04-10 15:21:17.943: I/dalvikvm(645): threadid=3: reacting to signal 3
04-10 15:21:17.952: I/dalvikvm(645): Wrote stack traces to '/data/anr/traces.txt'
Finally found a solution... I've tried to do the exact same thing as mentioned on those links and on other tutorials but could not get it fixed. Looks like eclipse was doing this automatically (including the appcompat v7 libraries and making a reference from my project to those lib). After comparing my project files with the same project files build on another environment/computer I found out that my project was missing a package in the gen folder. I fixed it by copying the package from the gen folder of the appcompat v7 project (android.support.v7.appcompat) to the gen folder of my project.
Windows 8
eclipse kepler (latest update)
sdk (latest update)
system x32
There was not such a problem on the x64 system enviroment.
I'm getting a force close every time I try to start a FragmentActivity from an Activity using an Intent. Here's the code from the Activity:
Intent intent = new Intent(getApplicationContext(), OrgHome.class);
intent.putExtra("Username", organization_name.getText().toString());
startActivity(intent);
And here's the logcat:
08-01 16:52:45.823: E/AndroidRuntime(600): FATAL EXCEPTION: main
08-01 16:52:45.823: E/AndroidRuntime(600): java.lang.NoClassDefFoundError: com.project3.organizations.OrgHome
08-01 16:52:45.823: E/AndroidRuntime(600): at com.project3.organizations.MainActivity$1$1.mobDBResponse(MainActivity.java:76)
08-01 16:52:45.823: E/AndroidRuntime(600): at com.mobdb.android.MobDBRequest.onPostExecute(MobDBRequest.java:78)
08-01 16:52:45.823: E/AndroidRuntime(600): at com.mobdb.android.MobDBRequest.onPostExecute(MobDBRequest.java:1)
08-01 16:52:45.823: E/AndroidRuntime(600): at android.os.AsyncTask.finish(AsyncTask.java:417)
08-01 16:52:45.823: E/AndroidRuntime(600): at android.os.AsyncTask.access$300(AsyncTask.java:127)
08-01 16:52:45.823: E/AndroidRuntime(600): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:429)
08-01 16:52:45.823: E/AndroidRuntime(600): at android.os.Handler.dispatchMessage(Handler.java:99)
08-01 16:52:45.823: E/AndroidRuntime(600): at android.os.Looper.loop(Looper.java:123)
08-01 16:52:45.823: E/AndroidRuntime(600): at android.app.ActivityThread.main(ActivityThread.java:3683)
08-01 16:52:45.823: E/AndroidRuntime(600): at java.lang.reflect.Method.invokeNative(Native Method)
08-01 16:52:45.823: E/AndroidRuntime(600): at java.lang.reflect.Method.invoke(Method.java:507)
08-01 16:52:45.823: E/AndroidRuntime(600): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
08-01 16:52:45.823: E/AndroidRuntime(600): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
08-01 16:52:45.823: E/AndroidRuntime(600): at dalvik.system.NativeStart.main(Native Method)
08-01 16:52:48.053: I/Process(600): Sending signal. PID: 600 SIG: 9
OrgHome.class is defined in the manifest correctly. What's going on here?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.project3.organizations"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="OrgHome"></activity>
</application>
</manifest>
Change the manifest:
Use this if OrgHome is in the same place as MainActivity
<activity android:name=".OrgHome" />
Use this if it's in a sub-folder
<activity android:name=".sub.path.to.OrgHome" />
Or specify the whole path
<activity android:name="entire.path.to.OrgHome" />
for addressing the Fragment activities you should write (getactivity(),nameofOtherActivity.class); and you should be all right.
I made an App. and since I just wanted to test some functions before adding them to the App,
I decided to copy my project into a new Project. When I tried to run the new project, the app crashes and the log-cat output is as follows.
Manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.androidbook.MP"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.CAMERA"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" android:debuggable="true">
<activity
android:name=".MPActivity"
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="AddLocationActivity"></activity>
<activity android:name="MPData"></activity>
<activity android:name="MyLocations"></activity>
<activity android:name="MPInfo"></activity>
<activity android:name="Navigation"></activity>
</application>
LogCat:
05-21 15:30:03.710: E/AndroidRuntime(11294): FATAL EXCEPTION: main
05-21 15:30:03.710: E/AndroidRuntime(11294): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.androidbook.MP/com.androidbook.MP.MPActivity}:
java.lang.ClassNotFoundException: com.androidbook.MP.MPActivity in loader
dalvik.system.PathClassLoader[/data/app/com.androidbook.MP-1.apk]
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.os.Handler.dispatchMessage(Handler.java:99)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.os.Looper.loop(Looper.java:130)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.app.ActivityThread.main(ActivityThread.java:3691)
05-21 15:30:03.710: E/AndroidRuntime(11294): at java.lang.reflect.Method.invokeNative(Native Method)
05-21 15:30:03.710: E/AndroidRuntime(11294): at java.lang.reflect.Method.invoke(Method.java:507)
05-21 15:30:03.710: E/AndroidRuntime(11294): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
05-21 15:30:03.710: E/AndroidRuntime(11294): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
05-21 15:30:03.710: E/AndroidRuntime(11294): at dalvik.system.NativeStart.main(Native Method)
05-21 15:30:03.710: E/AndroidRuntime(11294): Caused by: java.lang.ClassNotFoundException: com.androidbook.MP.MPActivity in loader dalvik.system.PathClassLoader[/data/app/com.androidbook.MP-1.apk]
05-21 15:30:03.710: E/AndroidRuntime(11294): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
05-21 15:30:03.710: E/AndroidRuntime(11294): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
05-21 15:30:03.710: E/AndroidRuntime(11294): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
05-21 15:30:03.710: E/AndroidRuntime(11294): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)
05-21 15:30:03.710: E/AndroidRuntime(11294): ... 11 more
Check your Manifest file, if the activity is to be declared.
for Ex:
<application>
<activity android:name=".MyActivity" android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Look through all the files in your new project and make sure they aren't referencing classes from the old project.
I think I found the solution, i should have checked that, the package name of the new project is included in the manifest file as for an example
"package="com.androidbook.MPTest" ..
my mistake is the i used the package name of the old project as a package name of the new project.
When I try to run my app on an emulator, my app comes up with an error message saying
The app has stopped unexpectedly. Please try again."
How do I fix this?
Here is my code:
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.DOLEnterprises.GTA5Guide"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="4" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name= "com.google.ads.AdActivity"
android:configChanges= "keyboard|keyboardHidden|orientation"
></activity>
<activity
android:name=".GTA5GuideActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
The "Appname"Activity.java:
package com.DOLEnterprises.GTA5Guide;
import android.app.Activity;
import android.os.Bundle;
public class GTA5GuideActivity extends Activity {
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
Main.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads= "http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:scaleType="center"
android:src="#drawable/gtaapp" />
<com.google.ads.AdView android:id= "#+id/ad"
android:layout_width="wrap_content"
android:layout_height= "wrap_content"
ads:adUnitId= "soon"
ads:loadAdOnCreate= "a14f8315a6c11bf"
ads:adSize="BANNER"
/>
</LinearLayout>
The Logcat thing:
04-10 08:23:55.424: D/dalvikvm(224): GC freed 510 objects / 46816 bytes in 75ms
04-10 08:23:55.534: D/AndroidRuntime(224): Shutting down VM
04-10 08:23:55.534: W/dalvikvm(224): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
04-10 08:23:55.534: E/AndroidRuntime(224): Uncaught handler: thread main exiting due to uncaught exception
04-10 08:23:55.554: E/AndroidRuntime(224): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.DOLEnterprises.GTA5Guide/com.DOLEnterprises.GTA5Guide.GTA5GuideActivity}: android.view.InflateException: Binary XML file line #16: Error inflating class com.google.ads.AdView
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.os.Looper.loop(Looper.java:123)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.ActivityThread.main(ActivityThread.java:4363)
04-10 08:23:55.554: E/AndroidRuntime(224): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 08:23:55.554: E/AndroidRuntime(224): at java.lang.reflect.Method.invoke(Method.java:521)
04-10 08:23:55.554: E/AndroidRuntime(224): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-10 08:23:55.554: E/AndroidRuntime(224): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-10 08:23:55.554: E/AndroidRuntime(224): at dalvik.system.NativeStart.main(Native Method)
04-10 08:23:55.554: E/AndroidRuntime(224): Caused by: android.view.InflateException: Binary XML file line #16: Error inflating class com.google.ads.AdView
04-10 08:23:55.554: E/AndroidRuntime(224): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-10 08:23:55.554: E/AndroidRuntime(224): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.Activity.setContentView(Activity.java:1622)
04-10 08:23:55.554: E/AndroidRuntime(224): at com.DOLEnterprises.GTA5Guide.GTA5GuideActivity.onCreate(GTA5GuideActivity.java:11)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
04-10 08:23:55.554: E/AndroidRuntime(224): ... 11 more
04-10 08:23:55.554: E/AndroidRuntime(224): Caused by: java.lang.ClassNotFoundException: com.google.ads.AdView in loader dalvik.system.PathClassLoader#44e8ca48
04-10 08:23:55.554: E/AndroidRuntime(224): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
04-10 08:23:55.554: E/AndroidRuntime(224): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
04-10 08:23:55.554: E/AndroidRuntime(224): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
04-10 08:23:55.554: E/AndroidRuntime(224): ... 20 more
04-10 08:23:55.584: I/dalvikvm(224): threadid=7: reacting to signal 3
04-10 08:23:55.584: E/dalvikvm(224): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
04-10 08:24:22.804: D/dalvikvm(231): GC freed 537 objects / 47832 bytes in 68ms
04-10 08:24:22.913: D/AndroidRuntime(231): Shutting down VM
04-10 08:24:22.913: W/dalvikvm(231): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
04-10 08:24:22.913: E/AndroidRuntime(231): Uncaught handler: thread main exiting due to uncaught exception
04-10 08:24:22.933: E/AndroidRuntime(231): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.DOLEnterprises.GTA5Guide/com.DOLEnterprises.GTA5Guide.GTA5GuideActivity}: android.view.InflateException: Binary XML file line #16: Error inflating class com.google.ads.AdView
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.os.Looper.loop(Looper.java:123)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.ActivityThread.main(ActivityThread.java:4363)
04-10 08:24:22.933: E/AndroidRuntime(231): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 08:24:22.933: E/AndroidRuntime(231): at java.lang.reflect.Method.invoke(Method.java:521)
04-10 08:24:22.933: E/AndroidRuntime(231): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-10 08:24:22.933: E/AndroidRuntime(231): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-10 08:24:22.933: E/AndroidRuntime(231): at dalvik.system.NativeStart.main(Native Method)
04-10 08:24:22.933: E/AndroidRuntime(231): Caused by: android.view.InflateException: Binary XML file line #16: Error inflating class com.google.ads.AdView
04-10 08:24:22.933: E/AndroidRuntime(231): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-10 08:24:22.933: E/AndroidRuntime(231): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.Activity.setContentView(Activity.java:1622)
04-10 08:24:22.933: E/AndroidRuntime(231): at com.DOLEnterprises.GTA5Guide.GTA5GuideActivity.onCreate(GTA5GuideActivity.java:11)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
04-10 08:24:22.933: E/AndroidRuntime(231): ... 11 more
04-10 08:24:22.933: E/AndroidRuntime(231): Caused by: java.lang.ClassNotFoundException: com.google.ads.AdView in loader dalvik.system.PathClassLoader#44e8ca28
04-10 08:24:22.933: E/AndroidRuntime(231): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
04-10 08:24:22.933: E/AndroidRuntime(231): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
04-10 08:24:22.933: E/AndroidRuntime(231): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
04-10 08:24:22.933: E/AndroidRuntime(231): ... 20 more
04-10 08:24:22.953: I/dalvikvm(231): threadid=7: reacting to signal 3
04-10 08:24:22.953: E/dalvikvm(231): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
04-10 08:24:31.884: D/dalvikvm(237): GC freed 564 objects / 48880 bytes in 92ms
04-10 08:24:31.993: D/AndroidRuntime(237): Shutting down VM
04-10 08:24:31.993: W/dalvikvm(237): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
04-10 08:24:32.003: E/AndroidRuntime(237): Uncaught handler: thread main exiting due to uncaught exception
04-10 08:24:32.023: E/AndroidRuntime(237): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.DOLEnterprises.GTA5Guide/com.DOLEnterprises.GTA5Guide.GTA5GuideActivity}: android.view.InflateException: Binary XML file line #16: Error inflating class com.google.ads.AdView
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.os.Looper.loop(Looper.java:123)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.ActivityThread.main(ActivityThread.java:4363)
04-10 08:24:32.023: E/AndroidRuntime(237): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 08:24:32.023: E/AndroidRuntime(237): at java.lang.reflect.Method.invoke(Method.java:521)
04-10 08:24:32.023: E/AndroidRuntime(237): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-10 08:24:32.023: E/AndroidRuntime(237): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-10 08:24:32.023: E/AndroidRuntime(237): at dalvik.system.NativeStart.main(Native Method)
04-10 08:24:32.023: E/AndroidRuntime(237): Caused by: android.view.InflateException: Binary XML file line #16: Error inflating class com.google.ads.AdView
04-10 08:24:32.023: E/AndroidRuntime(237): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-10 08:24:32.023: E/AndroidRuntime(237): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.Activity.setContentView(Activity.java:1622)
04-10 08:24:32.023: E/AndroidRuntime(237): at com.DOLEnterprises.GTA5Guide.GTA5GuideActivity.onCreate(GTA5GuideActivity.java:11)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
04-10 08:24:32.023: E/AndroidRuntime(237): ... 11 more
04-10 08:24:32.023: E/AndroidRuntime(237): Caused by: java.lang.ClassNotFoundException: com.google.ads.AdView in loader dalvik.system.PathClassLoader#44e8ca28
04-10 08:24:32.023: E/AndroidRuntime(237): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
04-10 08:24:32.023: E/AndroidRuntime(237): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
04-10 08:24:32.023: E/AndroidRuntime(237): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
04-10 08:24:32.023: E/AndroidRuntime(237): ... 20 more
04-10 08:24:32.043: I/dalvikvm(237): threadid=7: reacting to signal 3
04-10 08:24:32.043: E/dalvikvm(237): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
---EDIT---
Are you sure you have downloaded the "Ad" library and included it in your project? Class not found suggests that you have not successfully linked it to your project. Also try rebuilding your project by following the steps below .
Try cleaning your project... Project > Clean > Choose your Project > Ok
Rerun your project.
it seems that error is caused due to Typos or casting ...... Check carefully for Typos and casting ....... check for library folder name ....
check out this
android:configChanges requieres all parameters to show ads in application
change the SDK version to 14 of your Application
mention it in your AndroidManifest.xml file
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>