I`m developing an app. And at this part I only have an activity for my Navigation Drawer.
Im trying to run but I get the same Exception everytime.. Ive searched for some time, tried a lot of things but nothing worked.
Here`s my logcat:
02-23 17:45:09.379: E/AndroidRuntime(3364): FATAL EXCEPTION: main
02-23 17:45:09.379: E/AndroidRuntime(3364): Process: com.example.testedrawer, PID: 3364
02-23 17:45:09.379: E/AndroidRuntime(3364): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.testedrawer/com.example.testedrawer.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.testedrawer.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.testedrawer-2/base.apk"],nativeLibraryDirectories= [/vendor/lib, /system/lib]]
02-23 17:45:09.379: E/AndroidRuntime(3364): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
02-23 17:45:09.379: E/AndroidRuntime(3364): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
02-23 17:45:09.379: E/AndroidRuntime(3364): at android.app.ActivityThread.access$800(ActivityThread.java:144)
02-23 17:45:09.379: E/AndroidRuntime(3364): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
02-23 17:45:09.379: E/AndroidRuntime(3364): at android.os.Handler.dispatchMessage(Handler.java:102)
02-23 17:45:09.379: E/AndroidRuntime(3364): at android.os.Looper.loop(Looper.java:135)
02-23 17:45:09.379: E/AndroidRuntime(3364): at android.app.ActivityThread.main(ActivityThread.java:5221)
02-23 17:45:09.379: E/AndroidRuntime(3364): at java.lang.reflect.Method.invoke(Native Method)
02-23 17:45:09.379: E/AndroidRuntime(3364): at java.lang.reflect.Method.invoke(Method.java:372)
02-23 17:45:09.379: E/AndroidRuntime(3364): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
02-23 17:45:09.379: E/AndroidRuntime(3364): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
02-23 17:45:09.379: E/AndroidRuntime(3364): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.testedrawer.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.testedrawer-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
02-23 17:45:09.379: E/AndroidRuntime(3364): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
02-23 17:45:09.379: E/AndroidRuntime(3364): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
My Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.testedrawer"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
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>
Please help me..
Ive already fixed it. Ive tried so many things that didn't work on Eclipse. Than I tried to do it on Android Studio.. And it worked! Thanks for your help, though!
Related
I'm trying to work with local_auth, updating from 0.4.0 to 0.6.2
I followed the instructions, changing the FlutterActivity to FlutterFragmentActivity in my MainActivity.java
( according with this guide https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects and with this thread https://github.com/flutter/flutter/issues/57678)
In this way
import io.flutter.embedding.android.FlutterFragmentActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;
import io.flutter.embedding.engine.FlutterEngine;
public class MainActivity extends FlutterFragmentActivity {
#Override
public void configureFlutterEngine(FlutterEngine flutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine);
}
}
I also changed my style.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">#drawable/launch_background</item>
</style>
</resources>
and my AndroidManifest.xml
<application
android:icon="#mipmap/ic_launcher"
android:allowBackup="false"
android:fullBackupContent="false"
android:label="XXX">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in #style/LaunchTheme). -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="#drawable/launch_background" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:name="com.apptreesoftware.barcodescan.BarcodeScannerActivity"/>
<provider
android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider"
android:authorities="${applicationId}.flutter_downloader.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/provider_paths"/>
</provider>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
It works on Android 28 and higher, but not on older versions.
When I run on android 27 I got this error
I/zygote (10611): Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/widget/TintableCompoundDrawablesView; I/zygote (10611): (Throwable with no stack trace) I/zygote (10611): Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.core.widget.TintableCompoundDrawablesView" on path: DexPathList[[zip file "/data/app/it.xxx.flutter.xxx-bwyNjP_RiFiWr_SW3gO7MQ==/base.apk"],nativeLibraryDirectories=[/data/app/it.xxx.flutter.xxx-bwyNjP_RiFiWr_SW3gO7MQ==/lib/x86, /data/app/it.xxx.flutter.xxx-bwyNjP_RiFiWr_SW3gO7MQ==/base.apk!/lib/x86, /system/lib, /vendor/lib]] I/zygote (10611): (Throwable with no stack trace) I/zygote (10611): E/MethodChannel#plugins.flutter.io/local_auth(10611): Failed to handle method call E/MethodChannel#plugins.flutter.io/local_auth(10611): android.view.InflateException: Binary XML file line #26: Binary XML file line #45: Error inflating class androidx.appcompat.widget.DialogTitle E/MethodChannel#plugins.flutter.io/local_auth(10611): Caused by: android.view.InflateException: Binary XML file line #45: Error inflating class androidx.appcompat.widget.DialogTitle E/MethodChannel#plugins.flutter.io/local_auth(10611): Caused by: java.lang.ClassNotFoundException: androidx.appcompat.widget.DialogTitle E/MethodChannel#plugins.flutter.io/local_auth(10611): at java.lang.VMClassLoader.findLoadedClass(Native Method) E/MethodChannel#plugins.flutter.io/local_auth(10611): at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738) E/MethodChannel#plugins.flutter.io/local_auth(10611): at java.lang.ClassLoader.loadClass(ClassLoader.java:363) E/MethodChannel#plugins.flutter.io/local_auth(10611): at java.lang.ClassLoader.loadClass(ClassLoader.java:312) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.createView(LayoutInflater.java:606) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.parseInclude(LayoutInflater.java:995) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.rInflate(LayoutInflater.java:859) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.inflate(LayoutInflater.java:515) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.inflate(LayoutInflater.java:423) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.inflate(LayoutInflater.java:374) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.appcompat.app.AppCompatDialog.setContentView(AppCompatDialog.java:95) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.appcompat.app.AlertController.installContent(AlertController.java:232) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.appcompat.app.AlertDialog.onCreate(AlertDialog.java:279) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.app.Dialog.dispatchOnCreate(Dialog.java:403) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.app.Dialog.show(Dialog.java:302) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.fragment.app.DialogFragment.onStart(DialogFragment.java:486) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.fragment.app.Fragment.performStart(Fragment.java:2632) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:915) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1238) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1303) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:439) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManagerImpl.java:2079) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1869) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1824) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManagerImpl.java:1727) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.fragment.app.FragmentManagerImpl.executePendingTransactions(FragmentManagerImpl.java:183) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.biometric.BiometricPrompt.authenticateInternal(BiometricPrompt.java:749) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.biometric.BiometricPrompt.authenticate(BiometricPrompt.java:658) E/MethodChannel#plugins.flutter.io/local_auth(10611): at io.flutter.plugins.localauth.AuthenticationHelper.authenticate(AuthenticationHelper.java:103) E/MethodChannel#plugins.flutter.io/local_auth(10611): at io.flutter.plugins.localauth.LocalAuthPlugin.onMethodCall(LocalAuthPlugin.java:120) E/MethodChannel#plugins.flutter.io/local_auth(10611): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:226) E/MethodChannel#plugins.flutter.io/local_auth(10611): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85) E/MethodChannel#plugins.flutter.io/local_auth(10611): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:631) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.os.MessageQueue.nativePollOnce(Native Method) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.os.MessageQueue.next(MessageQueue.java:325) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.os.Looper.loop(Looper.java:142) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.app.ActivityThread.main(ActivityThread.java:6494) E/MethodChannel#plugins.flutter.io/local_auth(10611): at java.lang.reflect.Method.invoke(Native Method) E/MethodChannel#plugins.flutter.io/local_auth(10611): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) E/MethodChannel#plugins.flutter.io/local_auth(10611): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) E/MethodChannel#plugins.flutter.io/local_auth(10611): Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/widget/TintableCompoundDrawablesView; E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.appcompat.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1383) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1457) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:772) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.inflate(LayoutInflater.java:492) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.inflate(LayoutInflater.java:423) E/MethodChannel#plugins.flutter.io/local_auth(10611): at android.view.LayoutInflater.inflate(LayoutInflater.java:374) E/MethodChannel#plugins.flutter.io/local_auth(10611): at com.android.internal.policy.DecorView.onResourcesLoaded(DecorView.java:1933) E/MethodChannel#plugins.flutter.io/local_auth(10611): at com.android.internal.policy.PhoneWindow.generateLayout(PhoneWindow.java:2586) E/MethodChannel#plugins.flutter.io/local_auth(10611): at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:2659) E/MethodChannel#plugins.flutter.io/local_auth(10611): at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java:2067) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:717) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:659) E/MethodChannel#plugins.flutter.io/local_auth(10611): at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:552) E/MethodChannel#plugins.flutter.io/local_auth(10611): ... 30 more E/MethodChannel#plugins.flutter.io/local_auth(10611): Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.core.widget.TintableCompoundDrawablesView" on path: DexPathList[[zip file "/data/app/it.xxx.flutter.xxx-bwyNjP_RiFiWr_SW3gO7MQ==/base.apk"],nativeLibraryDirectories=[/data/app/it.xxx.flutter.xxx-bwyNjP_RiFiWr_SW3gO7MQ==/lib/x86, /data/app/it.xxx.flutter.xxx-bwyNjP_RiFiWr_SW3gO7MQ==/base.apk!/lib/x86, /system/lib, /vendor/lib]] E/MethodChannel#plugins.flutter.io/local_auth(10611): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125) E/MethodChannel#plugins.flutter.io/local_auth(10611): at java.lang.ClassLoader.loadClass(ClassLoader.java:379) E/MethodChannel#plugins.flutter.io/local_auth(10611): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/MethodChannel#plugins.flutter.io/local_auth(10611): ... 44 more
That's my conf
[✓] Flutter: is fully installed. (Channel stable, v1.17.3, on Mac OS X 10.15.5 19F101, locale en-IT)
[✓] Android toolchain - develop for Android devices: is fully installed. (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS: is fully installed. (Xcode 11.5)
[✓] Android Studio: is fully installed. (version 3.6)
[✓] VS Code: is fully installed. (version 1.45.1)
[✓] Connected device: is fully installed. (1 available)
Any suggestions will be appreciated
For me helps:
Activity
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}
Manifest
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="your label"
android:icon="#mipmap/ic_launcher">
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in #style/LaunchTheme). -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="#style/NormalTheme"
/>
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="#drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<!-- The Agora SDK requires Bluetooth permissions in case users are using Bluetooth devices.-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
I'm probably late, but today I had the same problem and for me was useful to follow this solution
https://github.com/hnvn/flutter_image_cropper/issues/78
Remove these parts
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "27.1.1"
}
if (details.requested.group == 'androidx.core'
&& !details.requested.name.contains('androidx') ) {
details.useVersion "1.0.1"
}
if (requested.group == "androidx") {
if (!requested.name.startsWith("multidex")) {
details.useVersion "${targetSdk}.+"
}
from Android/build.gradle
I solve my issue...
i removed
if (
details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex')
) {
details.useVersion "27.1.1"
}
if (
details.requested.group == 'androidx.core'
&& !details.requested.name.contains('androidx')
) {
details.useVersion "1.0.1"
}
if (requested.group == "androidx" && !requested.name.startsWith("multidex")) {
details.useVersion "${targetSdk}.+"
}
from android/build.gradle
and it work
My app crashes every time I try to launch the RegisterActivity. I have swapped out several other activities and the button launches them. Just not RegisterActivity. It is in the Manifest and there are no errors. I cannot figure out the problem. Any help will be greatly appreciated. Code follows:
// Link to Register Screen
btnLinkToRegister.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent(v.getContext(), RegisterActivity.class);
startActivityForResult(intent, 0);
The Activity that crashes the app:
package com.dip.allnavyinfo;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
public class RegisterActivity extends Activity {
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Set View to register.xml
setContentView(R.layout.register);
TextView loginScreen = (TextView) findViewById(R.id.link_to_login);
// Listening to Login Screen link
loginScreen.setOnClickListener(new View.OnClickListener() {
public void onClick(View arg0) {
// Closing registration screen
// Switching to Login Screen/closing register screen
finish();
}
});
}
}
LogCat:
08-25 06:44:15.677: E/AndroidRuntime(1200): FATAL EXCEPTION: main
08-25 06:44:15.677: E/AndroidRuntime(1200): java.lang.RuntimeException: Unable to instantiate application android.app.Application: java.lang.IllegalStateException: Unable to get package info for com.dip.allnavyinfo; is package not installed?
08-25 06:44:15.677: E/AndroidRuntime(1200): at android.app.LoadedApk.makeApplication(LoadedApk.java:509)
08-25 06:44:15.677: E/AndroidRuntime(1200): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4417)
08-25 06:44:15.677: E/AndroidRuntime(1200): at android.app.ActivityThread.access$1300(ActivityThread.java:141)
08-25 06:44:15.677: E/AndroidRuntime(1200): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
08-25 06:44:15.677: E/AndroidRuntime(1200): at android.os.Handler.dispatchMessage(Handler.java:99)
08-25 06:44:15.677: E/AndroidRuntime(1200): at android.os.Looper.loop(Looper.java:137)
08-25 06:44:15.677: E/AndroidRuntime(1200): at android.app.ActivityThread.main(ActivityThread.java:5103)
08-25 06:44:15.677: E/AndroidRuntime(1200): at java.lang.reflect.Method.invokeNative(Native Method)
08-25 06:44:15.677: E/AndroidRuntime(1200): at java.lang.reflect.Method.invoke(Method.java:525)
08-25 06:44:15.677: E/AndroidRuntime(1200): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
08-25 06:44:15.677: E/AndroidRuntime(1200): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
08-25 06:44:15.677: E/AndroidRuntime(1200): at dalvik.system.NativeStart.main(Native Method)
08-25 06:44:15.677: E/AndroidRuntime(1200): Caused by: java.lang.IllegalStateException: Unable to get package info for com.dip.allnavyinfo; is package not installed?
08-25 06:44:15.677: E/AndroidRuntime(1200): at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:369)
08-25 06:44:15.677: E/AndroidRuntime(1200): at android.app.LoadedApk.getClassLoader(LoadedApk.java:322)
08-25 06:44:15.677: E/AndroidRuntime(1200): at android.app.LoadedApk.makeApplication(LoadedApk.java:501)
08-25 06:44:15.677: E/AndroidRuntime(1200): ... 11 more
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dip.allnavyinfo"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".SplashScreenActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Main Activity -->
<activity
android:name=".MainActivity"
android:label="#string/main" >
</activity>
<activity
android:name=".Bibs"
android:label="#string/title_activity_bibs" >
</activity>
<activity
android:name=".LoginActivity"
android:label="#string/lgnlbl">
</activity>
<activity
android:name=".RegisterActivity"
android:label="#string/reglbl">
</activity>
</application>
<uses-permission
android:name="android.permission.INTERNET" />
</manifest>
1- make sure that you have defined the activity RegisterActivity in your Manifest
2- change this :
Intent intent = new Intent(v.getContext(), RegisterActivity.class);
startActivityForResult(intent, 0);
into
Intent intent = new Intent(yourCurrentActivity.this, RegisterActivity.class);
startActivity(intent);
I had the same problem, I fixed it by sorting out my async tasks. I was making two calls in the same thread, once I separated them into two threads the problem was solved.
It is very frustrating that when running said app on a device or an emulator the "Unfortunately, app name has stopped" error came up. I believe that (by looking at the LogCat) I have pinpointed the problem to the error "java.lang.ClassNotFoundException". How I can fix this?
This is my manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.benchaful.newboard"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name="com.benchaful.newBoard.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:configChanges="keyboard|keyboardHidden|orientation" />
</application>
<uses-sdk android:targetSdkVersion="16" android:minSdkVersion="7" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
</manifest>
This is my main layout file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res/com.benchaful.newboard"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/scrollview1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<LinearLayout android:layout_width="fill_parent"
android:id="#+id/home_layout"
android:orientation="vertical"
android:layout_height="wrap_content"
android:background="#000000"
>
There is some buttons here
<WebView
android:id="#+id/accesskey"
android:layout_width="fill_parent"
android:layout_height="100px"
/>
</LinearLayout>
</ScrollView>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res/com.benchaful.newboard"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#ffffff"
android:gravity="bottom"
android:layout_alignParentBottom="true"
android:layout_alignBottom="#+id/home_layout"
>
<com.google.ads.AdView
xmlns:ads="http://schemas.android.com/apk/libs/com.google.ads"
android:id="#+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="a151a7cc8c54403"
ads:adSize="BANNER"
/>
</LinearLayout>
</RelativeLayout>
And this is my LogCat
06-06 20:03:05.355: E/AndroidRuntime(8409): FATAL EXCEPTION: main
06-06 20:03:05.355: E/AndroidRuntime(8409): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.benchaful.newboard/com.benchaful.newBoard.activity}: java.lang.ClassNotFoundException: com.benchaful.newBoard.activity
06-06 20:03:05.355: E/AndroidRuntime(8409): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2045)
06-06 20:03:05.355: E/AndroidRuntime(8409): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2146)
06-06 20:03:05.355: E/AndroidRuntime(8409): at android.app.ActivityThread.access$700(ActivityThread.java:140)
06-06 20:03:05.355: E/AndroidRuntime(8409): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1238)
06-06 20:03:05.355: E/AndroidRuntime(8409): at android.os.Handler.dispatchMessage(Handler.java:99)
06-06 20:03:05.355: E/AndroidRuntime(8409): at android.os.Looper.loop(Looper.java:137)
06-06 20:03:05.355: E/AndroidRuntime(8409): at android.app.ActivityThread.main(ActivityThread.java:4944)
06-06 20:03:05.355: E/AndroidRuntime(8409): at java.lang.reflect.Method.invokeNative(Native Method)
06-06 20:03:05.355: E/AndroidRuntime(8409): at java.lang.reflect.Method.invoke(Method.java:511)
06-06 20:03:05.355: E/AndroidRuntime(8409): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
06-06 20:03:05.355: E/AndroidRuntime(8409): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
06-06 20:03:05.355: E/AndroidRuntime(8409): at dalvik.system.NativeStart.main(Native Method)
06-06 20:03:05.355: E/AndroidRuntime(8409): Caused by: java.lang.ClassNotFoundException: com.benchaful.newBoard.activity
06-06 20:03:05.355: E/AndroidRuntime(8409): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
06-06 20:03:05.355: E/AndroidRuntime(8409): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
06-06 20:03:05.355: E/AndroidRuntime(8409): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
06-06 20:03:05.355: E/AndroidRuntime(8409): at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
06-06 20:03:05.355: E/AndroidRuntime(8409): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2036)
Check the name of your class in manifest file.
change com.benchaful.newBoard.activity to com.benchaful.newBoard.activity.ComponentInfo
activity android:name="com.benchaful.newBoard.activity.ComponentInfo"...
I am trying to get the HoloEverywhere class AutoCompleteTextView to work with my app. The main reason for this is I want the Holo theme to work on pre 3.0 devices (specifically API levels 8-10) Here is my main activity code:
package com.example.testautocomp;
import org.holoeverywhere.widget.AutoCompleteTextView;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
public class MainActivity extends Activity {
private AutoCompleteTextView m_edit;
private static final String[] items = { "lorem", "ipsum", "dolor", "sit",
"amet", "consectetuer", "adipiscing", "elit", "morbi", "vel",
"augue", "purus", "sitter", "sitting", "sither", "sithar" };
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
m_edit = (AutoCompleteTextView)findViewById(R.id.edit2);
m_edit.setAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_dropdown_item_1line, items));
}
}
also my activity_main.xml code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<AutoCompleteTextView
android:id="#+id/edit2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:completionThreshold="1"
android:hint="Testing" />
</LinearLayout>
When I run my app, it goes into the debugger for eclipse and after pressing resume (or F8) to continue the thread, my app crashes/force closes and I get the following error in my LogCat:
04-19 17:52:56.342: W/dalvikvm(675): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
04-19 17:52:56.422: E/AndroidRuntime(675): FATAL EXCEPTION: main
04-19 17:52:56.422: E/AndroidRuntime(675): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.testautocomp/com.example.testautocomp.MainActivity}: java.lang.ClassCastException: android.widget.AutoCompleteTextView cannot be cast to org.holoeverywhere.widget.AutoCompleteTextView
04-19 17:52:56.422: E/AndroidRuntime(675): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
04-19 17:52:56.422: E/AndroidRuntime(675): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
04-19 17:52:56.422: E/AndroidRuntime(675): at android.app.ActivityThread.access$600(ActivityThread.java:123)
04-19 17:52:56.422: E/AndroidRuntime(675): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
04-19 17:52:56.422: E/AndroidRuntime(675): at android.os.Handler.dispatchMessage(Handler.java:99)
04-19 17:52:56.422: E/AndroidRuntime(675): at android.os.Looper.loop(Looper.java:137)
04-19 17:52:56.422: E/AndroidRuntime(675): at android.app.ActivityThread.main(ActivityThread.java:4424)
04-19 17:52:56.422: E/AndroidRuntime(675): at java.lang.reflect.Method.invokeNative(Native Method)
04-19 17:52:56.422: E/AndroidRuntime(675): at java.lang.reflect.Method.invoke(Method.java:511)
04-19 17:52:56.422: E/AndroidRuntime(675): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-19 17:52:56.422: E/AndroidRuntime(675): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-19 17:52:56.422: E/AndroidRuntime(675): at dalvik.system.NativeStart.main(Native Method)
04-19 17:52:56.422: E/AndroidRuntime(675): Caused by: java.lang.ClassCastException: android.widget.AutoCompleteTextView cannot be cast to org.holoeverywhere.widget.AutoCompleteTextView
04-19 17:52:56.422: E/AndroidRuntime(675): at com.example.testautocomp.MainActivity.onCreate(MainActivity.java:22)
04-19 17:52:56.422: E/AndroidRuntime(675): at android.app.Activity.performCreate(Activity.java:4465)
04-19 17:52:56.422: E/AndroidRuntime(675): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
04-19 17:52:56.422: E/AndroidRuntime(675): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
04-19 17:52:56.422: E/AndroidRuntime(675): ... 11 more
How do i fix this CastClassException?
No, your action above incorrect. You should change activity base class on org.holoeverywhere.app.Activity.
Very similar to this question
Fixed it by changing my main_activity.xml to:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<org.holoeverywhere.widget.AutoCompleteTextView
android:id="#+id/edit2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:completionThreshold="1"
android:hint="Testing" />
</LinearLayout>
the main part being org.holoeverywhere.widget.AutoCompleteTextView
i created application in android 2.33 . i used apk v2 keys and i followed all the steps but still its showing error
**xml**
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.MapFragment" />
**Mainfest**
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.Maps.mappv2"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<permission
android:name="com.Maps.mappv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.Maps.mappv2.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.
permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<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>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="mm" />
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyA64MFhpngQBkXP5__fvHeLE0xAXWKwfgU"/>
</application>
</manifest>
**Activity**
public class MainActivity extends Activity {
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
i included google-play-services jar library file but still it showing un expectedly stoped...
**The error are**
12-22 20:51:59.344: E/Trace(698): error opening trace file: No such file or directory (2)
12-22 20:52:00.165: E/AndroidRuntime(698): FATAL EXCEPTION: main
12-22 20:52:00.165: E/AndroidRuntime(698): java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable
12-22 20:52:00.165: E/AndroidRuntime(698): at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source)
12-22 20:52:00.165: E/AndroidRuntime(698): at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
12-22 20:52:00.165: E/AndroidRuntime(698): at android.app.Activity.onCreateView(Activity.java:4663)
12-22 20:52:00.165: E/AndroidRuntime(698): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
12-22 20:52:00.165: E/AndroidRuntime(698): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
12-22 20:52:00.165: E/AndroidRuntime(698): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
12-22 20:52:00.165: E/AndroidRuntime(698): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
12-22 20:52:00.165: E/AndroidRuntime(698): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
12-22 20:52:00.165: E/AndroidRuntime(698): at android.app.Activity.setContentView(Activity.java:1867)
12-22 20:52:00.165: E/AndroidRuntime(698): at com.Maps.mappv2.MainActivity.onCreate(MainActivity.java:13)
12-22 20:52:00.165: E/AndroidRuntime(698): at android.app.Activity.performCreate(Activity.java:5008)
12-22 20:52:00.165: E/AndroidRuntime(698): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
12-22 20:52:00.165: E/AndroidRuntime(698): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
12-22 20:52:00.165: E/AndroidRuntime(698): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
12-22 20:52:00.165: E/AndroidRuntime(698): at android.app.ActivityThread.access$600(ActivityThread.java:130)
12-22 20:52:00.165: E/AndroidRuntime(698): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
12-22 20:52:00.165: E/AndroidRuntime(698): at android.os.Handler.dispatchMessage(Handler.java:99)
12-22 20:52:00.165: E/AndroidRuntime(698): at android.os.Looper.loop(Looper.java:137)
12-22 20:52:00.165: E/AndroidRuntime(698): at android.app.ActivityThread.main(ActivityThread.java:4745)
12-22 20:52:00.165: E/AndroidRuntime(698): at java.lang.reflect.Method.invokeNative(Native Method)
12-22 20:52:00.165: E/AndroidRuntime(698): at java.lang.reflect.Method.invoke(Method.java:511)
12-22 20:52:00.165: E/AndroidRuntime(698): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
12-22 20:52:00.165: E/AndroidRuntime(698): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-22 20:52:00.165: E/AndroidRuntime(698): at dalvik.system.NativeStart.main(Native Method)
12-22 20:52:39.734: E/Trace(724): error opening trace file: No such file or directory (2)
12-22 20:52:40.244: E/AndroidRuntime(724): FATAL EXCEPTION: main
12-22 20:52:40.244: E/AndroidRuntime(724): java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable
12-22 20:52:40.244: E/AndroidRuntime(724): at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source)
12-22 20:52:40.244: E/AndroidRuntime(724): at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
12-22 20:52:40.244: E/AndroidRuntime(724): at android.app.Activity.onCreateView(Activity.java:4663)
12-22 20:52:40.244: E/AndroidRuntime(724): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
12-22 20:52:40.244: E/AndroidRuntime(724): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
12-22 20:52:40.244: E/AndroidRuntime(724): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
12-22 20:52:40.244: E/AndroidRuntime(724): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
12-22 20:52:40.244: E/AndroidRuntime(724): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
12-22 20:52:40.244: E/AndroidRuntime(724): at android.app.Activity.setContentView(Activity.java:1867)
12-22 20:52:40.244: E/AndroidRuntime(724): at com.Maps.mappv2.MainActivity.onCreate(MainActivity.java:13)
12-22 20:52:40.244: E/AndroidRuntime(724): at android.app.Activity.performCreate(Activity.java:5008)
12-22 20:52:40.244: E/AndroidRuntime(724): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
12-22 20:52:40.244: E/AndroidRuntime(724): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
12-22 20:52:40.244: E/AndroidRuntime(724): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
12-22 20:52:40.244: E/AndroidRuntime(724): at android.app.ActivityThread.access$600(ActivityThread.java:130)
12-22 20:52:40.244: E/AndroidRuntime(724): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
12-22 20:52:40.244: E/AndroidRuntime(724): at android.os.Handler.dispatchMessage(Handler.java:99)
12-22 20:52:40.244: E/AndroidRuntime(724): at android.os.Looper.loop(Looper.java:137)
12-22 20:52:40.244: E/AndroidRuntime(724): at android.app.ActivityThread.main(ActivityThread.java:4745)
12-22 20:52:40.244: E/AndroidRuntime(724): at java.lang.reflect.Method.invokeNative(Native Method)
12-22 20:52:40.244: E/AndroidRuntime(724): at java.lang.reflect.Method.invoke(Method.java:511)
12-22 20:52:40.244: E/AndroidRuntime(724): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
12-22 20:52:40.244: E/AndroidRuntime(724): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-22 20:52:40.244: E/AndroidRuntime(724): at dalvik.system.NativeStart.main(Native Method)
12-22 20:52:49.084: E/Trace(738): error opening trace file: No such file or directory (2)
12-22 20:52:49.624: E/AndroidRuntime(738): FATAL EXCEPTION: main
12-22 20:52:49.624: E/AndroidRuntime(738): java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable
12-22 20:52:49.624: E/AndroidRuntime(738): at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source)
12-22 20:52:49.624: E/AndroidRuntime(738): at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
12-22 20:52:49.624: E/AndroidRuntime(738): at android.app.Activity.onCreateView(Activity.java:4663)
12-22 20:52:49.624: E/AndroidRuntime(738): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
12-22 20:52:49.624: E/AndroidRuntime(738): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
12-22 20:52:49.624: E/AndroidRuntime(738): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
12-22 20:52:49.624: E/AndroidRuntime(738): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
12-22 20:52:49.624: E/AndroidRuntime(738): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
12-22 20:52:49.624: E/AndroidRuntime(738): at android.app.Activity.setContentView(Activity.java:1867)
12-22 20:52:49.624: E/AndroidRuntime(738): at com.Maps.mappv2.MainActivity.onCreate(MainActivity.java:13)
12-22 20:52:49.624: E/AndroidRuntime(738): at android.app.Activity.performCreate(Activity.java:5008)
12-22 20:52:49.624: E/AndroidRuntime(738): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
12-22 20:52:49.624: E/AndroidRuntime(738): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
12-22 20:52:49.624: E/AndroidRuntime(738): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
12-22 20:52:49.624: E/AndroidRuntime(738): at android.app.ActivityThread.access$600(ActivityThread.java:130)
12-22 20:52:49.624: E/AndroidRuntime(738): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
12-22 20:52:49.624: E/AndroidRuntime(738): at android.os.Handler.dispatchMessage(Handler.java:99)
12-22 20:52:49.624: E/AndroidRuntime(738): at android.os.Looper.loop(Looper.java:137)
12-22 20:52:49.624: E/AndroidRuntime(738): at android.app.ActivityThread.main(ActivityThread.java:4745)
12-22 20:52:49.624: E/AndroidRuntime(738): at java.lang.reflect.Method.invokeNative(Native Method)
12-22 20:52:49.624: E/AndroidRuntime(738): at java.lang.reflect.Method.invoke(Method.java:511)
12-22 20:52:49.624: E/AndroidRuntime(738): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
12-22 20:52:49.624: E/AndroidRuntime(738): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-22 20:52:49.624: E/AndroidRuntime(738): at dalvik.system.NativeStart.main(Native Method)
Try clean build both the Library Project and Normal projects First. Is not worked check the following :
i included google-play-services jar library file
You don't have to include the jar. You have to import as android library project.
Import the library project in your workspace
Add it to your project as library
Then build the app
Reason:
The library project has some xml resources. So the project cannot be imported as jar.
java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable
As log says styleable cannot be referenced as you haven't built resources.
The R file is a generated one.
From jar u cannot get reference to
Drawables (images)
xml resources [Styles, Strings etc.]
If you are using Android 2.3.3 you need to use SupportMapFragment instead of MapFragment and FragmentActivity instead of Activity.
In the onCreate of your activity you can add the SupportMapFragment...
SupportMapFragment fragment = new SupportMapFragment();
getSupportFragmentManager().beginTransaction()
.add(android.R.id.content, fragment).commit();