Spy-Shifty
Spy-Shifty

Reputation: 51

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!!!

Upvotes: 4

Views: 4673

Answers (2)

Spy-Shifty
Spy-Shifty

Reputation: 51

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!

Upvotes: 1

Spy-Shifty
Spy-Shifty

Reputation: 51

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'
}

Upvotes: 0

Related Questions