2017-04-02 112 views
2

我不知道如何繼續...解析錯誤

我使用Android Studio構建了一個簽名或未簽名的apk(一切都是最新的)。現在我想測試這個apk並將其安裝在我的手機上。 但我總是得到一個解析錯誤...

我試過不同的設備,但具有相同的結果。我嘗試了一個空白的應用程序,但結果相同。由於解析錯誤,我無法安裝它。但直接從AS部署工作得很好!

我嘗試了: 重新安裝SDK(最新) 重新安裝的Android工作室(最新) 重新安裝的Java(最新)

較舊版本的Gradle(2.2.3)

開發選項,並允許未知來源在我的所有設備上都有效。 的minSdkVersion設置爲19(我只是與Android設備5和6)

我沒有哪裏的問題來自於一個想法......

有人可以幫助我嗎?

在此先感謝!

+0

保持logcat打開並關閉所有過濾。當你嘗試安裝時,logcat應該提供關於爲什麼不安裝應用程序的附加信息。 – michaelcarrano

回答

0

OK我終於解決了我的問題!

我上傳了apk到dropbox!這是問題!

如果我將apk直接移動到我的設備的下載文件夾(使用USB),一切正常!

但無論如何感謝您的幫助!

0

這不是代碼!我嘗試了新的空白項目,我不能安裝它

,但這裏是清單和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' 
}