Forums Register Login

Error in my Android Application that uses Google Maps

+Pie Number of slices to send: Send
I am making an Android Application that has more then 65K methods just by importing Google Maps library and I followed the steps to import the multidex library.However when I run the application I get this error:

Installation failed with message INSTALL_PARSE_FAILED_MANIFEST_MALFORMED.

here is my Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.multidex.myapplicatio n">

<uses-permission android:name="android.permission.WRITE_EXTERNAL_ST ORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_ST ATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="com.google.android.providers.gsf.per mission.READ_GSERVICES"/>

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name="com.example.android.mymaps5.MainActi vity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="my_API_KEY"/>

<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>

<meta-data android:name="android.support.multidex.MultiDexApp lication"/>


</application>

</manifest>

I assume the error is related to the package name in the Manifest.

Thanks in advance!
1
+Pie Number of slices to send: Send
There's a bunch of spaces in that listing. Please post it again using the code tags. The Code button above will help.

The image might look different if you are using the new UI.
Untitled.png
[Untitled.png]
+Pie Number of slices to send: Send
I am making an Android Application that has more then 65K methods just by importing Google Maps library and I followed the steps to import the multidex library.However when I run the application I get this error:

Installation failed with message INSTALL_PARSE_FAILED_MANIFEST_MALFORMED.

here is my Manifest:



I assume the error is related to the package name in the Manifest.

Thanks in advance!
+Pie Number of slices to send: Send
 

Titus Vasilescu wrote:[code=java]I am making



Getting there!

The tag goes in front of the actual code, not the beginning of the post. More importantly, there needs to be a closing tag at the end (of the code)! The closing tag is (without the space): [ /code]
+Pie Number of slices to send: Send
I fixed the code tags for you this time.  Only your code goes between the code tags, and remember you need a closing tag as well.

[code] .. code goes here .. [/code]
+Pie Number of slices to send: Send
 

Ron McLeod wrote:I fixed the code tags for you.


Than-x.

Is it possible the added spaces are due to the code tags not being there? The spaces would cause error if in the actual xml file.
+Pie Number of slices to send: Send
I don't think the spaces have anything to do with code tags.  Either they are like that in the manifest file (which would explain the malformed error message that he is receiving), or something happened when copying from the manifest file to the post.
+Pie Number of slices to send: Send
I've deleted the white spaces and I still get the same error!Since when we're not allowed to put white spaces in the Android Manifest?
+Pie Number of slices to send: Send
 

Titus Vasilescu wrote:I apologize for the mistake.I've deleted the white spaces and I still get the same error!Since when we're not allowed to put white spaces in the Android Manifest?

 
+Pie Number of slices to send: Send
 

Titus Vasilescu wrote:I've deleted the white spaces and I still get the same error!Since when we're not allowed to put white spaces in the Android Manifest?



Whitespace is fine. It's the spaces in the words themselves that we were commenting on. Though, that may just be due to how they were posted and not really exist in your manifest file. Please post the manifest file you are using inside code tags.

Screenshot-2016-07-20-16.46.38.png
[Screenshot-2016-07-20-16.46.38.png]
+Pie Number of slices to send: Send
After a couple of days I've figured it out. It was the third <meta-data/> statement.I've just deleted it!

<meta-data android:name="android.support.multidex.MultiDexApplication"/>

And I added it according to the instructions on https://developer.android.com/studio/build/multidex.html

Because what I am really after is implementing GoogleMaps into an application.This import will make the app to exceed the 65K methods limit which in turn will require the MultiDex import.

https://developer.android.com/reference/android/support/multidex/MultiDexApplication.html
+Pie Number of slices to send: Send
 

Titus Vasilescu wrote:After a couple of days I've figured it out. It was the third <meta-data/> statement.I've just deleted it!

<meta-data android:name="android.support.multidex.MultiDexApplication"/>

And I added it according to the instructions on https://developer.android.com/studio/build/multidex.html

Because what I am really after is implementing GoogleMaps into an application.This import will make the app to exceed the 65K methods limit which in turn will require the MultiDex import.

https://developer.android.com/reference/android/support/multidex/MultiDexApplication.html



Thank you for reporting your solution!
crispy bacon. crispy tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 20221 times.
Similar Threads
Device is not supported
Android app runs fine when running from eclipse on the device but the installed app crashes
Failure to load map, I cannot get Google Maps V2 to show map
Why is my listview not returning me to my DetailActivity.class when I'm clicking an item on listview
Not sure whats wrong in my main.xml file
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 00:31:10.