My android mobile app doesn't working on android tv - android

Hello Guys i have make my application first of all for my android mobile but this when i install on my android tv so i am getting an error and it's not working on my android tv but this app perfectly working fine on my mobile how can i run my app on android tv any suggestion please guys help me \
my tv android version is 4.4.2 and my mobile android version is 9
Thanks.
here is manifest of my app
<?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.oxoo.spagreen"
tools:ignore="MissingLeanbackLauncher">
<uses-feature
android:name="android.software.leanback"
android:required="true" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<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.READ_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
<application
android:name=".utils.MyAppClass"
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"
android:usesCleartextTraffic="true"
android:screenOrientation="landscape"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".WebViewActivity"
android:screenOrientation="landscape"
android:theme="#style/FullscreenTheme"></activity>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-8804184340526788~7833821786" />
<meta-data
android:name="com.onesignal.NotificationOpened.DEFAULT"
android:value="DISABLE" />
<meta-data
android:name="com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME"
android:value="com.google.android.exoplayer2.ext.cast.DefaultCastOptionsProvider" />
<activity
android:name=".TermsActivity"
android:screenOrientation="landscape"
android:theme="#style/AppTheme.Nobar" />
<activity
android:name=".ReplyActivity"
android:label="#string/title_activity_reply"
android:screenOrientation="landscape"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".ProfileActivity"
android:screenOrientation="landscape"
android:theme="#style/AppTheme.Nobar" />
<activity
android:name=".PassResetActivity"
android:screenOrientation="landscape"
android:theme="#style/AppTheme.Nobar" />
<activity
android:name=".SearchActivity"
android:screenOrientation="landscape"
android:theme="#style/AppTheme.Nobar" />
<activity
android:name=".SignUpActivity"
android:screenOrientation="landscape"
android:theme="#style/AppTheme.Nobar" />
<activity
android:name=".LoginActivity"
android:screenOrientation="landscape"
android:theme="#style/AppTheme.Nobar" />
<activity
android:name=".DetailsActivity"
android:configChanges="screenLayout|screenSize|orientation"
android:label="#string/title_activity_details"
android:screenOrientation="landscape"
android:theme="#style/AppTheme.NoActionBar" /> <!-- android:configChanges="screenLayout|screenSize|orientation" -->
<activity
android:name=".MainActivity"
android:theme="#style/AppTheme.Nobar"
android:screenOrientation="landscape"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".SettingsActivity"
android:screenOrientation="landscape"
android:theme="#style/AppTheme.Nobar" />
<activity
android:name=".SplashscreenActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="landscape"
android:theme="#style/FullscreenTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ItemMovieActivity"
android:label="#string/title_activity_item_show"
android:screenOrientation="landscape"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".ItemTVActivity"
android:screenOrientation="landscape"
android:theme="#style/AppTheme.Nobar" />
<activity
android:name=".ItemSeriesActivity"
android:screenOrientation="landscape"
android:theme="#style/AppTheme.Nobar" />
</application>
</manifest>
and here is the build.gradle of my app
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.12.1'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url 'https://maven.google.com' }
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.oxoo.spagreen"
minSdkVersion 14
targetSdkVersion 28
versionCode 13
versionName "1.1.3"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
manifestPlaceholders = [
onesignal_app_id: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: 'REMOTE'
]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-core:16.0.8'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0-beta01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-beta01'
implementation 'com.google.android.material:material:1.1.0-alpha06'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0-beta01'
implementation 'androidx.browser:browser:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha05'
implementation 'com.facebook.shimmer:shimmer:0.4.0'
implementation 'com.balysv:material-ripple:1.0.2' // ripple effect
implementation 'com.github.JakeWharton:ViewPagerIndicator:2.4.1'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.android.volley:volley:1.1.1'
// retrofit
implementation 'com.squareup.retrofit2:retrofit:2.1.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1'
implementation 'com.google.android:flexbox:0.3.2'
implementation 'com.onesignal:OneSignal:3.10.5'
implementation 'com.hootsuite.android:nachos:1.1.1'
implementation 'com.mikhaellopez:circularimageview:3.2.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.google.android.gms:play-services-ads:17.2.0'
implementation 'com.google.android.exoplayer:exoplayer-core:2.7.3'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.7.3'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.7.3'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.7.3'
implementation 'com.google.android.exoplayer:extension-rtmp:2.7.3'
implementation 'com.google.android.exoplayer:extension-cast:2.7.3'
implementation 'com.github.HaarigerHarald:android-youtubeExtractor:master-SNAPSHOT'
implementation 'com.google.android.libraries.cast.companionlibrary:ccl:2.8.4'
implementation 'com.github.ixiDev:GDPRChecker:v0.2'
implementation 'com.google.android.ads.consent:consent-library:1.0.7'
}

