Out of no where, Errors w/in AndroidManifest.xml - Help Please... - Android Studio

Things have been going good within the app and I have been running the app on my phone or tablet throughout the build with no issues.
All of a sudden, I have errors within the Manifest and it will not run/load on to my phone or tablet any longer.
I have googled for answers and "fixes" but have not been able to make any progress, I hope that I can get help here and get everything back in working order so I can move forward with the build.
The only thing I can think of that I did prior to seeing the errors was I may have "Alt+Enter" and chose API Google by accident at one point.
I went back and deleted all the Google things from my manifest and so forth. It was at this point I noticed the errors within the manifest.
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.z.flowmaster">
<application ---------------------------> App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filler.
android:allowBackup="true" --------------------------------------------- On SDK Version 23 and up, your app data will be automatically backed up and restored on app install. Consider adding the
android:icon="@mipmap/ic_launcher" ---------------------------------attribute android:fullBackupContent to specify an @xml resource which configures which files to backup. More info at ............
android:label="Backflow Master"
android:supportsRtl="true"
android:theme="@style/AppTheme" />
<activity android:name=".ActivityHome"> ------------> Element activity not allowed here / This inspection highlights unallowable XML ......
<intent-filter> --------------> Element intent-filter is not allowed here / This inspection highlights unallowable XML tags in Android rsource files & AndroidManifest.xml
<action android:name="android.intent.action.MAIN" /> --------> Element action is not allowed here / This inspection highlights unallowed XML .....
<category android:name="android.intent.category.LAUNCHER" /> --------> Element catagory is not allowed here / This inspection highlights ......
</intent-filter> ----------> Element intent-filter is not allowed here / This inspection highlights unallowable XML tags in Android resource files & AndroidMainfest.xml
</activity> --------------------------> says same as below "activity"
<activity android:name=".TestingMain" /> ---------------> "activity" is highlighted "Element activity is not allowed here."
<activity android:name=".TestingRP" /> --------------------------- This inspection highlights unallowed XML tags in Android resource files and AndroidManifest.xml
<activity android:name=".TestingDC" />
<activity android:name=".TestingPVB" />
<activity android:name=".TestingSRVB" />
<application/>
</manifest>

Assuming you are using AS, under the build tab in Android Studio, try clicking on "Clean" and then do a "Re-build"

Yes, I am using Android Studio 2.1.1
* However, I will note that at the time the error first occurred I was using 1.5.1 I believe.
After getting the error and trying a few things to rid the error, I finally just uninstalled the full program and reinstalled (new version) Android Studio.
I think I reinstalled everything correctly but I could have left something out or something is out of place I guess.
I feel like I have checked to make sure the reinstall was done correctly but that's not saying I didn't miss something...
After going to >Build >Clean Project I receive the following in my Messages "Gradle Build":
! A problem occurred evaluating project ':app'.
>Failed to apply plugin [id'com.android.application']
>Gradle version 2.10 is required. Current version is 2.8. If using the gradle wrapper, try editing the distributionUrl in C:/Users .....
! BUILD FAILED
! Total time: 0.611 secs
! 1 error
! 0 warnings
! See complete output in console
When I "Rebuild" it gives me the same as above.

Can you post the contents of your Gradle properties files here. I think this is where the issue lies "Gradle version 2.10 is required. Current version is 2.8. If using the gradle wrapper, try editing the distributionUrl in C:/Users ....."

-Project-
v Flowmaster
v app
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.z.flowmaster"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.0-alpha1' ----------> This support library should not use a different version (24) than the compileSdkVersion(23) / There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion.)
}
-Project-
v Flowmaster
v gradle
v wrapper
- gradle-wrapper.jar
v gradle-wrapper.properties
#Wed Oct 21 11:34:03 PDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
-Project-
v Flowmaster
v gradle
- build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
-Project-
v Flowmaster
v gradle
- build.properties
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

Related

Amount of Desktops

