Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Jakub Hejný
Courses Plus Student 317 PointsAndroid studio error
Hello,
i tried to run the android emulator for the first time but there is below error. When the emulator appears, there is cell phone screen but shows locked cell screen.
Waiting for device. C:\java\android-studio\sdk\tools\emulator.exe -avd Android442 -netspeed full -netdelay none
Device connected: emulator-5554 Device Android442 [emulator-5554] is online, waiting for processes to start up.. Device Android442 [emulator-5554] is online, waiting for processes to start up.. Device Android442 [emulator-5554] is online, waiting for processes to start up.. Device Android442 [emulator-5554] is online, waiting for processes to start up.. Device Android442 [emulator-5554] is online, waiting for processes to start up.. Device is ready: Android442 [emulator-5554] Target device: Android442 [emulator-5554] Uploading file local path: C:\Users\ADM\AndroidStudioProjects\MyApplication\app\build\outputs\apk\app-debug.apk remote path: /data/local/tmp/Hejny.myapplication Installing Hejny.myapplication DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/Hejny.myapplication" pkg: /data/local/tmp/Hejny.myapplication Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
Harry James
14,780 PointsAs jason phillips has said, the problem lies in your AndroidManifest.xml file. Please provide it here and we'll take a look :)
3 Answers
jason phillips
18,131 PointsCan you post your manifest file for the project?
Jakub Hejný
Courses Plus Student 317 Points<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="Hejny.myapplication" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".Funfactsactivity"
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>
jason phillips
18,131 PointsIt looks like there is an extra carrot on the first line:
package="Hejny.myapplication" >
should be
package="Hejny.myapplication"
Harry James
14,780 PointsHello again Jakub,
Many users have had this issue as a result of having capital letters in the package name. If you change your package name from Hejny.myapplication to hejny.myapplication, it should fix the issue.
To do this, right-click on your package and press Refactor then Rename. Then, enter the new name. Make sure that you have all boxes on the dialog checked. Else, you may get errors in your xml files. Then, press Preview and then OK.
If you still have errors, go to Project and then Clean. Then, select Clean all projects (Or if you have a lot of projects, just choose the one you're working on). After that, press OK.
If you still have errors after that, open up your AndroidManifest.xml file in the XML View and look for any errors (Sometimes refactoring the package name doesn't quite work well for XML files). Usually, you'll understand what's gone wrong and will be able to manually correct it. If you still have errors and don't understand how to fix them, you can attach the code with errors here or post a link to your project files and I'll take a look :)
Alfred Angkasa
2,413 PointsAlfred Angkasa
2,413 PointsHello, have you install your emulator correctly? i means have you place the correct path?
Thanks