错误: screenSize | smallestScreenSize Android Studio 目标 SDK 23

9

我正在尝试将HeyZap广告集成到我的应用程序中,但在构建时不断出现此错误:Error:screenSize|smallestScreenSize)。

我已经搜索了它,并发现这是目标SDK错误,至少应该是13,但这里我使用的是SDK 23。

这是我的清单文件:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.celebria">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:name="com.celebria.MyApplication">

        <activity
            android:name=".ActivitySplash"
            android:theme="@style/AppThemeLogin"
            android:windowSoftInputMode="adjustPan">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name=".Tutorial"
            android:theme="@style/AppThemeLogin"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".ActivityLogin"
            android:theme="@style/AppThemeLogin"
            android:windowSoftInputMode="adjustPan" />

        <receiver
            android:name=".AlarmReceiver"
            android:enabled="true"
            android:process=":remote"
            android:exported="true"/>
        <receiver
            android:name=".BootReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.QUICKBOOT_POWERON"/>
            </intent-filter>
        </receiver>

        <service
            android:name=".DownloadService"
            android:enabled="true"
            android:stopWithTask="false"
            android:exported="true"/>

        <activity
            android:name=".Home"
            android:theme="@style/AppThemeLogin"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".ActivityCreateAccount"
            android:theme="@style/AppThemeLogin"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".ActivityActiveTrivia"
            android:theme="@style/AppThemeLogin"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".ActivityMatchUp"
            android:theme="@style/AppThemeLogin"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".ActivityQuestionAnswer"
            android:theme="@style/AppThemeLogin"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".ActivityWinner"
            android:theme="@style/AppThemeLogin"
            android:windowSoftInputMode="adjustPan" />

        <activity android:name=".CreateAccount"
            android:theme="@style/AppThemeLogin"/>

        <activity android:name=".ActivityForgotPassword"
            android:theme="@style/AppThemeLogin"
            android:windowSoftInputMode="adjustPan" />


        <!-- Google Play Services -->
        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>

        <!-- Fyber Marketplace -->
        <activity android:name="com.heyzap.sdk.ads.HeyzapIncentivizedActivity" android:configChanges="orientation|screenSize" android:theme="@android:style/Theme.Translucent" android:hardwareAccelerated="true" />
        <activity android:name="com.heyzap.sdk.ads.HeyzapInterstitialActivity" android:configChanges="orientation|screenSize" android:theme="@android:style/Theme.Translucent" />
        <activity android:name="com.heyzap.sdk.ads.MediationTestActivity" />
        <activity android:name="com.fyber.ads.ofw.OfferWallUnityActivity" android:configChanges="orientation" />
        <service android:name="com.fyber.cache.CacheVideoDownloadService" android:exported="false" />
        <meta-data android:name="FYBVideoPlayerOptionCloseButtonDelay" android:value="-1" />


    </application>

</manifest>

这是我的 build.gradle 文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.celebria"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
repositories {

    mavenCentral()

    maven {
        name "Fyber's maven repo"
        url "https://fyber.bintray.com/maven"
    }
    flatDir {
        dirs "libs"
    }

}
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile'com.google.android.gms:play-services-location:10.0.1'
    compile'com.google.android.gms:play-services-ads:10.0.1'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.wang.avi:library:2.1.3'
    compile 'com.squareup.picasso:picasso:2.5.0'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'jp.wasabeef:blurry:2.1.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'uk.co.chrisjenx:calligraphy:2.2.0'
    compile 'me.relex:circleindicator:1.2.2@aar'
    compile(name:'heyzap-unified-platform-10.3.0', ext:'aar')
}

这是一个错误的图片:

enter image description here

这是我一直在跟进的链接:https://developers.heyzap.com/docs/android_sdk_setup_and_requirements


你解决这个问题了吗? - Marty
我尝试了很多解决方案,但都没有起作用,而删除它却让错误消失了。 - wael ben hamda
我在我的代码中遇到了同样的问题,尽管我没有使用HeyZap。不知道该如何删除它。 - Anton
2个回答

4

1
我的问题与我的设置有关。我已经将编译器标志设置为 --stacktrace --debug,当我将其删除(使其为空)时,一切都按预期工作。
编译器标志在 文件 > 设置 > 构建、执行、部署 > 编译器 中。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接