I was wondering if anyone could help me out with a minor question. Is there a way that i can change the amount of desktops that i have in my home screen. I have 5 right now and would like to move to 3. I've seen this feature before in some themes, but my current one does not have it. Is there another way to change it to 3 screens.
Any help would be greatly appreciated it. Thanks
Most the themes are designed for a specific ROM and don't make modifications on the Launcher, it's usually left with whatever the ROM has. If you want to be able to control the amount of Home screens, you should look into using the advanced launcher, or see if there is a theme you like for your ROM using the advanced launcher.
Thanks for your advise. I'll look into the advance launcher app.
You need to edit the Launcher.apk file from source using a Linux OS (Ubuntu) and have Java 5 (not 6) installed.
Once you have everything set up right and you have downloaded the source:
Then go to Launcher.java and edit this to get three screens:
Code:
static final int SCREEN_COUNT = 3;
static final int DEFAULT_SCREN = 1;
to
Code:
static final int SCREEN_COUNT = 3;
static final int DEFAULT_SCREN = 1;
then open the layout-land and layout-port files and edit the Launcher.xml files with:
Code:
launcher:defaultScreen="3">
<include android:id="@+id/cell1" layout="@layout/workspace_screen" />
<include android:id="@+id/cell2" layout="@layout/workspace_screen" />
<include android:id="@+id/cell3" layout="@layout/workspace_screen" />
then
Code:
make Launcher
I then sign it with test keys and add it to an update.zip file.
Apply it and reboot.
This won't work in Eclipse using Windows because it throws compiling errors.

[Q] Could i get some help on merging/compiling android-5.1.1_r8 from source

