<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera.front" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="24" />
<application
android:name=".activities.base.BaseApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".activities.main.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activities.homescreen.HomescreenActivity" />
<activity android:name=".activities.camera.CameraActivity" />
<activity
android:name=".activities.settings.SettingsActivity"
android:theme="@style/SWCoinSettingsStyle" />
<activity android:name=".activities.send.SendActivity" />
<activity android:name=".activities.receive.ReceiveActivity" />
<activity
android:name=".activities.login.LoginActivity"
android:windowSoftInputMode="stateAlwaysHidden" />
<meta-data
android:name="name"
android:value="value" />
</application>
我使用的库可能有问题吗? 这是我的build.gradle文件的一部分:
android {
compileSdkVersion 24
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "id"
minSdkVersion 14
targetSdkVersion 24
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
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:24.2.1'
compile 'com.android.support:multidex:1+'
testCompile 'junit:junit:4.12'
compile 'com.scottyab:aescrypt:0.0.1'
compile 'net.danlew:android.joda:2.9.4.1'
compile 'com.github.clans:fab:1.6.4'
compile 'com.android.support:design:24.2.1'
compile('com.mikepenz:materialdrawer:4.3.7@aar') {
transitive = true
}
compile 'com.mikepenz:fontawesome-typeface:4.7.0.0@aar'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.jakewharton:butterknife:8.2.1'
apt 'com.jakewharton:butterknife-compiler:8.2.1'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.squareup.dagger:dagger:1.2.+'
apt 'com.squareup.dagger:dagger-compiler:1.2.+'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.okhttp3:okhttp:3.0.1'
compile 'com.google.code.gson:gson:2.5'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
//QR
compile 'com.google.zxing:core:3.2.1'
compile 'me.dm7.barcodescanner:zxing:1.9'
//log crash
compile('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') {
transitive = true;
}
在构建apk时我也有一些警告
某些输入文件使用或覆盖已弃用的API。注意:重新编译 with -Xlint:弃用细节。
答案 0 :(得分:1)
请从manifest
删除以下代码。
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true"/>
同时删除以下代码
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="24" />