for an Android TV app you should first provide a dedicated banner so the app icon can be shown in the Android TV launcher. See: https://developer.android.com/training/tv/start/start.html#banner
Also, I don't see any intent-filter for Leanback:
<activity
android:name=".SplashscreenActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="landscape"
android:theme="#style/FullscreenTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
It possible that you need to create two separate intent-filter (one for mobile and another one for TV).
Pay attention that the navigation between a mobile (touchscreen) and a TV (using a controller) might impact the user experience, even if the app is working well doesn't mean that it's fully compatible with TV experience. Please take a look at this documentation for more information: https://developer.android.com/training/tv/

Related

Gradle Build error when trying to generate a signed bundle or APK due to errors in Android Manifest

I am working on a version of an Android app and I would like to release a new update. The app compiles well, but when I try to generate a release apk or bundle, I always get the same Gradle errors that I cannot solve, as I don´t understand the problem. I have been wrapping my head around this for days, so I would be thankful for any help or hints.
This is the error log of the failing gradle task:
> Task :app:processReleaseMainManifest
/Users/dwa2112/Development/Template/Template/app/src/main/AndroidManifest.xml:31:5-235:19 Warning:
application#android:icon was tagged at AndroidManifest.xml:31 to replace other declarations but no other declaration present
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
/Users/dwa2112/Development/Template/Template/app/src/main/AndroidManifest.xml:57:9-67:20 Error:
android:exported needs to be explicitly specified for element <receiver#com.onesignal.GcmBroadcastReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
/Users/dwa2112/Development/Template/Template/app/src/main/AndroidManifest.xml:109:9-114:20 Error:
android:exported needs to be explicitly specified for element <receiver#com.onesignal.BootUpReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
/Users/dwa2112/Development/Template/Template/app/src/main/AndroidManifest.xml:115:9-119:20 Error:
android:exported needs to be explicitly specified for element <receiver#com.onesignal.UpgradeReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
This is my Android Manifest:
<?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.sherdle.universal">
<!-- Always Required to get content and check if internet is available -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- Always Required for image coaching & maps -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!-- Required for notifications & radio -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- Required for maps -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- Required for visualizer & radio -->
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" />-->
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!-- Required for tumblr -->
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<!-- Required for in-app purchases -->
<uses-permission android:name="com.android.vending.BILLING" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:name=".App"
android:allowBackup="true"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning"
tools:replace="android:icon">
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<!-- Activities -->
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize"
android:exported="true"
android:label="#string/app_name"
android:theme="#style/AppTheme.Launcher"
tools:node="merge" />
<activity
android:name=".login.LoginActivity"
android:configChanges="orientation|screenSize"
android:exported="true"
android:label="#string/app_name"
android:theme="#style/AppTheme.Launcher"
tools:node="merge" />
<activity
android:name="com.onesignal.NotificationOpenedActivityHMS"
android:exported="false"
android:theme="#style/Theme.CanPostThis2.SplashTheme"
tools:replace="android:theme"
tools:node="merge" />
<activity
android:name=".SplashScreenActivity"
android:exported="true"
android:theme="#style/Theme.CanPostThis2.SplashTheme"
tools:node="merge">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".picer_lib.activity.ImagePickActivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="#style/vw_FilePickerTheme"
tools:node="merge" />
<activity
android:name=".picer_lib.activity.ImageBrowserActivity"
android:exported="true"
android:hardwareAccelerated="false"
android:screenOrientation="portrait"
android:theme="#style/vw_FilePickerTheme"
tools:node="merge" />
<service
android:name=".Fcm.MyFirebaseMessagingService"
android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".Fcm.GCMRegistrationIntentService"
android:exported="true"
tools:node="merge">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<activity
android:name=".picer_lib.activity.VideoPickActivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="#style/vw_FilePickerTheme"
tools:node="merge" />
<activity
android:name=".picer_lib.activity.AudioPickActivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="#style/vw_FilePickerTheme"
tools:node="merge" />
<activity
android:name=".picer_lib.activity.NormalFilePickActivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="#style/vw_FilePickerTheme"
tools:node="merge" />
<activity android:name=".providers.rss.ui.RssDetailActivity" />
<activity android:name=".providers.videos.ui.VideoDetailActivity" />
<activity android:name=".providers.wordpress.ui.WordpressDetailActivity" />
<activity android:name=".providers.woocommerce.ui.ProductActivity" />
<activity
android:name=".comments.CommentsActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name=".HolderActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name=".attachmentviewer.ui.AttachmentActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name=".attachmentviewer.ui.AudioPlayerActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name=".attachmentviewer.ui.VideoPlayerActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name=".providers.woocommerce.ui.CheckoutActivity"
android:configChanges="orientation|screenSize" />
<activity
android:name=".providers.woocommerce.ui.WooCommerceLoginActivity"
android:configChanges="orientation|screenSize"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".providers.videos.player.YouTubePlayerActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="sensor"
android:theme="#android:style/Theme.Black.NoTitleBar.Fullscreen" />
<!-- Services -->
<service
android:name=".providers.audio.player.player.PlaybackService"
android:exported="true"
tools:node="merge" />
<service android:name=".providers.radio.player.RadioService" />
<service android:name=".attachmentviewer.MusicService" />
<!--
A receiver that will receive media buttons and send as
intents to your MediaBrowserServiceCompat implementation.
Required on pre-Lollipop. More information at
http://developer.android.com/reference/android/support/v4/media/session/MediaButtonReceiver.html
-->
<receiver
android:name="androidx.media.session.MediaButtonReceiver"
android:exported="true"
tools:node="merge">
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>
</receiver>
<receiver
android:name=".providers.audio.player.media.MediaSessionReceiver"
android:exported="true"
tools:node="merge">
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>
</receiver>
<!--<receiver android:name=".providers.soundcloud.player.player.PlayerReceiver">
<intent-filter>
<action android:name="android.media.AUDIO_BECOMING_NOISY" />
</intent-filter>
</receiver>-->
<!-- Meta Data -->
<meta-data
android:name="com.onesignal.NotificationOpened.DEFAULT"
android:exported="true"
android:value="DISABLE"
tools:node="merge" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:exported="true"
android:value="#string/google_maps_key"
tools:node="merge" />
<meta-data
android:name="com.google.android.gms.ads.AD_MANAGER_APP"
android:exported="true"
android:value="true"
tools:node="merge" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="true"
android:grantUriPermissions="true"
tools:node="merge">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/provider_paths" />
</provider>
<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:authorities="${applicationId}.firebaseinitprovider"
android:exported="false"
tools:node="remove" />
</application>
</manifest>
This is my build.gradle file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
name 'Google'
}
google()
maven {
url 'https://jitpack.io'
}
}
}
buildscript {
ext.kotlin_version = '1.7.10'
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.google.gms:google-services:4.3.14'
classpath 'com.jaredsburrows:gradle-license-plugin:0.8.80'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.14.0'
}
repositories {
google()
maven {
url 'https://plugins.gradle.org/m2/'
}
maven {
url 'https://maven.google.com/'
}
jcenter()
}
}
ext {
supportlib_version = '29.0.0'
gps_version = '[16.0.0, 17.0.0)'
fb_version = '[16.0.0, 18.0.0)'
}
allprojects {
repositories {
google()
jcenter()
}
}
This is my build.gradle for the module:
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
apply plugin: 'com.jaredsburrows.license'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
/*
* To update licenses, run:
* - cd [project location]
* - ./gradlew licenseReleaseReport
*/
licenseReport {
generateHtmlReport = true
generateJsonReport = false
// These options are ignored for Java projects
copyHtmlReportToAssets = true
copyJsonReportToAssets = false
}
android {
compileSdkVersion 33
defaultConfig {
applicationId "com.webagenten.canpostthis"
minSdkVersion 19
targetSdkVersion 33
multiDexEnabled true
versionCode 12
versionName "7.0"
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
//Optionally configure your OneSignal IDs below
manifestPlaceholders = [manifestApplicationId : "${applicationId}",
onesignal_app_id : "",
onesignal_google_project_number: ""]
}
signingConfigs {
release {
storeFile file("")
storePassword ""
keyAlias ""
keyPassword ""
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.release
}
}
dexOptions {
jumboMode true
}
applicationVariants.all { variant ->
if (variant.buildType.name == 'release') {
variant.mergeAssets.doLast {
delete(fileTree(dir: variant.mergeAssets.outputDir, includes: ['x86/ffmpeg', '**/*.ffmpeg']))
}
}
variant.getRuntimeConfiguration().exclude group: 'com.google.code.findbugs', module: 'jsr305'
}
}
repositories {
flatDir {
dirs 'libs'
}
maven {
url "https://jitpack.io"
}
mavenCentral()
jcenter()
}
dependencies {
implementation 'com.devbrackets.android:exomedia:4.3.0' //TV
implementation 'com.google.android.exoplayer:exoplayer:2.18.2' //TV & Radio
implementation 'com.cleveroad:audiovisualization:1.0.1' //Radio
implementation 'com.google.code.gson:gson:2.8.9' //WC
implementation 'com.squareup.okhttp3:okhttp:3.12.1' //WC
implementation 'org.jsoup:jsoup:1.13.1'
implementation 'com.google.firebase:firebase-analytics:21.2.0'
// Faceook SDK
implementation 'com.facebook.android:facebook-android-sdk:[5,6)'
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
implementation 'com.facebook.android:facebook-core:[4,5)'
implementation 'com.facebook.android:facebook-marketing:[4,5)'
implementation 'com.onesignal:OneSignal:[3.13.0, 3.99.99]'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.duolingo.open:rtl-viewpager:1.0.2'
implementation 'com.github.chrisbanes:PhotoView:1.3.0'
implementation 'com.github.ed-george:AndroidVimeoExtractor:1.2.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.multidex:multidex-instrumentation:2.0.0'
implementation 'androidx.exifinterface:exifinterface:1.3.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.legacy:legacy-support-core-utils:1.0.0'
implementation 'androidx.media:media:1.2.1'
implementation 'com.google.maps.android:android-maps-utils:0.5'
implementation 'com.google.android.gms:play-services-ads:19.0.1'
implementation "com.google.android.gms:play-services-maps:17.0.0"
implementation 'com.google.android.material:material:1.3.0'
implementation "com.android.billingclient:billing:3.0.2"
implementation 'com.google.firebase:firebase-ads:19.0.1'
implementation 'com.google.firebase:firebase-analytics:18.0.2'
implementation 'com.google.firebase:firebase-crashlytics:17.3.1'
implementation 'com.google.firebase:firebase-messaging:21.0.1'
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation 'androidx.fragment:fragment:1.1.0'
implementation 'com.android.volley:volley:1.2.1'
implementation 'com.onesignal:OneSignal:3.16.1'
implementation('com.squareup.picasso:picasso:2.71828') {
exclude group: "com.github.vansikrishna:Multimager:1.0.8", module: "jetified-Multimager-1.0.8-runtime"
}
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.duolingo.open:rtl-viewpager:1.0.2'
implementation 'com.github.chrisbanes:PhotoView:1.3.0'
implementation 'com.github.ed-george:AndroidVimeoExtractor:1.2.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.multidex:multidex-instrumentation:2.0.0'
implementation 'androidx.exifinterface:exifinterface:1.3.5'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.legacy:legacy-support-core-utils:1.0.0'
implementation 'androidx.media:media:1.6.0'
implementation 'com.google.maps.android:android-maps-utils:0.5'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation project(path: ':imagepicker')
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
implementation 'com.google.android.gms:play-services-ads:21.4.0'
implementation "com.google.android.gms:play-services-maps:18.1.0"
implementation 'com.google.android.material:material:1.7.0'
implementation "com.android.billingclient:billing:5.1.0"
implementation 'com.google.firebase:firebase-ads:21.4.0'
implementation 'com.google.firebase:firebase-analytics:21.2.0'
implementation 'com.google.firebase:firebase-crashlytics:18.3.2'
implementation 'com.google.firebase:firebase-messaging:23.1.1'
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation 'androidx.fragment:fragment:1.5.5'
debugImplementation 'androidx.fragment:fragment-testing:1.5.5'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.crystal:crystalrangeseekbar:1.1.3'
implementation 'com.github.vansikrishna:Multimager:1.0.8'
implementation 'com.google.android.gms:play-services-ads:21.4.0'
implementation 'mobi.upod:time-duration-picker:1.1.3'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-analytics:21.2.0'
//implementation 'com.arthenica:mobile-ffmpeg-full:4.2.2.LTS'
implementation 'com.arthenica:mobile-ffmpeg-full-gpl:4.2.2.LTS'
}
I would appreciate any hints or help, as I simply don´t understand what´s wrong here, as the mentioned receivers in the error log are simply not part of the manifest.

