• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error in my Android Application that uses Google Maps

 
Titus Vasilescu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Brian Tkatch
Bartender
Posts: 567
25
Linux Notepad Oracle
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
[Thumbnail for Untitled.png]
 
Titus Vasilescu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Brian Tkatch
Bartender
Posts: 567
25
Linux Notepad Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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]
 
Ron McLeod
Bartender
Pie
Posts: 1027
64
Android Eclipse IDE Java Linux MySQL Database Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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]
 
Brian Tkatch
Bartender
Posts: 567
25
Linux Notepad Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ron McLeod
Bartender
Pie
Posts: 1027
64
Android Eclipse IDE Java Linux MySQL Database Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Titus Vasilescu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Titus Vasilescu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Brian Tkatch
Bartender
Posts: 567
25
Linux Notepad Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
[Thumbnail for Screenshot-2016-07-20-16.46.38.png]
 
Titus Vasilescu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Brian Tkatch
Bartender
Posts: 567
25
Linux Notepad Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic