missing adactivity with android configchanges - android

build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig {
applicationId "com.example.yamkatrader.myapplication"
minSdkVersion 9
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.2'
compile 'com.google.android.gms:play-services:6.5.87'
compile 'com.google.api-ads:tools:1.12.1'
}
Android Manifest
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
</activity>
and
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.yamkatrader.myapplication" >
<uses-permission android:name="android.permission.SET_DEBUG_APP"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat.Light" >
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version"/>
missing adactivity with android configchanges
I tried to solve the problem using google , does not work.
The official guide from google too did not help.
Created through the mainactivity
Help. ;c

The Android Manifest xml file is invalid, because you close your activity tag twice. If you close the <activity tag with /> then you don't need to put the closing </activity> after.
In theory your IDE should have complained about that already before you run the app.
So just do:
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
/>
instead of:
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
/>
</activity>

Related

APK Parsing Error

I do not know how to continue...
I build a signed or unsigned apk with Android Studio (everything is up to date). Now I want to test this apk and install it on my phone.
But I always get a parsing error...
I tried diffrent devices but with the same result. I tryed a blank app but with the same result. I can't install it because of a parsing error. But deploying directly from AS works just fine!
What I tried out:
Reinstalling SDK (latest)
Reinstalling Android Studio (latest)
Reinstalling Java (latest)
an older gradle version (2.2.3)
Dev options and allowing unknown sources are aktive on all my devices.
minSdkVersion is set to 19 (I just have devices with Android 5 and 6)
I don't have an idea where the problem comes from...
Can somebody help me?
Thanks in advance!!!
OK I finally solved my problem!
I uploaded the apk to dropbox! That was the problem!
If I move the apk directly to the download folder of my device (using USB) everything works fine!
But anyway thanks for your help!
It's not the code at all! I tried a new blank project and I couldn't install it too
but here is the Manifest and the gradle:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.brokenbricksstudios.todo"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="23"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".ToDo"
android:clearTaskOnLaunch="true"
android:label="#string/app_name"
android:launchMode="singleTask"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<service android:name=".bubbles.BubblesService"
android:enabled="true"
android:exported="false" />
</application>
</manifest>
gradle:
apply plugin: 'com.android.application'
android {
signingConfigs {
TODO {
keyAlias 'TODO'
keyPassword '***********'
storeFile file('E:/AndroidStudioProjects/KeyStore.jks')
storePassword '***********'
}
}
compileSdkVersion 23
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.brokenbricksstudios.todo"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
signingConfig signingConfigs.TODO
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.TODO
}
debug {
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
}

MapBox SDK not working android

I just started to use the MapBox SDK but its not working I was following the steps on the documentation but Im not getting any classes from their SDK here is my code:
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.mapp.hello"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'
compile ('com.mapbox.mapboxsdk:mapbox-android-sdk:4.2.0-beta.2#aar'){
transitive=true
}
}
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.mapp.hello"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<service android:name="com.mapbox.mapboxsdk.telemetry.TelemetryService"/>
</application>
</manifest>
The com.mapbox.mapboxsdk.telemetry.TelemetryService is shown in red and I cannot import the MapboxAccountManager
I know it's an old question, but I just had the same error while trying to update from Mapbox 4.x to 5.x and it turns out you have to change:
<service android:name="com.mapbox.mapboxsdk.telemetry.TelemetryService"/>
to
<service android:name="com.mapbox.services.android.telemetry.service.TelemetryService" />
Update:
Turns out in the latest version (5.x) you don't have to declare it in the Manifest at all, as Mapbox now makes use of Manifest merge feature.
I dont know how but the app was getting run even though gradle build was stopped because of lint, I just stopped lint from stopping the build process now everything is working :)

Supported Android devices: 0 devices

we are the developers of TourisMap. We don't understand why after the upload of our apk on the Google Play Developer Console we have 0 devices supported. Our personal thought is the Manifest and the build.gradle are ok: we can produce apk, than we can distribuite it to our beta tester without problems. Can you help us? Where is our error here, in your opinion?
AndroidManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.caronteconsulting.tourismap"
android:versionName="#string/version">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<supports-screens android:largeScreens="true"
android:normalScreens="true" android:smallScreens="true"
android:anyDensity="true"></supports-screens>
<uses-sdk android:minSdkVersion="13" android:targetSdkVersion="13" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="asd"/>
<activity
android:configChanges="orientation|keyboardHidden|screenSize"
android:name=".MainActivity"
android:label="#string/app_name" >
</activity>
<activity
android:name=".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>
</application>
</manifest>
build.gradle (app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.caronteconsulting.tourismap"
minSdkVersion 13
targetSdkVersion 13
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig getSigningConfig()
applicationVariants.all { variant ->
variant.outputs.each { output ->
def date = new Date();
def formattedDate = date.format('yyyyMMddHHmmss')
def newName = output.outputFile.name
newName = newName.replace("app-", "TourisMap-")
newName = newName.replace("-release", "-release" + formattedDate)
output.outputFile = new File(output.outputFile.parent, newName)
}
}
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.google.android.gms:play-services:7.5.0'
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
}
Set the targetSdkVersion to 23.
We found the problem. Thanks to the indications here, we found the line that generates 0 devices into build.gradle :
dependencies {
[...]
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
}
We use that lib to acquire strings in UTF-8. We delete our dependencies from org.apache.commons.io, than we delete the line:
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
from the build.gradle, we compile and upload on Google Play... Tadaaaa! 8233 devices. Why this happens? We don't know: Android Studio adds this line when you use Apache.Commons.IO functions and Google Play does not recognizes this lib... boh! Thanks for the help guys.

Why is my Android App unsupported for ALL devices on google play?

I published an Android app on the google play store but it says that it is incompatible with ALL devices:
Why is this? Just before this, I published another app and it really wasn't that much different from this one but it is compatible with almost all devices.
This is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxx.yy" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/app"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- register our ContentProvider -->
<provider
android:name=".data.app"
android:authorities="#string/content_authority"
android:exported="false"
android:syncable="true" />
<activity
android:name=".DetailActivity"
android:label="#string/title_activity_detail"
android:parentActivityName=".FavoritesActivity"
android:launchMode="singleTask">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.xxx.yyy.MainActivity" />
>
</activity>
<activity
android:name=".FavoritesActivity"
android:label="#string/title_activity_favorites"
android:parentActivityName=".MainActivity"
android:launchMode="singleTask">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.xxx.yyy.MainActivity" />
</activity>
</application>
</manifest>
And this is my gradle.build file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.xxx.yy"
minSdkVersion 10
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:support-v4:22.2.0'
compile 'org.json:json:20150729'
compile 'org.apache.directory.studio:org.apache.commons.codec:1.8'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
compile 'com.android.support:design:22.2.0'
}
I'm really lost here because I only have one permission, INTERNET..
I found out the culprit!
It was this line in my gradle file:
compile 'org.apache.directory.studio:org.apache.commons.codec:1.8'
This weird: Native platforms thing was showing up before all because of that gradle dependency!
Which does not make sense for me... I guess I have to find another dependency or something. Could someone explain to me why a dependency like that would cause this to happen?
I removed that line and upon reuploading my APK I now see this:
You appear to have an extra > in your manifest --
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.xxx.yyy.MainActivity" />
> <==== DELETE THIS
</activity>
<activity
Not sure why your even able to make a build with that, but I tested a similar scenario and it made an APK for me. I would guess when you upload the .apk that is messing with google play's parsing for device compatibility.

Play store says my app is supported by 0 devices

I have recently finished building my first android app. I published it to the store today but it says it supports 0 devices. Here is my manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.guessthepicturespazam.guessit" >
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="נחש את המילה"
android:theme="#style/Theme.AppCompat.NoActionBar" >
<activity
android:name=".MainActivity"
android:configChanges="orientation"
android:label="נחש את המילה"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".GameActivity"
android:configChanges="orientation"
android:label="#string/title_activity_game"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".Splash"
android:configChanges="orientation"
android:label="נחש את המילה"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".StoreActivity"
android:label="#string/title_activity_store" >
</activity>
<activity
android:name=".GameOverActivity"
android:label="#string/title_activity_game_over" >
</activity>
</application>
<supports-screens
android:anyDensity="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:resizeable="true" />
</manifest>
This is my build.grade file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.GuessTheWordZahal.guessit"
minSdkVersion 10
targetSdkVersion 23
versionCode 2
versionName "1.0.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
compile 'com.google.android.gms:play-services-ads:7.8.0'
}
I tried looking this problem up online but I couldn't find a problem similar to mine. Most apps have no supported devices because they use features that are only available in some or in no devices. I just can't figure out what's wrong in mine. I've actually tested this app on my samsung galaxy and it worked fine.
You need to provide supported sdkVersion
<uses-sdk
android:minSdkVersion="minimum(e.g "8")"
android:targetSdkVersion="maximum(e.g "22")" />
if you are using Eclipse then mention your minSdkVersion & maxSdkVersion in your manifest file and if you are using Android Studio then mention these in build.gradle file.
For Eclipse
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.guessthepicturespazam.guessit"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8"
android:targetSdkVersion="21"/>
.......................
</manifest>
For Android Studio
edit your build.gradle file like as below
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.guessthepicturespazam.guessit"
minSdkVersion 8
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Note: Version name and Version code is important if you want to update your application in future.
Your manifest is incorrect.
<supports-screens>
is currently placed in application tag but should be moved up, to manifest tag.
Check out manifest structure https://developer.android.com/guide/topics/manifest/manifest-intro.html#filestruct
I suppose play-store parser couldn't find supports-screens information and decided that there is no screen supported. Please, correct manifest and let us know. Very interesting issue.

Categories

Resources