Since i upgraded to ADT 20, i've been trying to create new Android project, but the same thing happen every time : The markup in the document preceding the root element must be well-formed. And i've got another error in my main activity. R is not generated.
<<<<<<< Original
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="15" />
<application android:label="#string/app_name"
android:icon="#drawable/ic_launcher"
android:theme="#style/AppTheme">
</application>
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="15" />
<application android:label="#string/app_name"
android:icon="#drawable/ic_launcher"
android:theme="#style/AppTheme">
</application>
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Test"
android:label="#string/title_activity_test" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.testphonegap.MainActivity" />
</activity>
</application>
<application>
<activity android:name=".Test"
android:label="#string/title_activity_test">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
=======
<application>
<activity android:name=".Test"
android:label="#string/title_activity_test">
<meta-data android:name="android.support.PARENT_ACTIVITY"
android:value="android.app.ListActivity" />
</activity>
</application>
Added
Okay, i think i know what happen. So the first time i wanted to create this new project, i missed something, so i deleted it from Eclipse, and from my computer, i started again, without exiting Eclipse, so it build in top of the former AndroidManifest.xml (even if it was deleted). So i deleted all, made a clean, and reboot Eclipse, and know it's working fine.
As my knowledge you have to upgrade to ADT 20.0.1
Related
INTRO
Greetings, all!
My Android Studio 4.0.1 project refused to build due to not being able to find an AndroidManifest.xml file that's in /main/ where it should be, according to the documentation. Mass replacing the occurrences of "api" with "implementation" or vice versa hasn't helped.
Thus, what other information do you want for clarification, and what should change to ensure this works?
Thankee!
MANIFEST FILE
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hornet">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
RUN ERRORS WITH DEBUG MODE ACTIVE
Moved to this Google Doc for being too long for this post!
https://docs.google.com/document/d/19OO-OIzFy6IXPEOAdvGZLgXNsW_1sfiZsLDs6H0Jjzs/edit?usp=sharing
Try to rebuild the project or modify project structure. It happens when something was wrong
I have downloaded facebook sdk by registering my application on facebook developers. I got some sample applications .When i tried to run FriendPickerSample application i got the message in console as "installation failed due to invalid apk file".After that i followed the instructions in developers website,but still the problem exist.Can anyone help me know what the problem is?
the code in android manifest file is:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.facebook.samples.friendpicker"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />s
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application android:label="#string/app_name"
android:icon="#drawable/icon"
android:theme="#android:style/Theme.NoTitleBar"
android:name=".FriendPickerApplication"
>
<activity android:name="FriendPickerSampleActivity"
android:label="#string/app_name"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="PickFriendsActivity"
android:label="Pick Friends">
</activity>
<activity android:name="com.facebook.LoginActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:label="#string/app_name" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/app_id"/>
</application>
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ac.tec.oop.ahorcado.android"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7"
android:targetSdkVersion="16"/>
<application android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity android:label="#string/app_name"
android:name="ac.tec.oop.ahorcado.android.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
These lines are giving me "cannot resolve symbol errors", even though the packages from which they need to be referenced is clearly written. I've trying to fix this for hours but I don't know what else to do. I'm using Android Studio, and it has caused me a great number of problems.
android:icon="#drawable/ic_launcher
android:label="#string/app_name"
android:theme="#style/AppTheme">
android:name="ac.tec.oop.ahorcado.android.MainActivity">
Go to File > Invalidate Caches / Restart and Invalidate and Restart.
This cleared the errors for me.
There is no issue with your Manifest code this will work fine
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ac.tec.oop.ahorcado.android"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7"
android:targetSdkVersion="16"/>
<application android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity android:label="#string/app_name"
android:name="ac.tec.oop.ahorcado.android.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
Some times Eclipse shows unexpected behavior you can cut and paste again the code to Manifest or just restart the IDE it will recompile and remove the error
I tried all mentioned Answer but non of above worked for me
The only Solution worked for me was
Go to Gradle(App)> in the repositories {}> make sure that mavenCentral() is on top>and now remove compile 'which you recently added>sync > Now add again compile "again add the dependencies" > and final sync again
This worked for me
try to add debuggable to true in application tag in manifest
<application android:allowBackup="true"
android:debuggable="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
I hope it,s work for you.
I installed BB tools for Eclipse, just added and removed BB Nature to one of my projects.
And now, I can't compile it (for Android).
Eclipse told me about some troubles in AndroidManifest.xml:
native-code: armeabi AndroidManifest.xml /VitocarsAndroidApp AndroidManifest.xml BlackBerry Verifying Problem
But the manifest is OK, no one line is highlighted:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.asap.vitocarsandroidapp"
android:versionCode="5"
android:versionName="1.04" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<application
android:name="com.asap.vitocarsandroidapp.system.VitocarsApplication"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.asap.vitocarsandroidapp.LoginActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.TableViewActivity"
android:label="#string/title_activity_table_view" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.PartActivity"
android:label="#string/title_activity_part" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.PhotoViewActivity"
android:label="#string/title_activity_photo_view" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.UserRegisterActivity"
android:label="#string/title_activity_user_register" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.ConfirmPhoneActivity"
android:label="#string/title_activity_confirm_phone" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.OfficeActivity"
android:label="#string/title_activity_office" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.PriceOfferActivity"
android:label="#string/title_activity_price_offer" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.RegionOrderActivity"
android:label="#string/title_activity_region_order" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.MapView"
android:label="#string/title_activity_map_view" >
</activity>
</application>
</manifest>
I already spent a lot of time, trying to solve it.
Maybe, somebody can help me?
Had the exact same issue.
Only uninstalling the Blackberry plugin solved it for me.
I guess that the Blcackberry plugin still left some remainders in the validation process of Eclipse, even though I removed the Blackberry nature from the project.
Check the .project file and remove all the * rim * stuff.
A build command and nature was leftover when i ran into this problem.
I have published a new update of my App. After publishing it got a warning like "Warning: Your active APK supports less devices then the previous APK. Some users won't get the update."
So i've compared the details of the current and the prior APK. There is only one difference: The new one has the additional entry "Native Platform: simple-xml.2.6.9.jar".
Do you think that there is a problem with it? Acutally i've intergrated the .jar into my android project.
Additionally, the developer console shows me that the app is now compatible with 0 devices... if i search for a certain device i get a notice that it's because of my manifest settings.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.kit.aifb.nukit"
android:versionCode="8"
android:versionName="#string/app_versionName" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="17" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.KIT.Styled"
android:allowBackup="true" >
<activity
android:name="edu.kit.aifb.nukit.gui.SplashScreenActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/Theme.Sherlock.Light.NoActionBar"
android:clearTaskOnLaunch="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="edu.kit.aifb.nukit.gui.ChooseCourseActivity"
android:screenOrientation="portrait"></activity>
<activity
android:name="edu.kit.aifb.nukit.gui.QuestioningAndVotingActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden"></activity>
<activity
android:name="edu.kit.aifb.nukit.gui.AnswerQuestionActivity"
android:screenOrientation="portrait"></activity>
<activity
android:name="edu.kit.aifb.nukit.gui.ShowResultsActivity"
android:screenOrientation="portrait"></activity>
<activity
android:name="edu.kit.aifb.nukit.gui.ImpressumActivity"
android:screenOrientation="portrait"></activity>
<activity
android:name="edu.kit.aifb.nukit.gui.LicensesActivity"
android:screenOrientation="portrait"
android:hardwareAccelerated="false"></activity>
<activity
android:name="edu.kit.aifb.nukit.gui.survey.SurveyListActivity"
android:screenOrientation="portrait"></activity>
<activity
android:name="edu.kit.aifb.nukit.gui.survey.QuestionActivity"
android:screenOrientation="portrait"
android:parentActivityName=".SurveyListActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".SurveyListActivity" />
</activity>
<activity
android:name="edu.kit.aifb.nukit.gui.survey.SurveyResultsActivity"
android:label="SurveyResultsActivity"
android:parentActivityName=".SurveyListActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".SurveyListActivity" />
</activity>
</application>
if i install the apk directly on my device, it works fine.
This should probably be due to changes done in your Android Manifest relating to max and min sdk versions
<uses-sdk android:minSdkVersion="integer"
android:targetSdkVersion="integer"
android:maxSdkVersion="integer" />
If this SDK version range has been altered, your new updated app might support lesser number of devices.
Alright, i fixed it.
The problem was that actualy only the SurveyLib.jar is using simple-xml-2.6.9.jar and the simplexml.jar was included within the SurveyLib.jar. So i think there was a problem dexing the simplexml.jar within surveylib.jar.
i've created the surveylib.jar again without simplexml.jar but included the simplexml.jar to the libs folder of my app.
now it works fine. thanks to you all for your help.