2015-01-11 6 views
3

MoPub 추가를 추가하려고하는데 Android Studio를 사용합니다. 내가 여기에 지침을 적용하려고 :mopub android studio millennialmedia 미해결

https://github.com/mopub/mopub-android-sdk/wiki/Getting-Started

내가 제목 후에 적용 할 수 없습니다 "추가 .aar 컴파일로"나는 생각한다.

모든 프로젝트에서 잘 될 것 같다하지만 난 사용하지 않는 가져 오기 및 기호의 파일 "MillennialInterstitial" "MillennialBanner"모든 이상 오류를 해결할 수없는 무엇입니까 폴더 걸레-SDK/자바/mobileads/

UTIL 내가 SUCC 없었던 것 같아요

http://docs.millennialmedia.com/android-SDK/

많은 감사를 사전

에 : 나는 여기에서 자원을 가입 및 다운로드, 수동 천년 미디어의 항아리를 가져올 시도 그 중 하나를 eed. 어떤 도움이 될 수 있다면 내 오류 사본을 여기에 있습니다. 내가 실제로하지 않았다 필요한 MoPub에서의 "전체 SDK"를 사용하고 있었다

:

Error:(7, 35) error: package com.millennialmedia.android does not exist 
Error:(8, 35) error: package com.millennialmedia.android does not exist 
Error:(9, 35) error: package com.millennialmedia.android does not exist 
Error:(10, 35) error: package com.millennialmedia.android does not exist 
Error:(11, 35) error: package com.millennialmedia.android does not exist 
Error:(12, 35) error: package com.millennialmedia.android does not exist 
Error:(23, 13) error: cannot find symbol class MMAdView 
Error:(122, 5) error: cannot find symbol class MMAdView 
Error:(87, 54) error: cannot find symbol class RequestListener 
Error:(89, 47) error: cannot find symbol class MMAd 
Error:(95, 45) error: cannot find symbol class MMAd 
Error:(101, 48) error: cannot find symbol class MMAd 
Error:(104, 44) error: cannot find symbol class MMAd 
Error:(110, 41) error: cannot find symbol class MMAd 
Error:(110, 58) error: cannot find symbol class MMException 
Error:(116, 39) error: cannot find symbol class MMAd 
Error:(47, 9) error: cannot find symbol variable MMSDK 
Error:(49, 33) error: cannot find symbol class MMAdView 
Error:(58, 13) error: cannot find symbol variable MMRequest 
Error:(61, 44) error: cannot find symbol class MMRequest 
Error:(62, 33) error: cannot find symbol variable MMSDK 
Error:(88, 9) error: method does not override or implement a method from a supertype 
Error:(94, 9) error: method does not override or implement a method from a supertype 
Error:(100, 9) error: method does not override or implement a method from a supertype 
Error:(103, 9) error: method does not override or implement a method from a supertype 
Error:(109, 9) error: method does not override or implement a method from a supertype 
Error:(115, 9) error: method does not override or implement a method from a supertype 
/Users/ugur/AndroidStudioProjects/xxx/mopub-sdk/src/main/java/com/mopub/mobileads/MillennialInterstitial.java 
Error:(7, 35) error: package com.millennialmedia.android does not exist 
Error:(8, 35) error: package com.millennialmedia.android does not exist 
Error:(9, 35) error: package com.millennialmedia.android does not exist 
Error:(10, 35) error: package com.millennialmedia.android does not exist 
Error:(11, 35) error: package com.millennialmedia.android does not exist 
Error:(12, 35) error: package com.millennialmedia.android does not exist 
Error:(24, 13) error: cannot find symbol class MMInterstitial 
Error:(77, 60) error: cannot find symbol class RequestListener 
Error:(79, 47) error: cannot find symbol class MMAd 
Error:(85, 45) error: cannot find symbol class MMAd 
Error:(90, 58) error: cannot find symbol class MMAd 
Error:(93, 44) error: cannot find symbol class MMAd 
Error:(104, 41) error: cannot find symbol class MMAd 
Error:(104, 58) error: cannot find symbol class MMException 
Error:(118, 39) error: cannot find symbol class MMAd 
Error:(41, 9) error: cannot find symbol variable MMSDK 
Error:(45, 13) error: cannot find symbol variable MMRequest 
Error:(48, 39) error: cannot find symbol class MMInterstitial 
Error:(50, 50) error: cannot find symbol class MMRequest 
Error:(78, 9) error: method does not override or implement a method from a supertype 
Error:(84, 9) error: method does not override or implement a method from a supertype 
Error:(90, 9) error: method does not override or implement a method from a supertype 
Error:(92, 9) error: method does not override or implement a method from a supertype 
Error:(103, 9) error: method does not override or implement a method from a supertype 
Error:(107, 39) error: cannot find symbol variable MMException 
Error:(117, 9) error: method does not override or implement a method from a supertype 
Note: Some input files use or override a deprecated API. 
Note: Recompile with -Xlint:deprecation for details. 
Note: Some input files use unchecked or unsafe operations. 
Note: Recompile with -Xlint:unchecked for details. 
Error:Execution failed for task ':mopub-sdk:compileReleaseJava'. 
> Compilation failed; see the compiler error output for details. 

답변

0

방금 ​​더 나은 해결책을 찾았습니다 : 수입이 인식되지 않으므로 수업이 프로젝트의 lib에 액세스하지 못합니다. 그래서 나는

compile fileTree(dir: 'libs', include: ['*.jar']) 

을 mopub-sdk의 build.gradle 세션에 추가했습니다.

나는 정보

// This buildscript will assemble the MoPub SDK into an AAR. 

repositories { 
    jcenter() 
} 

apply plugin: 'com.android.library' 

group = 'com.mopub' 

description = '''MoPub SDK''' 

android { 
    compileSdkVersion 22 
    buildToolsVersion '22.0.1' 

    defaultConfig { 
     versionCode 24 
     versionName "3.7.0" 
     minSdkVersion 9 
     targetSdkVersion 22 
     consumerProguardFiles 'proguard.txt' 
    } 

    sourceSets { 
     main { 
      manifest.srcFile 'AndroidManifest.xml' 
      java.srcDirs = ['src/main/java'] 
      resources.srcDirs = ['src/main/java'] 
      aidl.srcDirs = ['src/main'] 
      renderscript.srcDirs = ['src/main'] 
      res.srcDirs = ['res'] 
      assets.srcDirs = ['assets'] 
     } 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), file('proguard.txt') 
     } 
    } 

    // Note: You will also need a local.properties file to set the location of the SDK in the same 
    // way that the existing SDK requires, using the sdk.dir property. 
    // Alternatively, you can set an environment variable called ANDROID_HOME. There is no 
    // difference between the two methods, you can use the one you prefer. 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'com.android.support:support-v4:22.0.0' 
    compile 'com.android.support:support-annotations:22.0.0' 
    compile 'com.mopub.volley:mopub-volley:1.1.0' 
} 

// Don't run the Robolectric Unit Tests. 
check.dependsOn.remove("test") 
check.dependsOn.remove("unitTest") 
check.dependsOn.remove("testDebug") 
check.dependsOn.remove("unitTestDebug") 
+0

고마워요 미안, 해당 프로젝트는 내가이 후속 없습니다 저도 같은 문제가 발생할 경우, 나는이 일을 시도하고 당신을 드릴 것 때문에 중단되었다에 대한 전체 Gradle을 보여 아래 결과를 알아라. 베스트 –