Rich-text Reply

Cannot open Android app in edit mode

milan 03-03-16

Cannot open Android app in edit mode



I cannot seem to open my Android app in edit mode, and I've tried using all 3 options (URL/Gesture/Code):

Optimizely.startOptimizelyWithAPIToken(OPTIMIZELY_API_KEY, getApplication());
Optimizely.addOptimizelyEventListener(new OptimizelyEventListener() {


This is the logcat output when trying in code:

Optimizely failed to start with message {Optimizely failed to start because it could not download the data file.}
[OptimizelyNetworkUtil] Executing request
[OptimizelyAsyncTask #1] (ERROR) Attempt to invoke virtual method 'java.lang.String com.optimizely.JSON.OptimizelyVariation.getDescription()' on a null object reference
[OptimizelyData] Parsed data file version 12
[OptimizelyData] Successfully saved data file to disk.
Handler (android.os.Handler) {1d85dbbc} sending message to a Handler on a dead thread

Do you have any idea why this is happening?




Level 1

DavidS 03-04-16

Re: Cannot open Android app in edit mode

Hi milan,


Thanks for reaching out to Optimizely Support!

I understand you are unable to access Edit Mode with your Android app and that you have tried the three ways to activate Edit Mode and none of them seem to work. 


I took a look at the log you submitted. This line in particular: 


[OptimizelyNetworkUtil] Executing request


This most likely happens because the Optimizely SDK is looking for the JSON data file on a URL that returns a 404 (file not found). Can you check that you have replaced this line in AndroidManifest.xml with your Project ID: 


<data android:scheme="optly[PROJECTID]" />


[PROJECTID] should be replaced with the Project ID for your experiment. You can find this ID by going to the Optimizely dashboard and clicking on Settings and Implementation

You can find out more about setting up Optimizely and Android via the following Knowledge Base article.


Does that help?




milan 03-11-16

Re: Cannot open Android app in edit mode

Hi David,


it turned out it was an issue with the version of the optimizely SDK, and as soon as I upgraded it, it started working fine.


So this one can be closed!




Level 1