try {
adWordsHandler = new AdWordsHandler(context);
adWordsHandler.callAdWordsAPI();
sales = adWordsHandler.getEntries();
resourceHandler.addResources(Sale.class.getName(), sales);
} catch (RemoteException e) {
e.printStackTrace();
} catch (ApiException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
public void callAdWordsAPI() throws Exception, ApiException {
...
AdGroupAdPage entries = adService.get(selector);
...
}
Error:(104, 9) error: cannot access RemoteException
class file for java.rmi.RemoteException not found
Error:(61, 52) error: incompatible types: ApiException cannot be converted to Throwable
Error:(89, 46) error: cannot access Remote
class file for java.rmi.Remote not found
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "yada.yada"
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
jcenter()
google()
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:design:26.0.2'
implementation 'com.android.support:appcompat-v7:26.0.2'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
//implementation 'com.google.api-ads:ads-lib:3.10.0'
//implementation 'com.google.api-ads:adwords-axis:1.38.0'
implementation 'com.android.support:appcompat-v7:26.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
}
implementation 'com.google.api-ads:ads-lib:3.12.0'
implementation 'com.google.api-ads:adwords-axis:3.12.0'
implementation 'com.google.api-ads:ads-lib:3.12.0'
implementation 'com.google.api-ads:adwords-axis:3.12.0'
implementation 'com.google.api-ads:adwords-appengine:3.12.0'
Error:Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve com.google.api-ads:adwords-appengine:3.12.0.