Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
796 views
in Technique[技术] by (71.8m points)

android - E/OpenGLRenderer﹕ Getting MAX_TEXTURE_SIZE from GradienCache Error while using Picasso and okhttp in genymotion

I'm writing an app which loads a picture from a URL and display in an imageview. here is the code...

public class MainActivity extends Activity {

private Picasso picasso;
private OkHttpClient okHttpClient;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    ImageView imageview = (ImageView) findViewById(R.id.imageView);
    String image_url ="http://www.empireonline.com/images/uploaded/wreck-it-ralph-box-office.jpg";



    okHttpClient = new OkHttpClient();
    picasso = new Picasso.Builder(this)
            .downloader(new OkHttpDownloader(okHttpClient))
            .build();
    Context con = getApplicationContext();
    picasso.with(con)
            .load(image_url)
            .placeholder(R.drawable.ic_launcher)
            .resize(60,60)
            .into(imageview);
}

The app doesn't crash but it does not show the picture either! in the LogCat i've got these 2 errors:

09-15 13:17:17.419    2358-2358/**************** E/OpenGLRenderer﹕ Getting MAX_TEXTURE_SIZE from GradienCache
09-15 13:17:17.439    2358-2358/**************** E/OpenGLRenderer﹕ Getting MAX_TEXTURE_SIZE from Caches::initConstraints()

I'm using Genymotion 2.0.1 . Can u plz help me???

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I had a similar problem. I solved it by increasing the virtual machine's memory. Default setting in Genymotion is very small.

Open your VirtualBox Manager (NOT Genymotion). Select your desire Android VM and go to Settings / System and change the slider for Base Memory. You can also increase the Video Memory in the Display tab.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...