我已經做了應用程式內購買我的app.Now我需要對其執行也有我我中有我的應用程序ID編譯我的項目時測試,我試圖執行應用程式內它這樣表示是否有可能在編譯應用程序時檢查應用程序內購買,或只有在創建簽名的apk後才能檢查它?
"This version of the application is not configured for billing through Google Play. Check the help center for more information".
錯誤信息
現在我需要知道如何解決它?以及在購買應用程序時需要遵循哪些方法? 需要你的建議朋友 預先感謝您
這裏是我的片段?這是不是在低版本的Android
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
public class Fragadmob extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragadmob, container, false);
//Admob
RelativeLayout gonad=(RelativeLayout)rootView.findViewById(R.id.adview153613);
ImageView addviewimage=(ImageView)rootView.findViewById(R.id.addviewimage);
ImageView inap=(ImageView)rootView.findViewById(R.id.addviewimage1);
// AdView adView = new AdView(getActivity());
AdView adView = (AdView)rootView.findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder()
.build();
adView.loadAd(adRequest);
addviewimage.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent viewIntent =
new Intent("android.intent.action.VIEW",
Uri.parse("https://play.google.com/store/apps/developer?id=SentientIT+America,+LLC"));
startActivity(viewIntent);
}
});
inap.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent = new Intent(getActivity(),Inapp.class);
startActivity(intent);
}
});
if(addviewimage.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE)
{
addviewimage.getLayoutParams().height = 30;
// code to do for Portrait Mode
}
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
boolean isPurchase = preferences.getBoolean("isPurchase",false);
if(isPurchase){
gonad.setVisibility(View.GONE); //work
}
return rootView;
}
}
謝謝您的建議晶圓廠。我有一個更多的問題看到下一個coment –
在我的應用程序中,我已經包括添加mob的fragment.I所有其他XML文件中調用該片段。在運行應用程序時,我得到錯誤但在棒棒糖它運行良好它不顯示任何錯誤。如果我刪除它在所有Android版本運行的片段。這是我的應用程序中的問題 –