Since yesterday I'm trying to install RevMob's SDK and I'm getting constant error with this line:
RevMob revmob = RevMob.start(this, REVMOB_APP_ID);
revmob.showFullscreen(this);
And the error is:
REVMOB_APP_ID cannot be resolved to a variable
I don't understand where the problem is because I have set the app id and copy pasted all the xml code that they provided still no luck. I'm literally pulling my hair out right now, its very frustrating.
Any help?
use your revmob app id..... For example: 49830398bbfid392
It has to be in wrapped with "" like this: "49830398bbfid392"
Related
I had implemented Exoplayer in my project and it was working perfectly but today it started producing error in my XML layout for the field app:player_layout_id="#layout/exo_simple_player_view", saying that can't resolve #layout/exo_simple_player_view
After some researches, I understood that it has changed from exo_simple_player_view.xml to exo_styled_player_view.xmlin Exoplayer version 2.13.2 . After I set this new style value, my error gone
You can check this Exoplayer github
I'm trying to create a simple paint app using the Android Paint module.
When running my app, it gives me an error in "Run", saying that there's a problem at line 14, which is the line which by default is created in my mainActivity:
setContentView(R.layout.activity_main);
None of it is underlined in my code, I can't find any errors at all in my code (including in my activity_main.xml!).
MainActivity.java: https://pastebin.com/zhEbBYdQ
activity_main.xml:https://pastebin.com/jPsA0gMX
CanvasView.java: https://pastebin.com/GctVDz5B
Any ideas? I've tried clean + rebuild, I've tried com.example.R etc.
Full error log: https://pastebin.com/26TebLhy
Thanks in advance. (New to StackOverflow - I have problems putting in code directly to these posts so I hope PasteBin is okay).
CanvasView is in the package evansspeak.paint1, in main_activity however you are trying to inflate it from *com*.evanspeak.Paint1. Fix either one to be the same.
Check that the case matches as well (preferably all lower case)
LikeView has no propType for native prop RCTFBLikeView.onLayout of native type boolean
If you haven't changed this prop yourself, this usually means that your versions of the native code and JavaScript code are out of sync. Updating both should make this error go away.
Not sure why I am getting this error. I'm not using LikeView at all in the android app. I've tried running npm start --reset-cache.
Also iOS version of the app runs no problem. This only occurs for android.
Any suggestions welcomed.
Thanks!
I figured out that the problem is (as RN points out) a mismatch between the native props and the JS ones on the props that every view uses. Namely:
renderToHardwareTextureAndroid
onLayout
accessibilityLiveRegion
accessibilityComponentType
importantForAccessibility
accessibilityLabel
testID
Since I am not using any of the views that the package uses, namely:
FBLikeView
FBLoginButton
FBSendButton
FBShareButton
I tried to set this props as 'native only', so that they are not bound to the JavaScript side. In every component (in the example, FBShareButton.js), I replaced:
const RCTFBShareButton = requireNativeComponent(
'RCTFBShareButton',
ShareButton,
);
with
const RCTFBShareButton = requireNativeComponent(
'RCTFBShareButton',
ShareButton,
{
nativeOnly: {
onChange: true,
onLayout: true,
testID: true,
importantForAccessibility: true,
accessibilityLiveRegion: true,
accessibilityComponentType: true,
accessibilityLabel: true,
renderToHardwareTextureAndroid: true,
}
},
);
I am now going to check if the views are getting rendered properly and edit my post later, but if you just want to be able to compile your app in order to continue development (as it is my case at the moment), that should let you do so.
Edit
I successfully rendered the LoginButton component using the example in the README with my changes.
Edit 2
I made a pull request with my changes to the package. I don't like the solution, but it might raise FB's attention. In the meantime, you can just use my fork. In your package.json, just replace the fbsdk line with this:
"react-native-fbsdk": "git+https://github.com/motius/react-native-fbsdk.git#fix-views"
This other pull request might be a better solution, actually.
Similar to the solution suggested by #martinarroyo, I figured that it has to do with some components that are not synced between the native code and the js code.
If you are not using these components, instead of adding the nativeOnly property in every js file you use it, I commented out the exports from the react-native-fbsdk index.js as follows:
//native components
// exports.LikeView = require('./FBLikeView');
// exports.LoginButton = require('./FBLoginButton');
// exports.SendButton = require('./FBSendButton');
// exports.ShareButton = require('./FBShareButton');
Obviously this is just a workaround but that should get you through that error
You can downgrade react-native-fbsdk to 0.5.1 to avoid this issue until a fix has been merged into a new version.
So after countless experimentation and banging my head on the table, i think the solution was the versioning of the dependency.
Here's a list of things I attempted and the one I think that resolved the issue is marked with an * because I'm not 100% sure if it was this step that resolved it.
removing node_modules folder and reinstalling it.
doing the react-native-git-upgrade as #matt suggested
reinstalled react-native-fbsdk multiple times following the instructions and double checking the code.
changing the buildToolsVersion & targetSdkVersion to 25.
5**. ultimately running react-native uninstall react-native-fbsdk followed by react-native install react-native-fbsdk#0.5.0.
Note* number 5 was attempted throughout the past two days..yet only now it worked...So I don't know what black magic it is that caused it to work just now...
The issue with number 5 is that prior to yesterday the fbsdk dependency version was 0.5.0 and as of yesterday, it was upgraded to 0.6.0. SO I am not sure why even though I reinstalled it yesterday too, it did not fix the bug.
If someone who is more familiar with this can provide an explanation as to why this occurred I would be inclined to learn.
I am using the Ionic Framework to build a mobile app for Android/iOS. I was able
to build the project for android (ionic build android). When I run the app, it will be only a white screen, that's because there is an error (when you use GapDebug, you can run apps on your phone and you will be able to debug, and see errors). Now if I run it on the desktop browser there really is NO error and everything is working. Below is the error that is shown in GapDebug:
Now when you check the code in service.js line 394:
There's nothing wrong with the code right? If I try to change line 394 to something like key : self.currentUser, there will be NO error and the app will work. What seems to be the problem here?
Not sure why you are making an object's attribute a list? If you want the key to be childQuestionSnapshot.key then remove the square brackets.
If you are trying to update a list of objects, you can do something similar to the below:
var test = [{key: 'thisguy'},{key: 'thatguy'},{key: 'myguy'}]
test.forEach(function(item){
item['key']='newguy'
})
console.log(test)
Do this instead
var updateObj = {};
updateObj[childQuestionSnapshot.key] = self.currentUser;
applicantRef.update(updateObj, function() {
console.log("applicant answers updated");
});
I have used google, read all Questions here on StackExchange but still couldnt solve my Problem.
So Im following a tutorial from kilobolt(Zombie Bird).
The desktop-version of the game is running without problems, but if I want to run it on an android emulator I get this error message:
"Couldn't load file: data/logo.png"
The line where I get the error looks like this:
logoTexture = new Texture(Gdx.files.internal("data/logo.png"));
My Android Path looks like this:
-Android
-Assets
-Data
-logo.png
I assume this is the correct path.
I have tried cleaning the project, I used Gradle > Refresh All, I restarted Eclipse.
Nothing worked.
Im a little bit confused cause if I move the file outside of Data but in the Assets Folder and change the path to this:
logoTexture = new Texture(Gdx.files.internal("logo.png"));
It works.
Can someone explain me why I cant use the Data Folder inside of Assets?
What emulator are you using to run it? For me, the same code works properly on an actual Android device, so I'd assume it is an Emulator error. Possibly has to do with the / as the seperator character. This is just a wild guess, but does
logoTexture = new Texture(Gdx.files.internal("data" + File.separator + "logo.png"));
fix it, or break it?
maybe it's caused by the difference of OpenGl ES 1 and OpenGl ES 2...
Using OpenGl ES 1 the picture size has the power of two. Bear with me - I'm new to libgdx.. :)