Hello!
Im building a rom from AOSP source with some features. All is been fine on android-5.1.1_r5.
Problem started when i started merging _r6.
I decided to drop that and stay on _r5. Now i tried to merge _r8 to my _r5 sources, like this
cd <directory>
git fetch aosp (which ive directed to android.googlesource.com/<repo>)
git merge android-5.1.1_r8
All goes fine, few simple conflicts with build IDs or something.
And also ive changes on my manifest to sync android-5.1.1_r8 by default.
Now when i try to compile, i get these:
Code:
frameworks/opt/net/ims/src/java/com/android/ims/internal/ImsCallSession.java:925: error: ImsCallSession.IImsCallSessionListenerProxy is not abstract and does not override abstract method callSessionMultipartyStateChanged(IImsCallSession,boolean) in IImsCallSessionListener
private class IImsCallSessionListenerProxy extends IImsCallSessionListener.Stub {
^
Copying: /home/sicki/out//sgoptimized/target/common/obj/APPS/CertInstaller_intermediates/classes-jarjar.jar
Copying: /home/sicki/out//sgoptimized/target/common/obj/APPS/DownloadProviderUi_intermediates/classes-jarjar.jar
Copying: /home/sicki/out//sgoptimized/target/common/obj/APPS/HTMLViewer_intermediates/classes-jarjar.jar
frameworks/opt/net/ims/src/java/com/android/ims/ImsManager.java:803: error: ImsManager.ImsRegistrationListenerProxy is not abstract and does not override abstract method registrationDisconnected(ImsReasonInfo) in IImsRegistrationListener
private class ImsRegistrationListenerProxy extends IImsRegistrationListener.Stub {
^
frameworks/opt/net/ims/src/java/com/android/ims/ImsManager.java:828: error: method does not override or implement a method from a supertype
@Override
^
Copying: /home/sicki/out//sgoptimized/target/common/obj/APPS/KeyChain_intermediates/classes-jarjar.jar
frameworks/opt/net/ims/src/java/com/android/ims/ImsUt.java:358: error: method updateCallForward in interface IImsUt cannot be applied to given types;
int id = miUt.updateCallForward(action, condition, number, timeSeconds);
^
required: int,int,String,int,int
found: int,int,String,int
reason: actual and formal argument lists differ in length
frameworks/opt/net/ims/src/java/com/android/ims/ImsUt.java:385: error: method updateCallWaiting in interface IImsUt cannot be applied to given types;
int id = miUt.updateCallWaiting(enable);
^
required: boolean,int
found: boolean
reason: actual and formal argument lists differ in length
Copying: /home/sicki/out//sgoptimized/target/common/obj/APPS/LiveWallpapersPicker_intermediates/classes-jarjar.jar
Note: frameworks/opt/net/ims/src/java/com/android/ims/ImsUt.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
5 errors
My github: https://github.com/sicknemesis?tab=repositories
My manifest: https://github.com/sicknemesis/sickgreen_manifest/tree/sg-5.1.1_r8
Everything pushed after 5.1.1_r5 merge. Manifest points to r8 now just for to check that if something is missing or screwed.
Thank you very much if someone knows what im doing wrong how to fix this!
For simple minor updates, I usually just edit the manifest ([aosp_dir]/.repo/manifest.xml) and change the version string:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="aosp"
fetch=".." />
<default revision="refs/tags/android-5.1.1_[COLOR="Red"]r8[/COLOR]"
remote="aosp"
sync-j="4" />
<project path="build" name="platform/build" groups="pdk,tradefed" >
<copyfile src="core/root.mk" dest="Makefile" />
</project>
[ rest of manifest ]
Then just do a repo sync, lunch and make.
This usually works great and saves a lot of time syncing and building. If that fails, then a complete rebuild may be necessary.
Gene Poole said:
For simple minor updates, I usually just edit the manifest ([aosp_dir]/.repo/manifest.xml) and change the version string:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="aosp"
fetch=".." />
<default revision="refs/tags/android-5.1.1_[COLOR="Red"]r8[/COLOR]"
remote="aosp"
sync-j="4" />
<project path="build" name="platform/build" groups="pdk,tradefed" >
<copyfile src="core/root.mk" dest="Makefile" />
</project>
[ rest of manifest ]
Then just do a repo sync, lunch and make.
This usually works great and saves a lot of time syncing and building. If that fails, then a complete rebuild may be necessary.
Click to expand...
Click to collapse
There were changes on atleast device, frameworks, settings and contacts which i merged and pushed. And changed that revision number to sync everything else from right revision.
But now that ive searched, i see that after r5, something changed on branches. As far as i uderstand, r5 is lollipop-mr1-release branch and after that, its different branch, so merging everything from r6 - r8 to r5 base, will have conplications. And some that ive seen, r5 is actually newer than r6 actually is, because of those branch changes
Lähetetty minun Nexus 5 laitteesta Tapatalkilla
Sick1 said:
There were changes on atleast device, frameworks, settings and contacts which i merged and pushed. And changed that revision number to sync everything else from right revision.
But now that ive searched, i see that after r5, something changed on branches. As far as i uderstand, r5 is lollipop-mr1-release branch and after that, its different branch, so merging everything from r6 - r8 to r5 base, will have conplications. And some that ive seen, r5 is actually newer than r6 actually is, because of those branch changes
Lähetetty minun Nexus 5 laitteesta Tapatalkilla
Click to expand...
Click to collapse
did you manage to fix this error?

[Q] My android studio giving me errors and not working.

READ ONLY EDIT DOWN!!
Okay, so I can't develop nothing as my Android Studio decided to. My all project is full of errors, unknown errors caused by Android Studio.
note: my files are correct, it is an other problem because even if I will import something from google codes it will have errors.
When I import a project everything's fine, but then after indexing and such things, all sudden everything is red and shouldn't be.
My errors for example are :
Code:
button1.setOnLongClickListener(new View.OnLongClickListener() {
....
....
}
Well shouldn't be error but :
Code:
cannot resolve symbol setOnLongClickListener
Another example:
Code:
button1=(Button) findViewById(R.id.button1);
I used this exact code for other button, seems right, I always using this line, it was fine until my Android Studio decided to give me some hard time, this line is full by errors and they are:
Code:
Unknown class: 'button1' , invalid method declaration; return type required, missing method body, or declare abstract
and there are like 20 errors that shouldn't be, things I tried:
1.deleting iml files , .idea folder - worked for a while but now it happened again and it doesn't fix it.
2.reinstalling android studio and then importing project.
3.upgrading android studio version to 1.3
4.restarting my pc.
5.importing project to an other pc, happened after a while.
6.Invalidate caches/ restart.
7.Changing module in project structure - I changed it back to how it was (it didn't help) and I think it caused the manifest error down..
My Module:app build.gradle:
Code:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "firstappdevelopments.david.reactiontime"
minSdkVersion 9
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.1'
}
Also I noticed now, my Manifest file as an error in
Code:
android:name=".MainActivity"
says it has no default structure. something like this. here is the full normal code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
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>
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
</manifest>
Please, if someone knows what is the problem or what can I else do, just say, and I am sorry about my English, thank you all.
EDIT!!!:
I deleted this lines:
Code:
connect.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
bluetooth = BluetoothAdapter.getDefaultAdapter();
if (bluetooth != null) {
if (bluetooth.isEnabled()) {
bluetooth.startDiscovery();
Set<BluetoothDevice> bondedSet = bluetooth.getBondedDevices();
if(bondedSet.size() > 0){
for(BluetoothDevice device : bondedSet){
newDevicesListView.setVisibility(View.VISIBLE);
mArrayAdapter.add(device.getName() + "\n" + device.getAddress());
}
}else{
mArrayAdapter.add("No Devices");
}
}
} else {
textview.setText("bluetooth is disabled, enabling.");
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, RESULT_OK);
}
} else{
textview.setText("Bluetooth is not supported.");
}
}
});
AND SUDDENLY ALL THE ERRORS DISSAPPEARED , ANY IDEAS? - The errors was in other lines..

