Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails for Android #11

Open
stormbkk87 opened this issue May 4, 2015 · 3 comments
Open

Build fails for Android #11

stormbkk87 opened this issue May 4, 2015 · 3 comments

Comments

@stormbkk87
Copy link

cordova-build/platforms/android/src/org/prx/playerhater/util/Config.java:24: error: package org.prx.android.playerhater does not exist
[javac] import org.prx.android.playerhater.R;
@andresloopear
Copy link

I was having the same problem, but I found this is a duplicate of #3.
The solution is changing "import org.prx.android.playerhater.R" for "import your.application.name.R".

After that I found a new problem: platforms/android/src/org/nypr/cordova/playerhaterplugin/PlayerHaterPlugin.java:59: error: cannot find symbol
mCachedWebView.loadData(summary, "text/html", null);
^
symbol: method loadData(String,String,)
location: variable mCachedWebView of type CordovaWebView

Which I don't have a solution yet

@cigoe
Copy link

cigoe commented May 4, 2015

In one of the PRs open now #10 there is a fix for it. By simply removing it 😄 search for that variable in that PR.

@monibzia
Copy link

android/src/org/nypr/cordova/playerhaterplugin/playerHaterPlugin.java line 53 - 62

replace this

    if ( mCachedWebView != null ) {
        // this is a hack to destroy the old web view if it exists, which happens when audio is playing, the main app activity is 'killed' but the audio keeps playing, and then the app is restarted.
        // performing the hack here instead of when the app activity is destroyed because the web view continues to function even though the activity is killed, so it will process javascript messages
        // from the plugin telling it that the track is complete, so it will move to the next track if necessary...
        Log.d(LOG_TAG, "Found cached web view -- destroying...");
        String summary = "<html><body>Clear out JS</body></html>";
        mCachedWebView.loadData(summary, "text/html", null);
    }
    mCachedWebView = webView;
            -----------------------------------------------------------------------------------------------

with [adding /* before code] and [adding / after code]
/

if ( mCachedWebView != null ) {
// this is a hack to destroy the old web view if it exists, which happens when audio is playing, the main app activity is 'killed' but the audio keeps playing, and then the app is restarted.
// performing the hack here instead of when the app activity is destroyed because the web view continues to function even though the activity is killed, so it will process javascript messages
// from the plugin telling it that the track is complete, so it will move to the next track if necessary...
Log.d(LOG_TAG, "Found cached web view -- destroying...");
String summary = "Clear out JS";
mCachedWebView.loadData(summary, "text/html", null);
}
mCachedWebView = webView;
*/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants