A
~ aerox
Neues Mitglied
- 0
Moin liebe cm,
ich hoffe ich bekomme hier hilfe bin ganz verzweifelt >.<
Ich bin ein recht "Anfänger" in sachen Java Programmierung, habe damals eine etwas ähnliche Sprache gelernt, die Pawn Sprache (Scripting).
Der Einstieg gelangte mir gut, ich habs mal mit einer Soundboard App probiert, klappt alles ganz gut also das Konzept, nur ein bekannter meinte ich soll dort nun Werbung einblenden lassen (GoogleAdMob).
Ich bin diesem Tutorial nachgegangen:
blog.kerul.net: Installing Google AdMob into Android Apps
https://developers.google.com/mobile-ads-sdk/docs/android/fundamentals?hl=de-DE
Soweit alles gut, nur bei einer Sache in der SoundboardActivity.JAR Datei gabs denn ersten Error -.-
Hier mal mein Code wie es in meiner .Jar datei steht:
Dort wo der Error kommt, hab ich mal Rot unterstrichen.
Hier der Error:
Wie mach ich das das es weg geht? Bzw. was muss ich anstatt Bannertest einfügen ? Damit kein Error mehr kommt.. Ich bin da sau verzweifelt seid 3 Tagen -.-
Kann mir da bitte jemand helfen ??? Wäre echt super nett !!!
Danke im vorraus,
Mfg.
Kamil
[/LEFT]
ich hoffe ich bekomme hier hilfe bin ganz verzweifelt >.<
Ich bin ein recht "Anfänger" in sachen Java Programmierung, habe damals eine etwas ähnliche Sprache gelernt, die Pawn Sprache (Scripting).
Der Einstieg gelangte mir gut, ich habs mal mit einer Soundboard App probiert, klappt alles ganz gut also das Konzept, nur ein bekannter meinte ich soll dort nun Werbung einblenden lassen (GoogleAdMob).
Ich bin diesem Tutorial nachgegangen:
blog.kerul.net: Installing Google AdMob into Android Apps
https://developers.google.com/mobile-ads-sdk/docs/android/fundamentals?hl=de-DE
Soweit alles gut, nur bei einer Sache in der SoundboardActivity.JAR Datei gabs denn ersten Error -.-
Hier mal mein Code wie es in meiner .Jar datei steht:
Code:
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]package
[/COLOR][/SIZE][/COLOR][/SIZE][/B][LEFT][SIZE=2]tesdt.ads;[/SIZE]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import[/LEFT]
[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][/B][LEFT][SIZE=2]android.app.Activity;[/SIZE]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import[/LEFT]
[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][/B][LEFT][SIZE=2]android.os.Bundle; [/SIZE]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import[/LEFT]
[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][/B][LEFT][SIZE=2]android.media.MediaPlayer; [/SIZE]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import[/LEFT]
[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][/B][LEFT][SIZE=2]android.view.View; [/SIZE]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import[/LEFT]
[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][/B][LEFT][SIZE=2]android.view.View.OnClickListener; [/SIZE]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import[/LEFT]
[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][/B][LEFT][SIZE=2]android.widget.Button; [/SIZE]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import[/LEFT]
[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][/B][LEFT][SIZE=2]android.widget.LinearLayout;[/SIZE]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import[/LEFT]
[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][/B][LEFT][SIZE=2]com.google.ads.*;[/SIZE]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/LEFT]
[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][/B][LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]class[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=red] [U]Bannertest[/U][/COLOR] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]extends[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] Activity [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]implements[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] AdListener {[/SIZE]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] AdView [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]adView[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]; [/SIZE]
[SIZE=2][COLOR=#646464][SIZE=2][COLOR=#646464]@Override[/COLOR][/SIZE]
[/COLOR][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/LEFT]
[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][/B][LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] onCreate(Bundle savedInstanceState) {[/SIZE]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]super[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2].onCreate(savedInstanceState);[/SIZE]
[SIZE=2]setContentView(R.layout.[/SIZE][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]main[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2]);[/SIZE]
[SIZE=2]String MEINEPUBLISHERID;[/SIZE]
[SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Create the adView[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f5f]
[/COLOR][/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]adView[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] AdView([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2], AdSize.[/SIZE][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]BANNER[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2], MEINEPUBLISHERID);[/SIZE]
[SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Lookup your LinearLayout assuming its been given[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f5f]
[/COLOR][/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// the attribute android:id="@+id/mainLayout"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f5f]
[/COLOR][/SIZE][SIZE=2]LinearLayout layout = (LinearLayout)findViewById(R.id.[/LEFT]
[/LEFT]
[/SIZE][LEFT][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]adView[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2]);[/SIZE]
[LEFT][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Add the adView to it[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f5f]
[/COLOR][/SIZE][SIZE=2]layout.addView([/LEFT]
[/LEFT]
[/SIZE][LEFT][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]adView[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[LEFT][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Initiate a generic request to load it with an ad[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f5f]
[/COLOR][/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]adView[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].loadAd([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] AdRequest());[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#646464][SIZE=2][COLOR=#646464]@Override[/COLOR][/SIZE]
[/COLOR][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/LEFT]
[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][/B][LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] onDestroy() {[/SIZE]
[LEFT][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]adView[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].destroy();[/SIZE]
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]super[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2].onDestroy();[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][/SIZE]
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/LEFT]
[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][/B][LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]class[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] SoundboardActivity [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]extends[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] Activity { [/SIZE]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] MediaPlayer [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]mp[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]; [/SIZE]
[SIZE=2]Button [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]audio1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]audio2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]; [/SIZE]
[SIZE=2][COLOR=#646464][SIZE=2][COLOR=#646464]@Override[/COLOR][/SIZE][/COLOR][/SIZE]
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/COLOR][/SIZE][/COLOR][/SIZE][/B][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] onCreate(Bundle savedInstanceState) { [/SIZE]
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]super[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2].onCreate(savedInstanceState); [/SIZE]
[SIZE=2]setContentView(R.layout.[/SIZE][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]main[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2]); [/SIZE]
[SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]audio1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = (Button) findViewById(R.id.[/SIZE][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]bAudio[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2]); [/SIZE]
[SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]audio2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = (Button) findViewById(R.id.[/SIZE][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]bAudio2[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2]); [/SIZE]
[SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]audio1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].setOnClickListener([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] OnClickListener() { [/SIZE]
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/COLOR][/SIZE][/COLOR][/SIZE][/B][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] onClick(View v) { [/SIZE]
[SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]mp[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = MediaPlayer.[I]create[/I](getApplicationContext(), R.raw.[/SIZE][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]sound1[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2]); [/SIZE]
[SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]mp[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].start(); [/SIZE]
[SIZE=2]} [/SIZE]
[SIZE=2]}); [/SIZE]
[SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]audio2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].setOnClickListener([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] OnClickListener() { [/SIZE]
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/COLOR][/SIZE][/COLOR][/SIZE][/B][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] onClick(View v) { [/SIZE]
[SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]mp[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = MediaPlayer.[I]create[/I](getApplicationContext(), R.raw.[/SIZE][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]sound2[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2]); [/SIZE]
[SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]mp[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].start(); [/SIZE]
[SIZE=2]} [/SIZE]
[SIZE=2]}); [/SIZE]
[SIZE=2]} [/SIZE][/LEFT]
[SIZE=2]} [/SIZE]
Dort wo der Error kommt, hab ich mal Rot unterstrichen.
Hier der Error:
Multiple markers at this line$ErrorCode)
- The type Bannertest must implement the inherited abstract method AdListener.onDismissScreen(Ad)
- The type Bannertest must implement the inherited abstract method AdListener.onPresentScreen(Ad)
- The public type Bannertest must be defined in its own file
- The type Bannertest must implement the inherited abstract method AdListener.onLeaveApplication(Ad)
- The type Bannertest must implement the inherited abstract method AdListener.onReceiveAd(Ad)
- The type Bannertest must implement the inherited abstract method AdListener.onFailedToReceiveAd(Ad, AdRequest
Wie mach ich das das es weg geht? Bzw. was muss ich anstatt Bannertest einfügen ? Damit kein Error mehr kommt.. Ich bin da sau verzweifelt seid 3 Tagen -.-
Kann mir da bitte jemand helfen ??? Wäre echt super nett !!!
Danke im vorraus,
Mfg.
Kamil
[/LEFT]