[Development Question] New To Development, Keep Getting ClassNotFoundException

EDIT: FOUND THE BUG!
Turns out that Android's Instant Run feature does not work with Xposed. I turned it off and the module ran perfectly.
Kinda sad that I spent hours just staring at my code trying to find a bug. I guess I'll submit an issue on GitHub to update the tutorial. Hopefully other developers will see that a lot quicker
===============
Hey guys, I'm new to developing Xposed modules and have been following the Xposed development guide that Rovo made on GitHub. I understand how Xposed works and have tried to recreate the tutorial on Android Studio myself. However, when I load the module, I keep getting a java.lang.ClassNotFoundException. I was hoping that someone could take a look at my (very short) code and tell me if I am forgetting to do something.
Here is the error I am getting:
Code:
05-19 11:03:15.591 4049-4049/? I/Xposed: Loading modules from /data/app/com.tejasvinareddy.xposed.tutorial-1/base.apk
05-19 11:03:15.636 4049-4049/? I/Xposed: Loading class com.tejasvinareddy.xposed.tutorial.Main
05-19 11:03:15.637 4049-4049/? E/Xposed: java.lang.ClassNotFoundException: Didn't find class "com.tejasvinareddy.xposed.tutorial.Main" on path: DexPathList[[zip file "/data/app/com.tejasvinareddy.xposed.tutorial-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at de.robv.android.xposed.XposedBridge.loadModule(XposedBridge.java:497)
at de.robv.android.xposed.XposedBridge.loadModules(XposedBridge.java:457)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:122)
Suppressed: java.lang.ClassNotFoundException: Didn't find class "com.tejasvinareddy.xposed.tutorial.Main" on path: DexPathList[[zip file "/system/framework/XposedBridge.jar"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 4 more
Suppressed: java.lang.ClassNotFoundException: com.tejasvinareddy.xposed.tutorial.Main
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 5 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
AndroidManifest.xml
Code:
<manifest xmlns:android="<<CAN'T POST LINK CAUSE I'M NEW ugh>>"
package="com.tejasvinareddy.xposed.tutorial">
<application android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<meta-data
android:name="xposedmodule"
android:value="true" />
<meta-data
android:name="xposeddescription"
android:value="Teju's first Xposed module" />
<meta-data
android:name="xposedminversion"
android:value="53" />
</application>
</manifest>
The app's build.gradle file:
Code:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.tejasvinareddy.xposed.tutorial"
minSdkVersion 15
targetSdkVersion 23
versionCode 2
versionName "1.0.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
provided 'de.robv.android.xposed:api:82'
provided 'de.robv.android.xposed:api:82:sources'
}
My main code:
Code:
package com.tejasvinareddy.xposed.tutorial;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.callbacks.XC_LoadPackage;
public class Main implements IXposedHookLoadPackage {
@Override
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam)
throws Throwable {
XposedBridge.log("TUTORIAL: Loaded app " + lpparam.packageName);
}
}
And finally xposed_init:
Code:
com.tejasvinareddy.xposed.tutorial.Main
Are there any other files that I could be messing up?

On signed bundle release the debuger adds the android studio release number in the AndroidManifest.xml file...!?

Hi together
If i create a signed bundle release, the debuger adds the android studio release number in the AndroidManifest.xml file and throws an error
i know there should not been any numbers in the package name, but why adds AS this every time?
here are the error message:
C:\Users\dev\AndroidStudioProjects\newsapp\app\build\intermediates\bundle_manifest\release\AndroidManifest.xml:2: AAPT: error: attribute 'package' in <manifest> tag is not a valid Android package name: 'com.acme.newsapp.1.4.30'.
The AndroidManifest.xml in the project folder:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.acme.newsapp">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@Mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@Mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activ..
The build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.4.30'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
In the debug version this doesnt happen, only on the signed release
my Android Studio Version is the 4.1.2
Anyone a idea why this happens?

Categories

Resources