I'm using an updated version of android studio, while the code is in a previous version, I need help, I've tried everything from trying a doungrage, and I've looked at several videos, and none have given me the answer I'm looking for, I looked the entire code to see if I found any indentation flaws or sla, something that could point to some other error, and nothing, I'm slightly desperate plz help me
<?xml version="1.0" encoding="utf-8"?>
<activity
android:name=".MainActivity"
android:noHistory="true"/>
<category android:name="android.intent.category.BACK"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.MONKEY"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:debuggable="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>
</activity>
<activity
android:name=".LancaComandaActivity"
android:label="#string/title_activity_lanca_comanda"
android:theme="#style/AppTheme.NoActionBar"/>
<activity android:name=".EnvioDadosActivity"/>
<activity android:name=".FecharContaActivity"/>
<activity android:name=".MudardeMesa"/>
<activity android:name=".FechamentoParcial"/>
<activity android:name=".TabelaFParcial"/>
<activity android:name=".TcpServe"/>
<activity android:name=".SocektTask"/>
<activity
android:name=".SocketTask"
android:label="#string/title_activity_socket_task"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".SocketTaskRecebe"
android:label="#string/title_activity_socket_task_recebe"
android:theme="#style/AppTheme.NoActionBar">
</activity>
<activity android:name=".ConsultaPro"/>
<activity
android:name=".ConFechaParcial"
android:label="#string/title_activity_con_fecha_parcial"
android:theme="#style/AppTheme.NoActionBar"/>
<activity
android:name=".Mensagens"
android:label="#string/title_activity_mensagens"
android:theme="#style/AppTheme.NoActionBar"/>
<activity android:name=".MainConsultaPro"/>
</application>
Related
When i try to upload new version of my app to google play i get error saying that the package name of my apk is wrong and it has to be com.witanowski.sportilicious.
However package name of my project seems to be correct
I renamed package name of the project once and maybe there is some file that still has old package name and therefore im getting this error. Ill be grateful for any ideas.
EDIT:
Here is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.witanowski.sportilicious">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".main.OverviewActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".main.MeasurementListActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".main.MapActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".main.SettingsListActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".main.SummaryActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".main.DisciplineListActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".main.AppInfoActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".main.UserProfileActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".main.StatisticsActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".main.HistoryListActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".main.WeatherActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".main.DeviceListActivity"
android:screenOrientation="portrait">
</activity>
<service
android:name=".service.BluetoothLeService"
android:enabled="true" />
</application>
</manifest>
Thanks to JonZarate's comment, I found out what was wrong. In my gradle file i didn't rename applicationId properly when I was changing package name, that's why I was getting this error.
I have checked all possible answers on this question here, but none has helped me. I don't know what to do anymore. I have already uninstalled application on mobile phone, and it is still saying me this:
This is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name="com.solaris.timster.app.AppController"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name="com.solaris.timster.activities.SplashActivity"
android:screenOrientation="portrait"
android:theme="#style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name="com.solaris.timster.activities.WelcomeActivity"
android:screenOrientation="portrait"/>
<activity
android:name="com.solaris.timster.activities.LogRegActivity"
android:screenOrientation="portrait"/>
<activity
android:name="com.solaris.timster.activities.GuideStepper"
android:screenOrientation="portrait"/>
<activity
android:name="com.solaris.timster.activities.HomeActivity"
android:screenOrientation="portrait"/>
<activity
android:name="com.solaris.timster.activities.CreateTeamActivity"
android:screenOrientation="portrait"/>
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar"/>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id"/>
<!-- Firebase Notifications -->
<service android:name="com.solaris.timster.gcm.MyFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service android:name="com.solaris.timster.gcm.MyFirebaseInstanceIDService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
<!-- ./Firebase Notifications -->
</application>
and my build.gradle app file:
defaultConfig {
applicationId "com.solaris.timster"
}
I am trying to use the wakelock feature but when I run my app i get an exception saying
java.lang.SecurityException: Neither user 10057 nor current process has android.permission.WAKE_LOCK. I copied the exact permission from the android website so I have no idea what could be wrong.
<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>
<activity android:name=".secondscreen"></activity> <!--this allows for multiple screens -->
<activity android:name=".processing"></activity>
<activity android:name=".thirdscreen"></activity>
<activity android:name=".fourthscreen"></activity>
<activity android:name=".rewrite"></activity>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
</application>
Move your <uses-permission> elements to appear before the <application> element:
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<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>
<activity android:name=".secondscreen"></activity> <!--this allows for multiple screens -->
<activity android:name=".processing"></activity>
<activity android:name=".thirdscreen"></activity>
<activity android:name=".fourthscreen"></activity>
<activity android:name=".rewrite"></activity>
</application>
I published an application but google play shows me that 0 devices are compatible.
I checked the Manifest but i don't know why.
I tried to change minsdk and targetsdk but the result is the same.
I need help please!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="it.h2_web.www.agos"
android:versionCode="3"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<application
android:allowBackup="true"
android:icon="#drawable/icona"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<receiver android:name=".services.BootCompletedIntentReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="YouWillNeverKillMe" />
</intent-filter>
</receiver>
<service android:enabled="true" android:name=".services.MyService"></service>
<activity
android:name=".Dashboard"
android:label="#string/app_name"
android:theme="#android:style/Theme.Holo.Light.NoActionBar.Fullscreen"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ImmobiliView"
android:label="#string/app_name"
android:theme="#android:style/Theme.Holo.Light.NoActionBar.Fullscreen"
android:screenOrientation="portrait"
>
</activity>
<activity
android:name=".ClientiView"
android:label="#string/app_name"
android:screenOrientation="portrait"
>
</activity>
<activity
android:name=".ImmobiliList"
android:label="#string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".ClientiList"
android:label="#string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".LoginView"
android:label="#string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".WebActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen"
android:windowSoftInputMode="adjustPan"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".AgendaView"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen">
</activity>
<activity
android:name=".ContactsView"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen">
</activity>
</application>
</manifest>
Refer the below link for solution
Optimizing Android manifest file for largest number of supported devices
http://developer.android.com/guide/topics/manifest/supports-screens-element.html
I think the error is from this manifest file ?!! when i want to start this activity "SearchResultForm" i have the exception ??
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ayanoo.forms"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="#drawable/search" android:label="#string/app_name">
<activity android:name=".MainActivity" android:label="#string/app_name" android:launchMode="standard">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="PersonDataForm" android:label="#layout/person_data_form"></activity>
<activity android:name="SearchResultForm" android:theme="#style/CodeFont"></activity>
<activity android:name="SendMessageForm" android:theme="#style/CodeFont"></activity>
</application>
<uses-sdk android:minSdkVersion="3" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"></uses-permission>
</manifest>
You should have every activity of your appliaction listed within manifest file, like this:
<application android:icon="#drawable/ok" android:label="Application name">
<activity android:name=".main_screen.MyActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
Your manifest has wrong links to your Activities (except the MainActivity).
You have:
<activity android:name="SearchResultForm" android:theme="#style/CodeFont"></activity>
Try to use:
<activity android:name=".SearchResultForm" android:theme="#style/CodeFont"></activity>
Pay attention to the dot.