I've written a library (game engine) and would like to use it for my apps and games that I'll be creating.
I see there are two ways to add libraries to your code:
Export to jar and add that to build path
Have it as a project file its self, and simply add project to build path.
I've tried the second method, yet I get a:
Unable to instantiate activity error
Stack trace:
[2012-07-15 21:06:08 - ScienceProject] ------------------------------
[2012-07-15 21:06:08 - ScienceProject] Android Launch! [2012-07-15
21:06:08 - ScienceProject] adb is running normally. [2012-07-15
21:06:08 - ScienceProject] Performing
com.webstorms.scienceproject.ScienceProjectActivity activity launch
[2012-07-15 21:06:08 - ScienceProject] Automatic Target Mode: using
existing emulator 'emulator-5554' running compatible AVD 'HVGA'
[2012-07-15 21:06:09 - ScienceProject] Application already deployed.
No need to reinstall. [2012-07-15 21:06:09 - ScienceProject] Project
dependency found, installing: WSGameEngine [2012-07-15 21:06:10 -
WSGameEngine] Application already deployed. No need to reinstall.
[2012-07-15 21:06:10 - ScienceProject] Starting activity
com.webstorms.scienceproject.ScienceProjectActivity on device
emulator-5554 [2012-07-15 21:06:12 - ScienceProject] ActivityManager:
Starting: Intent { act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER]
cmp=com.webstorms.scienceproject/.ScienceProjectActivity }
Related
[2014-11-28 01:06:23 - GoogleMapsAndroidv2] ------------------------------
[2014-11-28 01:06:23 - GoogleMapsAndroidv2] Android Launch!
[2014-11-28 01:06:23 - GoogleMapsAndroidv2] adb is running normally.
[2014-11-28 01:06:23 - GoogleMapsAndroidv2] Performing info.tekguc.umut.googlemapsmapsandroidv2.MainActivity activity launch
[2014-11-28 01:06:23 - GoogleMapsAndroidv2] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'first'
[2014-11-28 01:06:24 - GoogleMapsAndroidv2] Application already deployed. No need to reinstall.
**[2014-11-28 01:06:24 - appcompat_v7] Could not find appcompat_v7.apk!**
[2014-11-28 01:06:24 - GoogleMapsAndroidv2] Project dependency found, installing: DemoGoogleMapsV2
[2014-11-28 01:06:26 - DemoGoogleMapsV2] Application already deployed. No need to reinstall.
[2014-11-28 01:06:26 - GoogleMapsAndroidv2] Starting activity info.tekguc.umut.googlemapsmapsandroidv2.MainActivity on device emulator-5554
[2014-11-28 01:06:27 - GoogleMapsAndroidv2] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=info.tekguc.umut.googlemapsmapsandroidv2/.MainActivity }
How can I solve this problem? Thanks everyone
Remove the appcompat-v7 library from Projects in the Build Path. And don't set it as Order and Export in the Order and Export tab in the Build Path. But set the library in the Properties->Android. Make sure it has a check mark and you are good to go.
A good question about this here: Android Could not find android-support-v7-appcompat.apk error
I have imported existing project from com_example.android.softkeyboard from sdk sample code.
When I tried to run it launch get cancel and it give some error as follows
[2013-01-07 22:09:45 - com_example_android_softkeyboard] ------------------------------
[2013-01-07 22:09:45 - com_example_android_softkeyboard] Android Launch!
[2013-01-07 22:09:45 - com_example_android_softkeyboard] adb is running normally.
[2013-01-07 22:09:45 - com_example_android_softkeyboard] No Launcher activity found!
[2013-01-07 22:09:45 - com_example_android_softkeyboard] The launch will only sync the application package on the device!
[2013-01-07 22:09:45 - com_example_android_softkeyboard] Performing sync
[2013-01-07 22:10:00 - com_example_android_softkeyboard] WARNING: Application does not specify an API level requirement!
[2013-01-07 22:10:00 - com_example_android_softkeyboard] Device API version is 10 (Android 2.3.4)
[2013-01-07 22:10:00 - com_example_android_softkeyboard] Uploading com_example_android_softkeyboard.apk onto device 'emulator-5554'
[2013-01-07 22:10:00 - com_example_android_softkeyboard] Installing com_example_android_softkeyboard.apk...
[2013-01-07 22:10:17 - com_example_android_softkeyboard] Re-installation failed due to different application signatures.
[2013-01-07 22:10:17 - com_example_android_softkeyboard] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2013-01-07 22:10:17 - com_example_android_softkeyboard] Please execute 'adb uninstall com.example.android.softkeyboard' in a shell.
[2013-01-07 22:10:17 - com_example_android_softkeyboard] Launch canceled!
Please help me to run application.
The log tells you exactly what the problem is and how to fix it:
Installing com_example_android_softkeyboard.apk...
[2013-01-07 22:10:17 - com_example_android_softkeyboard] Re-installation failed due to different application signatures.
[2013-01-07 22:10:17 - com_example_android_softkeyboard] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2013-01-07 22:10:17 - com_example_android_softkeyboard] Please execute 'adb uninstall com.example.android.softkeyboard' in a shell.
[2013-01-07 22:10:17 - com_example_android_softkeyboard] Launch canceled!
There is already a version of com.example.android.softkeyboard installed on your emulator and you need to remove (uninstall) that one before you install your new one.
I have opened the Android Emulator for my first set of code change. Then later i change some of my code. Should i want to close the emulator and relaunch (re-run) the code to reflect my new changes? or else simply pressing run key in eclipse will reflect the changes?
Please clarify.
PS : Till now, i wont close and relaunch the emulator for every code change. But today i faced the error in console like "Application already running, uninstall the application and try". That's why i have doubt on this.
You do not need to relaunch the emulator, pressing the Run button in Eclipse will work.
When you receive a message similar to this one:
Re-installation failed due to different application signatures.
You must perform a full uninstall of the application. WARNING: ...This will remove the application data!
Please execute 'adb uninstall com.antew.code' in a shell.
Open a command prompt and use:
adb uninstall <package name>
e.g.
adb uninstall com.antew.code
Then relaunch the application from Eclipse to install it again. The adb exe is in the /platform-tools/ folder of the SDK.
no need to close the emulator at all .............
the message is due to as some time application is in front (running) emulator denys to re-run . For this just simply close the app by back button and run from eclipse
There is no need to restart the emulator for a code change -- simply "Run"ning it from Eclipse does the trick. I think the reason you're getting that error is that you're trying to run it with no code changes.
Don't restart your emulator for every changes made. Just deploy your application on the emulator.
If you won't face the Application already running, uninstall the application and trybe sure that your application is not started in the emulator.
If it is,just switch to another ativity and then try deploy your application.
There is no need to restart the emulator!!!
You simply need to run youe application again from eclipse(Ctrl + F11). If you have done any changes in code(and saved them all) then on running the application you will get output something like below
[2013-06-19 13:19:12 - MyFirstApp] ------------------------------
[2013-06-19 13:19:12 - MyFirstApp] Android Launch!
[2013-06-19 13:19:12 - MyFirstApp] adb is running normally.
[2013-06-19 13:19:12 - MyFirstApp] Performing com.example.myfirstapp.MainActivity activity launch
[2013-06-19 13:19:12 - MyFirstApp] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'Micromax_A_68'
[2013-06-19 13:19:12 - MyFirstApp] Uploading MyFirstApp.apk onto device 'emulator-5554'
[2013-06-19 13:19:14 - MyFirstApp] Installing MyFirstApp.apk...
[2013-06-19 13:19:26 - MyFirstApp] Success!
[2013-06-19 13:19:26 - MyFirstApp] Starting activity com.example.myfirstapp.MainActivity on device emulator-5554
[2013-06-19 13:19:28 - MyFirstApp] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.myfirstapp/.MainActivity
Above logs are specific to my app but you get the point... If you have no changes saved then you will get some additional output lines as follows
...
[2013-06-19 13:22:10 - MyFirstApp] Application already deployed. No need to reinstall.
...
I saw many similar questions, but the solution was not found, so i'm asking:
When i'm debuging the my android app NONE of the variables are shown in the "Variables" window. The console shows me that the debuger is not fully loaded.
[2012-02-21 22:23:29 - Watcher] Android Launch!
[2012-02-21 22:23:29 - Watcher] adb is running normally.
[2012-02-21 22:23:29 - Watcher] Performing com.workspace.watcher.WatcherActivity activity launch
[2012-02-21 22:23:29 - Watcher] Automatic Target Mode: using device 'F4559C737D65'
[2012-02-21 22:23:32 - Watcher] Application already deployed. No need to reinstall.
[2012-02-21 22:23:32 - Watcher] Starting activity com.workspace.watcher.WatcherActivity on device F4559C737D65
[2012-02-21 22:23:33 - Watcher] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.workspace.watcher/.WatcherActivity }
[2012-02-21 22:23:34 - Watcher] Attempting to connect debugger to 'com.workspace.watcher' on port 8601
What is the problem? How can i fix it?
After talking with Chorche in chat we determined that the problem was he did not set any breakpoints and as such there were no available variables to read.
This seems to be a pretty good explanation / tutorial on debugging using eclipse: http://www.vogella.de/articles/EclipseDebugging/article.html
Logcat output:
[2010-01-09 15:47:19 - HelloMapView]------------------------------
[2010-01-09 15:47:19 - HelloMapView]Android Launch!
[2010-01-09 15:47:19 - HelloMapView]adb is running normally.
[2010-01-09 15:47:19 - HelloMapView]Performing org.example.hellomapview.HelloMapView activity launch
[2010-01-09 15:47:19 - HelloMapView]Failed to find an AVD compatible with target 'Google APIs'.
[2010-01-09 15:47:21 - HelloMapView]Performing org.example.hellomapview.HelloMapView activity launch
[2010-01-09 15:47:22 - HelloMapView]Application already deployed. No need to reinstall.
[2010-01-09 15:47:22 - HelloMapView]Starting activity org.example.hellomapview.HelloMapView on device
[2010-01-09 15:47:23 - HelloMapView]ActivityManager: Can't dispatch DDM chunk 46454154: no handler defined
[2010-01-09 15:47:23 - HelloMapView]ActivityManager: Can't dispatch DDM chunk 4d505251: no handler defined
[2010-01-09 15:47:23 - HelloMapView]ActivityManager: Starting: Intent { comp={org.example.hellomapview/org.example.hellomapview.HelloMapView} }
When I run my application it is showing the above error. I am not able to run myMap application I used the same code what they have given in myMap application. Please help me.
The log message Failed to find an AVD compatible with target 'Google APIs' says it all.
You need to create an emulator that includes the Google APIs (and therefore the Google Maps library).
There's a GUI that lets you manage and create new emulator images; just run android from your SDK tools folder.