my problem is related to Android Studio.Whenever I try to run my app I get an error that says default activity not found.Please help me out,it's really important.Thank you in advance!
Just in case,I've got 2 classes: the first one is MainActivity,the second one is CatRepository
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.cats">
<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=".ui.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Try to replace <activity android:name=".ui.MainActivity"> by <activity android:name=".MainActivity">
Try putting full package name of your Activity.
You can try invalidating cache and restart.
File -> Invalidate Cache/Restart
Also after doing this, sync your project. : File-> Sync Project with Gradle Files
Related
I'm trying to integrate flurry into my android app. I'm using the recommended setting and have repositories{jcenter()} and
// Required for Flurry Analytics integration
compile 'com.flurry.android:analytics:8.2.0#aar'
// Optional - If you want to use the Ads SDK
compile 'com.flurry.android:ads:8.2.0#aar'
in the gradle as the docs suggest. I keep getting errors in the that Application is not resolved. The docs really blow and I'm not 100% sure what going on. I've never integrated flurry before can someone please help! I put the manifest and the class i'm using below. I know it doesn't have a key I'm still working on removing errors. I'm dumping the that class in the main file for simplicity for now.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="tempconversion.october.com.myapplication">
<!-- Required permissions - Internet access -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- Highly Recommended permission - External memory pre-caching -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- Optional permission - Location based ad targeting -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="F to C and K"
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>
</activity>
</application>
</manifest>
class in main file
public class MyApplication extends Application {
#Override
public void onCreate() {
super.onCreate();
new FlurryAgent.Builder()
.withLogEnabled(true)
.withCaptureUncaughtExceptions(true)
.withContinueSessionMillis(10)
.withLogLevel(VERBOSE)
.build(this, FLURRY_API_KEY);
}
}
Declare the application name in manifest.xml file.
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="F to C and K"
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>
</activity>
</application>
I am trying to have a different app name for an Activity "My Profile Photo" but it does not seem to show up even when I have given android:label="My Profile Pic" to that particular activity
The Manifest File:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.aditya.myprofile">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity"
android:label="My Profile">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ProfilePhoto"
android:label="Profile Pic" ></activity>
</application>
</manifest>
The XML Design:
The Android App name space is empty
Where am I going wrong?
Try this add title through java code add this code in your activity like this
getSupportActionBar().setTitle("My Profile");
I think you need to set a theme to your activity in your manifest.
<activity android:name=".ProfilePhoto"
android:theme="#style/AppTheme"
android:label="#string/profilePicture></activity>
Another solution : in your activity in onCreate you need to call :
getSupportActionBar().setTitle("Your Activity Title");
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(25.3.0) from [com.android.support:design:25.3.0] AndroidManifest.xml:27:9-31
is also present at [com.android.support:support-v4:25.3.1] AndroidManifest.xml:27:9-31 value=(25.3.1).
Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:25:5-27:34 to override.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.helploger.www.swipeview">
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application
android:fullBackupContent="false"
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"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"
/>
</intent-filter>
</activity>
</application>
</manifest>
You are using multiple versions of the Android Support Libraries:
Move all your support libraries to one version 25.3.1 or 25.3.0
I was having an exact same error after moving all support libraries to 25.3.1 my error was removed.
If you guys get this error in Ionic / Ionic 3 / Cordova, check the below line in your project.properties file. Change the plus to your version.
cordova.system.library.7=com.android.support:support-v4:+
I am having a problem integrating the AmazonS3PersonalFileStore demo app login into my App
I have set up my TVM and everything works fine on the demo app, it also runs correctly when I copy/paste the project and rename it.
The issue comes when I begin pasting my .javas from my main app into the pasted Demo app, now when I login, I get the error
Credential Problem!
AWS Credentials not configured correctly. Please review the README file.
the readme refers to project setup and the .properties file, all of which I did not touch
Here is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.amazonaws.demo.personalfilestore"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name=".S3PersonalFileStore"
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=".Login"></activity>
<activity android:name=".s3.S3BucketView"></activity>
<activity android:name=".s3.S3ObjectView"></activity>
<activity android:name=".s3.S3AddObjectView"></activity>
<activity
android:screenOrientation="portrait"
android:name="com.example.indrive.MainMenu"
android:label="#string/main_menu" />
<activity
android:screenOrientation="portrait"
android:name="com.example.indrive.TripMain"
android:label="#string/trips"/>
<activity
android:screenOrientation="portrait"
android:name="com.example.indrive.TripView"
android:label="#string/trip_view"/>
<activity
android:screenOrientation="portrait"
android:name="com.example.indrive.DiagnosticsMain"
android:label="#string/diagnostics"/>
<activity
android:screenOrientation="portrait"
android:name="com.example.indrive.DtcListView"
android:label="#string/dtcs"/>
<activity
android:screenOrientation="portrait"
android:name="com.example.indrive.RpmComparison"
android:label="#string/rpm_distribution"/>
<activity
android:screenOrientation="portrait"
android:name="com.example.indrive.UbiMain"
android:label="#string/ubi"/>
<activity
android:screenOrientation="portrait"
android:name="com.example.indrive.UbiView"
android:label="#string/ubi_view"/>
<activity
android:screenOrientation="portrait"
android:name="com.example.indrive.UsageMain"
android:label="#string/usage"/>
<activity
android:screenOrientation="portrait"
android:name="com.example.indrive.EnvironmentalMain"
android:label="#string/environmental_main"/>
<activity
android:screenOrientation="portrait"
android:name="com.example.indrive.ComparisonMain"
android:label="#string/vehicle_comparison"/>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="xxxxxxxx"/>
</application>
</manifest>
Although I have added new code, I am pretty sure that none of it is running, since none of my activities are being created
Update: I tried adding an EC2 role to the TVM Elastic Beanstalk with the same permissions as the IAM TVMUser, but the demo app wouldn't even work
Update 2: Tried a bunch of different IAM configurations for the TVM IAM User / Elastic Beanstalk, nothing worked
I had the same issue when integrating the AmazonS3PersonalFileStore demo app login into my app.
The problem was that the request to the TVM via the HTTP request was blocked. This is due to the android sdk's StrictMode.ThreadPolicy which does not allow network operations to execute on the UI thread.
This restriction can be changed, using:
if (android.os.Build.VERSION.SDK_INT > 9) {
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
}
Add the above code into your main activity's onCreate() method.
In addition, it is always recommended to move network operation off the UI thread, for example, using AsyncTask.
I am confident this will fix your problem.
I get the following error but there is no problem in my manifest file.
I tried changing my project name but I got this error once I changed my project name. help me solving this error without changing the project name back to the old one.
My old project name was "radio" my new project name is "Msurvey"
My error:
[2014-02-15 17:35:02 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for H:\radio\AndroidManifest.xml: The element type "manifest" must be terminated by the matching end-tag "</manifest>".
[2014-02-15 17:35:02 - radio] Error in an XML file: aborting build.
This is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.radio"
android:versionCode="1"
android:versionName="1.0" >
<uses-feature android:glEsVersion="0x00020000" >
</uses-feature>
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/mobilesurvey"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.radio.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>
<activity
android:name="com.example.radio.Res"
android:label="#string/title_activity_res" >
</activity>
<activity
android:name="com.example.radio.Admin"
android:label="#string/title_activity_admin" >
</activity>
<activity
android:name="com.example.radio.View"
android:label="#string/title_activity_view" >
</activity>
<activity
android:name="com.example.radio.View1"
android:label="#string/title_activity_view1" >
</activity>
<activity
android:name="com.example.radio.Answers"
android:label="#string/title_activity_answers" >
</activity>
<activity
android:name="com.example.radio.Data"
android:label="#string/title_activity_data" >
</activity>
<activity
android:name="com.example.radio.Food"
android:label="#string/title_activity_food" >
</activity>
<activity
android:name="com.example.radio.Service"
android:label="#string/title_activity_service" >
</activity>
<activity
android:name="com.example.radio.Services"
android:label="#string/title_activity_services" >
</activity>
<activity
android:name="com.example.radio.Places"
android:label="#string/title_activity_places" >
</activity>
<activity
android:name="com.example.radio.Adminmenu"
android:label="#string/title_activity_adminmenu" >
</activity>
<activity
android:name="com.example.radio.LoginActivity"
android:label="#string/title_activity_login"
android:windowSoftInputMode="adjustResize|stateVisible" >
</activity>
<activity
android:name="com.example.radio.FullscreenActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/title_activity_fullscreen"
android:theme="#style/FullscreenTheme" >
</activity>
<activity
android:name="com.example.radio.Adminlogin"
android:label="#string/title_activity_adminlogin" >
</activity>
<activity
android:name="com.example.radio.Report"
android:label="#string/title_activity_report" >
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
I tried all the similar questions in stackoverflow for this error but none solved my problem. Also all myactivities have their background changed to black as default from white. plz help me solve this color change mainly. Plz help me solve it.
It seems to pass XML validation. You said you did a clean, but what could possibly be the problem is that maybe you're modifying the wrong AndroidManifest.xml. (There are versions of it dynamically created in your bin and gen folders for instance). Check that you're modifying the AndroidManifest.xml in the topmost folder of your project.
remove the stating blank before xml-manifest, see The processing instruction target matching "[xX][mM][lL]" is not allowed
Also you need to place user-permission tags before appliction tag.
Regards,
Alex