I was trying to run the app but it failed because "Android resource linking failed":
error: attribute android:useAndroidX not found.
error: failed processing manifest.
But the attribute is indeed in the file so I am not sure why it still does not work.
The attribute to enable AndroidX is available in manifest file, the debug manifest file and also the gradle properties after the project migrated to AndroidX, all the dependencies are updated so I am not sure what to do.
This is the manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.amethyst.within">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:icon="#drawable/ic_star_rate_on"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.AppCompat.Light.NoActionBar"
android:useAndroidX="true">
<activity android:name=".NewNoteActivity" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="preloaded_fonts"
android:resource="#array/preloaded_fonts" />
</application>
</manifest>
This is the manifest debug file (above the file it is stated it is not recommended for editing, but when clicked on the error, it linked to this file):
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.amethyst.within"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="21"
android:targetSdkVersion="28" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- Although the *SdkVersion is captured in gradle build files, this is required for non gradle builds -->
<!-- <uses-sdk android:minSdkVersion="14" /> -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:appComponentFactory="androidx.core.app.CoreComponentFactory"
android:debuggable="true"
android:icon="#drawable/ic_star_rate_on"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:testOnly="true"
android:theme="#style/Theme.AppCompat.Light.NoActionBar"
android:useAndroidX="true" >
<activity android:name="com.amethyst.within.NewNoteActivity" />
<activity android:name="com.amethyst.within.MainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="preloaded_fonts"
android:resource="#array/preloaded_fonts" />
<service
android:name="com.google.firebase.components.ComponentDiscoveryService"
android:exported="false" >
<meta-data
android:name="com.google.firebase.components:com.google.firebase.firestore.FirestoreRegistrar"
android:value="com.google.firebase.components.ComponentRegistrar" />
<meta-data
android:name="com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar"
android:value="com.google.firebase.components.ComponentRegistrar" />
</service>
<activity
android:name="com.google.firebase.auth.internal.FederatedSignInActivity"
android:excludeFromRecents="true"
android:exported="true"
android:launchMode="singleTask"
android:permission="com.google.firebase.auth.api.gms.permission.LAUNCH_FEDERATED_SIGN_IN"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:authorities="com.amethyst.within.firebaseinitprovider"
android:exported="false"
android:initOrder="100" />
<activity
android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:exported="false"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<provider
android:name="com.android.tools.ir.server.InstantRunContentProvider"
android:authorities="com.amethyst.within.com.android.tools.ir.server.InstantRunContentProvider"
android:multiprocess="true" />
</application>
</manifest>
This is the gradle properties file:
# 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.
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m
# 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
gradle dependency file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.amethyst.within"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.jackandphantom.android:androidlikebutton:1.2.0'
implementation files('libs/forismatic-api-java.jar')
implementation 'com.google.firebase:firebase-firestore:21.0.0'
implementation 'com.google.firebase:firebase-auth:19.0.0'
}
Remove android:useAndroidX="true" from manifest file. It's not an existing attribute.
Related
I have tried so many solutions but none worked. It would be great if someone could help here.I have imported this project which has API 21 however, I have API 26. If you want to know any further details from the code, please let me know. I have completely no idea where I went wrong so it would be nice if anyone can tell me what are the possible fixes for this situation?
manifest file is as follows:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapps.documentscanner"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:name=".DocumentScannerApplication"
android:allowBackup="true"
android:fullBackupContent="false"
android:hardwareAccelerated="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="#style/Theme.AppCompat">
<receiver android:name="WidgetProvider">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="#xml/simple_widget_info" />
</receiver>
<meta-data
android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="ocr" />
<!--
Optionally, register AnalyticsReceiver and AnalyticsService to support background
dispatching on non-Google Play devices
-->
<receiver
android:name="com.google.android.gms.analytics.AnalyticsReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
</intent-filter>
</receiver>
<service
android:name="com.google.android.gms.analytics.AnalyticsService"
android:enabled="true"
android:exported="false" />
<!--
Optionally, register CampaignTrackingReceiver and CampaignTrackingService to enable
installation campaign reporting
-->
<receiver
android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<service android:name="com.google.android.gms.analytics.CampaignTrackingService" />
<activity
android:name=".DocumentScannerActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/title_activity_document_scanner"
android:screenOrientation="portrait"
android:theme="#style/FullscreenTheme.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.media.action.IMAGE_CAPTURE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".GalleryGridActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/title_activity_gallery"
android:screenOrientation="portrait"
android:theme="#style/FullscreenTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity
android:name=".SavedTextsList"
android:label="#string/saved_texts_list"
android:launchMode="singleTask"
android:parentActivityName=".OcrCaptureActivity"
android:theme="#style/FullscreenTheme">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".OcrCaptureActivity" />
</activity>
<!-- todo 5: Add provider to AndroidManifest.xml -->
<provider
android:name="com.myapps.documentscanner.data.TextProvider"
android:authorities="com.myapps.documentscanner" />
<activity
android:name=".TextDetailActivity"
android:label="#string/edit_text_detail"
android:parentActivityName=".SavedTextsList"
android:theme="#style/FullscreenTheme">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".SavedTextsList" />
</activity>
<activity
android:name=".FullScreenViewActivity"
android:label="#string/title_activity_full_image"
android:theme="#style/FullscreenTheme" />
<activity
android:name=".SettingsActivity"
android:label="#string/settings"
android:theme="#style/AppTheme" />
<activity
android:name=".OcrCaptureActivity"
android:label="Read Text"
android:parentActivityName=".DocumentScannerActivity"
android:theme="#style/AppTheme">
<!-- The meta-data element is needed for versions lower than 4.1 -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".DocumentScannerActivity" />
</activity><!-- ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information. -->
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
</application>
</manifest>
The build.gradle file is as follows:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
applicationId "com.myapps.documentscanner"
minSdkVersion 21
targetSdkVersion 23
versionCode 3
versionName '2.0'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
}
splits {
// Configures multiple APKs based on ABI.
abi {
// Enables building multiple APKs per ABI.
enable true
// By default all ABIs are included, so use reset() and include to specify that we only
// want APKs for x86, armeabi-v7a, and mips.
// Resets the list of ABIs that Gradle should create APKs for to none.
reset()
// Specifies a list of ABIs that Gradle should create APKs for.
include "x86", "armeabi-v7a", "mips" , 'armeabi'
// Specifies that we do not want to also generate a universal APK that includes all ABIs.
universalApk false
}
}
}
// Map for the version code that gives each ABI a value.
ext.abiCodes = ['armeabi':1, 'armeabi-v7a':2, mips:3, x86:4]
// For per-density APKs, create a similar map like this:
// ext.densityCodes = ['mdpi': 1, 'hdpi': 2, 'xhdpi': 3]
import com.android.build.OutputFile
// For each APK output variant, override versionCode with a combination of
// ext.abiCodes * 1000 + variant.versionCode. In this example, variant.versionCode
// is equal to defaultConfig.versionCode. If you configure product flavors that
// define their own versionCode, variant.versionCode uses that value instead.
android.applicationVariants.all { variant ->
// Assigns a different version code for each output APK
// other than the universal APK.
variant.outputs.each { output ->
// Stores the value of ext.abiCodes that is associated with the ABI for this variant.
def baseAbiVersionCode =
// Determines the ABI for this variant and returns the mapped value.
project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
// Because abiCodes.get() returns null for ABIs that are not mapped by ext.abiCodes,
// the following code does not override the version code for universal APKs.
// However, because we want universal APKs to have the lowest version code,
// this outcome is desirable.
if (baseAbiVersionCode != null) {
// Assigns the new version code to versionCodeOverride, which changes the version code
// for only the output APK, not for the variant itself. Skipping this step simply
// causes Gradle to use the value of variant.versionCode for the APK.
output.versionCodeOverride =
baseAbiVersionCode * 1000 + variant.versionCode
}
}
}
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.google.zxing:core:3.0.1'
compile 'com.android.support:support-v4:23.3.0'
compile 'com.afollestad:drag-select-recyclerview:0.3.6'
compile 'com.github.nostra13:Android-Universal-Image-Loader:v1.9.5'
compile 'com.github.fafaldo:fab-toolbar:1.2.0'
compile 'com.google.android.gms:play-services-analytics:9.2.1'
compile 'com.google.android.gms:play-services-vision:9.2.1'
compile 'com.google.android.gms:play-services-appindexing:9.2.1'
compile project(':openCVLibrary310')
}
apply plugin: 'com.google.gms.google-services'
Error is : Error:Cannot read packageName from E:\Document-Scanner-master\src\main\AndroidManifest.xml
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).
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="sam.gymnotes" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/NoActionBar" >
<meta-data
android:name="com.google.android.gms.version"
/>
<activity
android:name=".activity_ExcersiseView"
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=".dialog_new_excersise"
android:label="dialog_new_excersise"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".activity_IconChooser"
android:label="#string/title_activity_icon_chooser" >
</activity>
<activity
android:name=".activity_WorkoutView"
android:label="#string/title_activity_activity__workout_view" >
</activity>
<activity
android:name=".dialog_are_you_sure"
android:label="#string/title_activity_dialog_are_you_sure"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".activity_SetView"
android:label="#string/title_activity_activity__set_view" >
</activity>
<activity
android:name=".dialog_edit_workout"
android:label="#string/title_activity_dialog_date_picker"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".dialog_new_set"
android:label="#string/title_activity_dialog_new_set"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".dialog_edit_note"
android:label="#string/title_activity_dialog_edit_note"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".dialog_3option"
android:label="#string/title_activity_dialog_convert"
android:theme="#style/Theme_Dialog" >
</activity>
<activity
android:name=".activity_Info"
android:label="#string/title_activity_info" >
</activity>
</application>
</manifest>
The above is my manifest file, I have gone through numerous answers on here for a malformed manifest and I cannot figure out what the issue is. What is causing the 'Error while Installing APK'. All I get when trying to run is
pkg: /data/local/tmp/sam.gymnotes
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
gradle;
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion '24.0.0'
defaultConfig {
applicationId "sam.gymnotes"
minSdkVersion 14
targetSdkVersion 24
versionCode 4
versionName "1.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:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.google.android.gms:play-services:9.2.0'
}
1) Put </manifest> in the end of the file.
2) Use following code for gms version
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
EDIT
try this answer
-> File
-> project structure
-> app
-> dependencies
-> click on +
-> library dependency
-> select play-services (October 2015: com.google.android.gms:play-services:7.8.0)
-> Rebuild
i migrate to eclipse to Android studio and install the latest version of Android studio 1.3 and i am using too many libraries projects and some of jar files. but now when i try to run this project its always show me
Picked up _JAVA_OPTIONS: -Xmx512M
Error:Execution failed for task ':app:preDexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 3
i place there he write hat remove _JAVA_OPTION -Xm512 will remove app in you project but nothing happen. this is is below my gradle.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.2'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion 22
buildToolsVersion '21.0.1'
defaultConfig {
applicationId "com.iptikarpromotion"
minSdkVersion 9
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile files('libs/google-http-client-1.16.0-rc.jar')
compile files('libs/gson-2.1.jar')
compile files('libs/google-play-services.jar')
compile project(':libraries:ImageSliderLibrary')
compile project(':libraries:CircularImageView')
compile project(':libraries:GalleryViewLibrary')
}
And manifist is
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.iptikarpromotion" >
<permission
android:name="com.example.iptikarpromotion.permission.MAPS_RECEIVE"
android:protectionLevel="signature"></permission>
<uses-permission android:name="com.example.androidmapsv2.permission.MAPS_RECEIVE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<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.CALL_PHONE" />
<application android:name="com.iptikarpromotion.utils.ApplicationData"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:hardwareAccelerated="true"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyBVgaZHjJmXd6pQNRISnzzSbEN0B3aJuns"/> <!-- bebug key= AIzaSyBVgaZHjJmXd6pQNRISnzzSbEN0B3aJuns -->
<activity
android:name=".activity.SplashActivity"
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=".activity.LoaderActivity" android:screenOrientation="portrait"> </activity>
<activity android:name=".activity.HomeActivity" android:screenOrientation="portrait"> </activity>
<activity android:name=".activity.DetailActivity" android:screenOrientation="portrait"> </activity>
<activity android:name=".activity.WebviewActivity" android:screenOrientation="portrait"> </activity>
<activity android:name=".activity.MapActivity" android:screenOrientation="portrait"> </activity>
<activity android:name=".activity.GalleryViewActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.MyFavourateActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.MyAdsActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.ContactUsActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.OurServicesActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.QuicklyPickActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.AllCategoriesGridViewActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.AllCategoriesChildActivity" android:screenOrientation="portrait"></activity>
<activity android:name=".activity.PromotionActivity" android:screenOrientation="portrait"></activity>
</application>
</manifest>
This my jar files
gson-2.1.jar
google-play-services.jar
google-http-client-1.16.0-rc.jar
AndroidEasingFunctions-1.0.0.jar.
Thanks
Remove Java_option in Environment Variable of System of Windows. Exit Android Studio and run it again.
I downloaded a library from github and imported it. I don't think it was done right. How to unimport it. I deleted the project from windows file explorer. Now when I build I get Task 'compileDebugSource' not found in project:BackgroundMailLibrary.
I just found that that lib is deprecated and want to use the new one. Please help.
.
I removed the library by clicking on it and selecting edit configuration and clicking the - mark. But am still getting the cross mark
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc2"
defaultConfig {
applicationId "com.prematixsofs.taxiapp"
minSdkVersion 15
targetSdkVersion 22
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.0'
compile files('libs/activation.jar')
compile files('libs/additionnal.jar')
//compile files('libs/mail.jar')
}
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-library android:name="com.google.android.maps" />
<service
android:name=".KioskService"
android:exported="false" />
<uses-permission android:name="android.permission.GET_TASKS" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppFullScreenTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name=".RegisterActivity"
android:label="#string/title_activity_register"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name=".BaseActivity"
android:label="#string/title_activity_base" >
</activity>
<activity
android:name=".LoginActivity"
android:label="#string/title_activity_login"
android:windowSoftInputMode="stateHidden" >
</activity>
<activity
android:name=".BlankActivity"
android:label="#string/title_activity_blank" >
</activity>
<activity
android:name=".DateVehiclePicker"
android:label="#string/title_activity_date_vehicle_picker" >
</activity>
<activity
android:name=".MailImage"
android:label="#string/title_activity_mail_image" >
</activity>
<activity
android:name=".EditUserDetails"
android:label="#string/title_activity_edit_user_details" >
</activity>
<activity
android:name=".DynamicTextViewActivity"
android:label="#string/title_activity_dynamic_text_view" >
</activity>
<activity
android:name=".SplashScreenActivity"
android:label="SplashScreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name=".KioskService"
android:exported="false" />
<activity
android:name=".DisplayBookingHistory"
android:label="#string/title_activity_display_booking_history" >
</activity>
</application>
If it is a library dependence
go to file-->project structure-->on the right side tab select dependency and remove that
you can also remove it from you build.gradle file
if it is imported as a module
go to file-->project structure-->on top left corner click the (-) mark
In Android studio window,
Remove from File > Project Structure > Dependencies > - button. Then if it is still there you can remove the module by going to the settings.gradle file and removing it from the include line.
If you have disable run button than follow
Click Run on the menu and then Edit Configurations then click on Android Application on the left and click the + button. Choose Android Application from the pop-up menu. Then pick the module (its normally app or something like that). Then click apply and ok.
If you have more errors after that, try to re-import the project in Android Studio.