I am getting blank screen after integrating google maps api in my android application

I tried integrating google maps API in my android application but I keep getting a blank grey screen. Attaching manifest and build.gradle file. The activity file contains the default code that comes while creating a google maps activity. You can clearly see this in manifest file.
I have mentioned the API key. I think the issue lies in dependencies, I might not have included every library that requires in order to run the app but I am not able to figure it out.
Android Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mppolice">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<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/Theme.MPPolice">
<!--
TODO: Before you run your application, you need a Google Maps API key.
To get one, follow the directions here:
https://developers.google.com/maps/documentation/android-sdk/get-api-key
Once you have your API key (it starts with "AIza"), define a new property in your
project's local.properties file (e.g. MAPS_API_KEY=Aiza...), and replace the
"YOUR_API_KEY" string in this file with "${MAPS_API_KEY}".
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR_API_KEY"/>
<activity
android:name=".NearbyPolice"
android:exported="false"/>
<activity
android:name=".More"
android:exported="false" />
<activity
android:name=".WomanHelpline"
android:exported="false" />
<activity
android:name=".Statistics"
android:exported="false" />
<activity
android:name=".MissingPerson"
android:exported="false" />
<activity
android:name=".NearbyOffenders"
android:exported="false" />
<activity
android:name=".Contacts"
android:exported="false" />
<activity
android:name=".CrimeReport"
android:exported="false" />
<activity
android:name=".PasswordActivity"
android:exported="false" />
<activity
android:name=".AuthScreen"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="false"
android:label="#string/title_activity_main"
android:theme="#style/Theme.MPPolice.NoActionBar" />
<activity
android:name=".SplashScreen"
android:exported="true"
android:theme="#style/Theme.MPPolice.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Build.gradle
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-android-extensions'
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
}
apply plugin: 'com.google.gms.google-services'
android {
compileSdk 31
defaultConfig {
applicationId "com.example.mppolice"
minSdk 21
targetSdk 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation "androidx.cardview:cardview:1.0.0"
}
dependencies {
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.2'
implementation 'androidx.navigation:navigation-ui-ktx:2.4.2'
implementation 'com.google.firebase:firebase-auth:21.0.7'
implementation 'com.google.android.gms:play-services-maps:18.1.0'
implementation 'com.google.android.gms:play-services-location:20.0.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation platform('com.google.firebase:firebase-bom:30.3.1')
implementation 'com.google.firebase:firebase-analytics'
}

App not installed android studio

I am developing an app for a long time and now I'm trying to install generated apk on my phone, but there is error occurs. But it works fine when I run it on emulator or wi-fi adb connection with the phone. I'm already read a lot of manuals, but nothing helps me yet. I have no slightest idea why it's happening.
Here is my manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ru.scapegoats.checkers">
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".activity.game.Game" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.main.Main" />
</activity>
<activity android:name=".activity.bluetooth.BluetoothMenu" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.main.Main" />
</activity>
<activity android:name=".activity.session.SessionActivity" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.main.Main" />
</activity>
<activity android:name=".activity.createsession.CreateSessionActivity" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.internet.InternetMenu" />
</activity>
<activity android:name=".activity.properties.Properties" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.main.Main" />
</activity>
<activity android:name=".activity.internet.InternetMenu" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.main.Main" />
</activity>
<activity android:name=".activity.autorization.AutorizationActivity" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.main.Main" />
</activity>
<activity android:name=".activity.registration.RegistrationActivity" android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.main.Main" />
</activity>
<activity android:name=".activity.main.Main" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.VIEW"/>
</intent-filter>
</activity>
</application>
</manifest>
Here is my build gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-P'
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "ru.scapegoats.checkers"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
checkReleaseBuilds false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
ext {
androidSupportVersion = "27.0.1"
gmsVersion = "12.0.1"
retrofitVersion = "2.1.0"
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('androidx.test.espresso:espresso-core:3.1.0-alpha2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.appcompat:appcompat:1.0.0-alpha3'
testCompile 'junit:junit:4.12'
implementation 'org.florescu.android.rangeseekbar:rangeseekbar-library:0.3.0'
implementation "com.squareup.retrofit2:retrofit:${retrofitVersion}"
implementation "com.squareup.retrofit2:converter-gson:${retrofitVersion}"
implementation "com.squareup.retrofit2:adapter-rxjava:${retrofitVersion}"
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.5.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
implementation 'com.google.android.material:material:1.0.0-alpha3'
}
I'm tried to run the app on different devices but error always the same.
add android:testOnly="false" and android:debuggable="true" in your manifest section
<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:testOnly="false"
android:debuggable="true">
after this clean and Rebuild your project and try to install your apk again.
hope it will work..!! it works for me.
I had changed my LAUNCHER activity to exported=false by mistake. Then removed it and fixed :).
I changed complileSdkVersion to 28 and now it's installs fine.
Build -> Build Bundle (s) / APK (s) -> Build APK (s)

Packaging separate wear apks for android wear 1.x and 2.0

I am attempting to create a standalone Android Wear app for 1.x and 2. I followed the steps on the android developer page, but users say the wear apk isn't automatically installing on their 1.x watch. The mobile app has the same permissions. This is only here to get the wear apk to install. There are no activities on the mobile app.
Do I need to package the wear app in my mobile app? From what I read this shouldn't be done even for 1.x.
Here is a preview of what my apks look like in the developer console:
Mobile Manifest:
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="#style/Theme.Nav">
</application>
Wear Manifest:
<?xml version="1.0" encoding="utf-8"?>
<uses-feature android:name="android.hardware.type.watch" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<!-- Required for complications to receive complication data and open the provider chooser. -->
<uses-permission android:name="com.google.android.wearable.permission.RECEIVE_COMPLICATION_DATA"/>
<application
android:name=".App"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="#style/Theme.Nav">
<uses-library
android:name="com.google.android.wearable"
android:required="false" />
<meta-data
android:name="com.google.android.wearable.standalone"
android:value="true" />
<activity android:name=".ui.activity.SplashActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Main activity for music browsing on phone -->
<activity android:name=".ui.activity.MainActivity"
android:launchMode = "singleTop">
</activity>
<service android:name=".service.MediaPlayerService" />
<activity android:name="android.support.wearable.activity.ConfirmationActivity" />
<!--
Main music service, provides media browsing and media playback services to
consumers through MediaBrowserService and MediaSession. Consumers connect to it through
MediaBrowser (for browsing) and MediaController (for play session control)
-->
<service android:name=".service.FsService" />
<service android:name=".service.NsdService" />
<receiver
android:name=".service.NsdService$StartStopReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.turndapage.navmusic.FTPSERVER_STARTED" />
<action android:name="com.turndapage.navmusic.FTPSERVER_STOPPED" />
</intent-filter>
</receiver>
<!-- Don't export this receiver in free, this clashes with paid -->
<receiver
android:name=".RequestStartStopReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.turndapage.navmusic.ACTION_START_FTPSERVER" />
<action android:name="com.turndapage.navmusic.ACTION_STOP_FTPSERVER" />
</intent-filter>
</receiver>
<receiver android:name=".WifiStateChangeReceiver">
<intent-filter>
<action android:name="android.net.wifi.STATE_CHANGE" />
</intent-filter>
</receiver>
<service android:name=".WifiStateChangeReceiver$StartServerService" />
<service android:name=".WifiStateChangeReceiver$StopServerService" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<service
android:name=".watchface.AnalogComplicationWatchFaceService"
android:enabled="true"
android:label="#string/my_analog_name"
android:permission="android.permission.BIND_WALLPAPER">
<meta-data
android:name="android.service.wallpaper"
android:resource="#xml/watch_face" />
<meta-data
android:name="com.google.android.wearable.watchface.preview"
android:resource="#drawable/preview_analog" />
<meta-data
android:name="com.google.android.wearable.watchface.preview_circular"
android:resource="#drawable/preview_analog" />
<meta-data
android:name="com.google.android.wearable.watchface.wearableConfigurationAction"
android:value="com.turndapage.navmusic.CONFIG_COMPLICATION_SIMPLE"/>
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
<category android:name="com.google.android.wearable.watchface.category.WATCH_FACE" />
</intent-filter>
</service>
<activity android:name="android.support.wearable.complications.ComplicationHelperActivity"/>
<activity
android:name=".config.AnalogComplicationConfigActivity"
android:label="#string/analog_complication_config">
<intent-filter>
<action android:name="com.turndapage.navmusic.CONFIG_COMPLICATION_SIMPLE"/>
<category android:name="com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<receiver android:name=".provider.ComplicationToggleReceiver"/>
<activity android:name=".config.ColorSelectionActivity"/>
<service android:name=".provider.CurrentSongComplicationProvider"
android:icon="#drawable/ic_library_music_white_24dp"
android:label="#string/current_song"
android:permission="com.google.android.wearable.permission.BIND_COMPLICATION_PROVIDER">
<intent-filter>
<action android:name="android.support.wearable.complications.ACTION_COMPLICATION_UPDATE_REQUEST"/>
</intent-filter>
<meta-data
android:name="android.support.wearable.complications.SUPPORTED_TYPES"
android:value="SHORT_TEXT,LONG_TEXT"/>
<meta-data
android:name="android.support.wearable.complications.UPDATE_PERIOD_SECONDS"
android:value="0"/>
</service>
<service android:name=".provider.SkipBackComplicationProvider"
android:icon="#drawable/ic_skip_previous_white_24dp"
android:label="#string/skip_back"
android:permission="com.google.android.wearable.permission.BIND_COMPLICATION_PROVIDER">
<intent-filter>
<action android:name="android.support.wearable.complications.ACTION_COMPLICATION_UPDATE_REQUEST"/>
</intent-filter>
<meta-data
android:name="android.support.wearable.complications.SUPPORTED_TYPES"
android:value="ICON"/>
<meta-data
android:name="android.support.wearable.complications.UPDATE_PERIOD_SECONDS"
android:value="0"/>
</service>
<service android:name=".provider.SkipForwardComplicationProvider"
android:icon="#drawable/ic_skip_next_white_24dp"
android:label="#string/skip_next"
android:permission="com.google.android.wearable.permission.BIND_COMPLICATION_PROVIDER">
<intent-filter>
<action android:name="android.support.wearable.complications.ACTION_COMPLICATION_UPDATE_REQUEST"/>
</intent-filter>
<meta-data
android:name="android.support.wearable.complications.SUPPORTED_TYPES"
android:value="ICON"/>
<meta-data
android:name="android.support.wearable.complications.UPDATE_PERIOD_SECONDS"
android:value="0"/>
</service>
<service android:name=".provider.PlayPauseComplicationProvider"
android:icon="#drawable/ic_media_play_dark"
android:label="#string/play_pause"
android:permission="com.google.android.wearable.permission.BIND_COMPLICATION_PROVIDER">
<intent-filter>
<action android:name="android.support.wearable.complications.ACTION_COMPLICATION_UPDATE_REQUEST"/>
</intent-filter>
<meta-data
android:name="android.support.wearable.complications.SUPPORTED_TYPES"
android:value="ICON"/>
<meta-data
android:name="android.support.wearable.complications.UPDATE_PERIOD_SECONDS"
android:value="0"/>
</service>
<!-- Watch face stuff -->
</application>
Mobile Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.turndapage.navmusic"
minSdkVersion 15
targetSdkVersion 26
versionCode 260350011
versionName "0.3.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
wearAppUnbundled true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
{
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
Wear gradle:
plugins {
id "me.tatarka.retrolambda" version "3.5.0"
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.turndapage.navmusic"
minSdkVersion 23
targetSdkVersion 26
versionCode 260350010
versionName "0.3.5"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
// Needed for retrolambda
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.android.support:wearable:2.0.3'
compile 'com.android.support:wear:26.0.1'
compile 'com.google.android.gms:play-services-wearable:11.0.4'
compile 'com.google.android.exoplayer:exoplayer:r2.4.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.google.code.gson:gson:2.7'
compile 'com.github.kabouzeid:app-theme-helper:1.3.7'
compile 'com.android.support:support-v4:26.0.1'
compile 'com.android.support:design:26.0.1'
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:preference-v7:26.0.1'
compile 'com.android.support:mediarouter-v7:26.0.1'
compile 'com.android.support:percent:26.0.1'
compile 'net.vrallev.android:cat:1.0.5'
compile 'org.projectlombok:lombok:1.16.18'
compile 'com.twofortyfouram:android-plugin-client-sdk-for-locale:4.0.2'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.github.bumptech.glide:glide:4.0.0-RC1'
compile 'com.google.android.gms:play-services-fitness:11.0.4'
compile 'com.android.support:palette-v7:26.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1'
provided 'com.google.android.wearable:wearable:2.0.3'
}
[Edit] I had to update to include complication permissions and remove the watch feature on the mobile app to get it to upload to the play store. Some users report it is installing, but others can't get it to work.
Your assumption is correct, you should not embed the wear APK inside the phone APK (this was the old way of doing it). However, you still need to publish the phone APK.
There are only 2 APKs in your screen shot. There should be 3 in total: phone APK for AW 1.x, wear APK for AW 1.x, and wear APK for AW 2.x.
Make sure that the AW 2.0 APK has the highest version code, followed by the AW 1.x watch APK, and finally the AW 1.x phone APK.
Note that that the wearAppUnbundled true flag (in your phone gradle file) is only needed if you've previously published an AW 1.x app with an embedded wear APK (but it shouldn't hurt to include it otherwise).

Android KitKat multidex app crash

I have read carefully: https://developer.android.com/studio/build/multidex.html#mdex-gradle
So I have added to my build.gradle:
compile 'com.android.support:multidex:1.0.1'
My application definition in Android.manifest:
android:name=".App"
Finally, App class is defined as follows:
public class App extends Application
{
private static Context mContext;
#Override
protected void attachBaseContext(Context base)
{
super.attachBaseContext(base);
MultiDex.install(this);
}
#Override
public void onCreate()
{
super.onCreate();
mContext = this;
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this)
.defaultDisplayImageOptions(new DisplayImageOptions.Builder()
.imageScaleType(ImageScaleType.EXACTLY)
.build())
.build();
ImageLoader.getInstance().init(config);
}
public static Context getContext()
{
return mContext;
}
}
Unfortunately, this definitely don't help. My app still crashes on KitKat, with following message:
java.lang.RuntimeException: Unable to instantiate application
com.example.App: java.lang.ClassNotFoundException: Didn't find class
"com.example.App"
I did everything suggested by Google. Also tried to extend MultiDexApplication, still the same.
Do you have any ideas what else can I try?
[edit]
My build.gradle:
apply plugin: 'com.android.application'
android {
signingConfigs {
general {
keyAlias 'key'
keyPassword '123abc'
storeFile file('../store.jks')
storePassword '123abc'
}
}
compileSdkVersion 25
buildToolsVersion '26.0.0'
defaultConfig {
applicationId "(removed)"
minSdkVersion 19
targetSdkVersion 25
dataBinding.enabled = true
multiDexEnabled = true
versionCode 21
versionName '2.2'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
jackOptions {
enabled true
}
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
incremental true
targetCompatibility 1.8
sourceCompatibility 1.8
}
dexOptions {
javaMaxHeapSize '4096m'
}
lintOptions {
tasks.lint.enabled = false
}
productFlavors {
general {
applicationId "(removed)"
signingConfig signingConfigs.general
}
lomza {
applicationId "(removed)"
signingConfig signingConfigs.general
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.android.support:design:25.4.0'
compile 'com.android.support:customtabs:25.4.0'
compile 'com.android.support:cardview-v7:25.4.0'
compile 'com.jakewharton:butterknife:8.5.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.code.gson:gson:2.7'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.yarolegovich:lovely-dialog:1.0.5'
compile 'com.kaopiz:kprogresshud:1.0.5'
compile 'com.android.support:support-v4:25.4.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.google.android.gms:play-services-maps:10.2.1'
compile 'com.google.android.gms:play-services-places:10.2.1'
compile 'com.github.jaydeepw:poly-picker:v1.0.22'
compile 'com.android.support:support-v13:25.4.0'
compile 'gun0912.ted:tedpermission:1.0.3'
compile 'io.tus.android.client:tus-android-client:0.1.4'
compile 'io.tus.java.client:tus-java-client:0.3.1'
compile 'com.google.firebase:firebase-messaging:10.2.1'
compile 'com.google.firebase:firebase-auth:10.2.1'
compile 'com.google.android.gms:play-services-auth:10.2.1'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.android.support:support-vector-drawable:25.4.0'
compile 'com.google.firebase:firebase-crash:10.2.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'org.greenrobot:eventbus:3.0.0'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
compile 'com.google.maps.android:android-maps-utils:0.5'
compile 'com.google.guava:guava-collections:r03'
compile 'com.jcodecraeer:xrecyclerview:1.3.2'
compile 'com.android.support:cardview-v7:25.4.0'
compile 'com.hendraanggrian:collapsingtoolbarlayout-subtitle:0.7.0'
compile 'io.reactivex.rxjava2:rxjava:2.0.2'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
compile 'com.android.support:multidex:1.0.1'
}
apply plugin: 'com.google.gms.google-services'
Android manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="(removed)">
<uses-feature android:name="android.hardware.camera"/>
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<application
android:name=".App"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:fullBackupContent="#xml/backup_descriptor">
<!-- [START fcm_default_icon] -->
<!--
Set custom default icon. This is used when no icon is set for incoming notification messages.
-->
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="#mipmap/ic_launcher"/>
<!--
Set color used with incoming notification messages. This is used when no color is set for the incoming
notification message.
-->
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="#color/colorAccent"/>
<!-- [END fcm_default_icon] -->
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id"/>
<activity
android:name=".SplashActivity"
android:label="#string/app_name"
android:noHistory="true"
android:theme="#style/Theme.AppCompat.Light.NoActionBar.FullScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="SHOW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
android:resource="#xml/shortcuts" />
</activity>
<activity
android:name=".MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:launchMode="singleTop"
android:theme="#style/AppTheme.NoActionBar">
</activity>
<activity android:name=".LoginActivity">
<!-- android:noHistory="true" -->
</activity>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="(removed)"/>
<activity
android:name=".DetailsActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/activity_details"
android:launchMode="singleTop"
android:parentActivityName=".MainActivity">
</activity>
<activity
android:name=".MapActivity"
android:label="#string/activity_map"
android:parentActivityName=".DetailsActivity">
</activity>
<activity
android:name=".AddEventActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/activity_add_event"
android:launchMode="singleTop"
android:parentActivityName=".MainActivity">
</activity>
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name"/>
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="#string/fb_login_protocol_scheme"/>
</intent-filter>
</activity>
<service
android:name=".Tus.TusUploadService"
android:exported="false"/>
<!-- [START firebase_service] -->
<service android:name=".Firebase.MyFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<!-- [END firebase_service] -->
<!-- [START firebase_iid_service] -->
<service android:name=".Firebase.MyFirebaseInstanceIDService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
<!-- [END firebase_iid_service] -->
<activity
android:name=".Preferences.SettingsActivity"
android:label="#string/title_activity_settings"
android:parentActivityName=".MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="(removed).MainActivity"/>
</activity>
<activity
android:name="nl.changer.polypicker.ImagePickerActivity"
android:label = "#string/activity_img_picker_title"
/>
<activity
android:name=".ImagePreviewActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/title_activity_image_preview"
android:parentActivityName=".DetailsActivity"
android:theme="#style/FullscreenTheme">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="(removed).DetailsActivity"/>
</activity>
</application>
</manifest>
disables Instant Run.
Note :-> If your project is configured for multidex with minSdkVersion 20 or lower, and you deploy to target devices running Android 4.4 (API level 20) or lower, Android Studio disables Instant Run.
read more from doc
enable multidex as following:
android {
defaultConfig {
// Enabling multidex support.
multiDexEnabled true
}
}
dependencies {
compile 'com.android.support:multidex:1.0.0'
}
create one class like this
public class Multi_Dex extends Application {
#Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}
now in your manifiest file add this
<application
android:name=".Multi_Dex"
android:allowBackup="true"
android:icon="#drawable/logo"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">

Categories

Resources